As a favorite food of China and the world,the production of crayfish has been attracting much attention.In the past,crayfish were mainly processed by mechanization,but the overall efficiency is low and the demand for manpower is high.In order to improve the processing efficiency of crayfish while liberating labor force,this paper proposes the idea of applying machine vision to crayfish processing,realizing automatic recognition and positioning of crayfish contour,head and tail,thus greatly improving production efficiency and reducing cost.In this paper,the convolutional neural network in machine learning is used for head and tail recognition of crayfish,and target segmentation is carried out at the same time,so as to obtain the position of head and tail of crayfish and the area of crayfish,which is convenient for automatic cutting and grading of crayfish head and tail.The specific content includes the following points:(1)The current processing situation and bottlenecks of crayfish at home and abroad were analyzed,and the necessity of improving the processing efficiency of crayfish was verified.At the same time,the current processing methods are analyzed,the principle and advantages and disadvantages of mechanical processing used in the past are described,and the innovative idea of applying machine vision in crayfish processing is put forward.(2)The image acquisition system to be used in this paper is established and the image preprocessing methods are proposed,including image open and close processing,gray processing,Gaussian denoising,etc.The image to be input into the neural network is properly processed to make its own characteristics more obvious.(3)The idea that the neural network can be trained to recognize the head and tail of crayfish is proposed.The input images are divided into training set,test set and verification set in the ratio of 6:2:2.The neural network used is the improved Single Shot Multi Box Detector(SSD)network.The specific method is to replace the SSD backbone network with Mobile Net.At the same time,the NMS algorithm is replaced by Soft NMS,so as to strengthen the original network from different angles,improve the accuracy and complexity of the network,and make it give a candidate box with higher similarity and accurate position.Finally,the training results show that the average recognition accuracy of head,tail and pincers of crayfish is higher than 95%.(4)The target segmentation model based on Deep Labv3+ is studied.Similarly,the input image set is divided into 6:2:2 and then input into Deep Labv3+ to train it into a neural network that can perform target segmentation for crayfish images and determine parameter values.Finally,the success rate of crawfish segmentation neural network is98.2%.(5)On the basis of the head and tail recognition model and the target segmentation model,the crayfish classification system is designed by using Python,and the interaction between it and the user is successfully realized through the GUI library.The system includes the functions of image acquisition,head and tail recognition,target segmentation and classification.After the proportion of the crayfish area to the total image was obtained through target segmentation,the crayfish were successfully classified according to the preset threshold value. |