| Traditional classification of tobacco is by virtue of human experience,with the eye,hand touch,etc.Because of human experience,age and educational level are vary from person to person,it is very easy to appear low classification accuracy and too subjective situation.Therefore,it is very urgent to research and develop a machine classification system to solve the current problem.After many years of efforts,many scholars use the extraction of effective features and machine learning methods to design similar systems,but still can not solve the problem of classification accuracy.As with the rapid development of image processing technology based on deep learning,we design a tobacco leaf classification system,which can detect abnonnal tobacco leaves and distinguish normal tobacco accurately.In this thesis,all the tobacco leaves are collected on the spot.On this bases,we research the abnormal tobacco leaves detection and normal tobacco leaves classification methods,and then integrated the two models together.The details are as follows:1)In this thesis,we studied the algorithm of abnormal tobacco leaves detection algorithm based on Faster R-CNN model,and proposed a method of linear integrating Faster R-CNN model in different training samples,called Bootstrap Ensemble Method for Deep Learning.By selecting the model outputting from different training samples,and then linearly integrated them.A large number of small test sets are generated by sampling of the test set with replacement method,under which the accuracy of the single model is tested.Finally,the parameters of the integrated model are solved by using the lowest error rate and highest precision of the integrated model.Our integrated model increases the diversity and complementary of features which improve the generalization and accuracy.the parameters of model is initialized by VGG16 network parameters which trained under ImageNets.In this way the convergence speed of the algorithm is accelerated,bring good training performance under less training cost.2)After we study and analyze the basic principles and theories based on the AlexNet model finding that AlexNet model can only input the same size training samples so that we need to resize all the picture to the same size which will lose a lot of important features such as aspect ratio,size,leaf tip size and so on.In order to solve this problem,we proposed a fully convoluted AlexNet network(Fully Convolutional AlexNet,FC-AlexNet),which can input any size of images for testing and keep the important features of tobacco leaves unchanged.Firstly,by changing the full connection layers of AlexNet to the convolution layers,then using the number of 4096 convolution kernels with the size of 1*1 to convolute featuremaps to get different size feature maps.By decomposing different size feature maps at the last layer into 1*1*4096 feature vector to get the same size feature vector of different input images,and then we use the maximum value of several feature vectors'mean classification probability as the finally classification results.By using convolution layer to replace full connection layer,the number of parameters is reduced,the learning ability and the accuracy of the tobacco classification is improved.3)We design a algorithm to distinguish negative side or positive side from different tobacco leaves based on different features.Firstly the device gets positive and negative side of the same tobacco leaf image through two cameras,then transformed from RGB color space to LAB color space,and the two images of B color space is remained.After that the gray value of B color space images are normalized from 0 to 255,then get the gray mean value and variance of B color space images and the contrast of the original image as distinguishing features.Finally comparing the three features' values of the positive and negative side tobacco leaves,majority voting method is used to identify the positive and negative side of tobacco image.The proposed approach is not only fast,but also the precision is high which meet the system requirements.4)The system use C ++ as the core development language,under the Windows operating system.By using the method of software engineering,the Visual Stdio 2013 integrated development environment,MFC development framework,modularized and loosely-coupled software design method,we integrate image acquisition module,database,user interface,abnormal tobacco leaves detection module,normal tobacco leaves classification module and other major modules into one system.So that the system can be work properly.Finally,the system successfully passed the functional test and integration test,which are proved the syetem can meet the needs of practical production. |