| Tobacco industry is an important support for China’s taxation.Tobacco has been invaded by tobacco worms for a long time during storage and processing.Tobacco worms cause economic losses to the industry.At present,the monitoring of tobacco worms mainly depends on the manual identification and counting of tobacco bug traps.There are problems such as low efficiency and poor real-time performance.The research of a machine vision system with automatic identification and counting of tobacco worms has theoretical and practical significance for improving similar pest monitoring and control.This thesis implements three methods for detecting tobacco worms and conducts comparative research.The first method is the traditional image recognition method based on the watershed algorithm.The component method and Otsu threshold method are used to binarize the image,and the morphological method and color space conversion method are used to eliminate some interference effects.Aiming at the problem of watershed segmentation,the super-corrosion method was used to mark,and then the comprehensive characteristics of roundness and area limitation were used to identify tobacco worms.Finally,connected domain counting method is used for tobacco worms counting.This thesis also implements two types of deep learning networks to identify tobacco worms: Mask R-CNN,a target detection model based on candidate frames,and YOLOv3,a target detection model based on regression.This thesis analyzes the advantages of two models in detecting tobacco target.According to the characteristics of the small size and dense distribution of tobacco worms,this thesis uses dense connection network and improved feature pyramid to improve the feature extraction and feature map utilization capabilities of Mask R-CNN,and uses Soft-NMS algorithm to improve the dense detection capability of Mask R-CNN and YOLOv3.Experimental results show that the improved YOLOv3 has the fastest detection speed,but the detection rate under adhesion and dense conditions needs to be improved.The marker-based watershed algorithm has faster detection speed and higher detection rate,but it is inaccuracy when the adhesion is serious.The improved Mask R-CNN has the highest detection rate,but requires powerful hardware and the detection speed is slow. |