| With the global spread of co VID-19,people are paying more and more attention to lung diseases.There are many kinds of lung diseases,such as pneumonia,pneumothorax,mass and so on.In the detection of lung lesions,X-ray is a common diagnostic method at present.However,due to the image haze phenomenon of lung Xray images and overlapping of lung lesions,doctors’ diagnosis of lung diseases have been affected to a certain extent.With the maturity and progress of science and technology,computer-aided medical system came into being.It plays a certain role in helping doctors improve the accuracy and speed of lung disease diagnosis.Therefore,in view of the diversity and difference in the shape,size,location and other aspects of lung X-ray image,this thesis proposes a lung X-ray image classification method based on depth attention mechanism + DenesNet.The main research work is as follows.(1)First of all,histogram averaging is used to preprocess the lung X-ray image to solve the fog phenomenon of the lung X-ray image;then,the lung X-ray image is uniformly scaled to 224 × 224 pixels,and the data is enhanced through a random level flip of 0.5 probability;finally,the data is normalized by the mean and variance of Imagenet data set.(2)Using denesnet as the basic network for data training and testing.Aiming at the problem of difficult feature extraction,a network model of attention mechanism +denesnet is proposed.By adjusting the position of attention mechanism module,network features can be extracted better to improve the classification accuracy of network model.The experimental results show that the proposed network model can effectively improve the classification accuracy of lung X-ray images.(3)In the view of the imbalance of positive and negative samples in data sets and the difficulty of learning difficult samples,this paper uses focus loss function,which has two advantages: one is to increase the weight of difficult learning samples by adjusting the gamma parameter of focal loss,so that the network can pay more attention to the learning of difficult samples;the other is to use focal loss function to improve the learning of difficult samples.The α parameter adjustment of loss can better solve the problem of imbalance between positive and negative samples.The theoretical and experimental results show that the accuracy of network classification with modified loss function has been improved.(4)Aiming at the problem that the model fitting is too fast because of the model migration,this thesis designs a pre-processing operation of lung preservation random clipping,which can slow down the model fitting by randomly clipping the input lung X-ray image each time during training,which makes the data of each training time different.The experimental results show that the fitting time of network training is increased and the classification accuracy of network model is improved. |