Font Size: a A A

Research On On-line Detection Of Carrot Surface Defects Based On Deep Learning

Posted on:2023-09-21Degree:MasterType:Thesis
Country:ChinaCandidate:P X GaoFull Text:PDF
GTID:2543306623997369Subject:Agricultural mechanization project
Abstract/Summary:PDF Full Text Request
Carrot is one of the main root vegetable crops in China,and its planting area and yield are increasing day by day.Due to factors such as weather,soil environment and agronomy,carrot will appear green root,bifurcation,cracking and other defects,defective carrot fruit too much lead to storage difficulties,deterioration and rotten carrot fruit sales situation is not good.As the key link between carrot combined harvest and fruit sale,the quality of carrot defect sorting will directly affect the economic benefit of carrot.Therefore,it is of great significance to realize the on-line detection of carrot surface defect while meeting the requirements of carrot combined harvest.In the carrot defect sorting task,the efficient and accurate determination of carrot defect type is the premise of carrot sorting.Image detection technology is widely used in the fruit and vegetable sorting task,and will not affect the fruit and vegetable itself,so it has a good application prospect.At present,the existing image detection technology has som e problems,such as poor dynamic recognition performance,low detection accuracy and poor detection speed,which makes the on-line detection technology of carrot surface defects fail to achieve good results in practical application.In view of the above problems,through consulting the development and research status of surface defect detection technology for fruits,vegetables and carrots at home and abroad,this study used deep learning to build a carrot surface defect detection algorithm in order to improve the dynamic recognition performance and the detection accuracy and rate of surface defects in the process of joint harvest.The data set of carrot surface defect was established by data enhancement and image processing.Combined with data enhancement,attention mechanism and model lightweight improvement,the carrot surface defect detection algorithm was optimized,and the performance comparison test was conducted to determine the optimal improvement and optimization mode.An on-line detection system for carrot surface defects was developed to realize real-time detection of carrot surface defects.The aim is to provide theoretical support and technical reference for the intelligent carrot combined harvest and the improvement of carrot surface defect detection technology.The main contents of this paper are as follows:(1)Data set construction and automatic labeling of carrot surface defectsThe common defect types of carrot were green root,bifurcation,cracking and broken root.The images of normal carrot and defective carrot were taken.The data set of carrot surface defects was constructed by data augmentation and random deletion to expand the number and diversity of images.An automatic labeling method of carrot surface defect data set based on image processing was designed.Through experiments,the key techniques of automatic labeling method were determined as B-channel component method,median filtering,OTSU threshold processing and open operational morphology processing,and the minimum peripheral rectangle information of carrot was obtained to create labels.The accuracy of automatic labeling was99.83%,and the average labeling time was 0.3s,which could effectively improve the labeling quality of carrot surface defect data set and save labeling time.(2)Improved and optimized carrot surface defect detection algorithm based on data enhancement and attention mechanismIn order to improve the detection accuracy of the carrot surface defect detection algorithm,based on the YOLOv5 s algorithm and combined with the characteristics of carrot defects,the input end of the YOLOv5 s algorithm was improved and optimized by using different rule occlusion data enhancement algorithms,and the performance comparison test was carried out to explore the model detection accuracy of different data enhancement algorithms.Experimental results show that Fence Mask data enhancement is superior to other improved methods,and its m AP value is 96.66%,1.27% higher than that of the original model.Based on the improved and optimized YOLOv5 s algorithm at the input end,attention mechanism modules were fused at different positions of the main network of the algorithm,and performance comparison tests were carried out to explore the model detection accuracy of the fused attention mechanism at different positions of the main network.Experimental results show that all-CBAM attention-adding mechanism is superior to other improved methods,and its m AP value is 97.42%,0.76% higher than that of the original model.The improved and optimized algorithm effectively improved the detection accuracy of carrot surface defects.(3)Improved carrot surface defect detection algorithm based on model lightweightIn order to improve the detection speed of carrot surface defect detection algorithm,different scaling and pruning processes were carried out on the backbone network based on YOLOv5 s algorithm improved by data enhancement and attention mechanism,and performance comparison tests were carried out to explore the detection speed of different width scaling and pruning ratios of the backbone network.The experimental results show that the backbone network width scaling ratio of 1/4 is better than other improved methods,and its FPS value is77,which is 16.6% higher than that of the original model.On the basis of keeping the detection accuracy basically unchanged,the network structure pruning ratio of 0.80 is better than other improved methods,and its FPS value is 96,which is 24.6% higher than the original model.The improved and optimized algorithm can effectively improve the detection speed of carrot surface defects.Finally,the m AP value of the improved and optimized YOLOv5 s algorithm is 1.23%higher than that of the original YOLOv5 s,the FPS value is 34.7% higher,and the average confidence is 4.11% higher,which meets the requirements of carrot surface defect detection.(4)Development of on-line detection system for carrot surface defects and bench testIn order to explore the feasibility and stability of last-Yolov5 s identification of carrot surface defects,an online detection system for carrot surface defects was developed based on the improved and optimized YOLOv5 s algorithm.The system could realize dynamic detection of carrot defect types,preservation of detection carrot pictures and statistics of carrot fruit number.A logical judgment table of carrot defect was created to judge the type of carrot defect with dual cameras.A test rig for on-line detection system of carrot surface defects was built and the system performance test was carried out.The experimental results showed that the average accuracy rate of carrot surface defect detection was 96.80%,the accuracy rate of carrot number identification was 96.57%,and the overall identification accuracy rate of each type was above 95.00%.The system has excellent performance and meets the requirements of dynamic carrot surface defect detection.
Keywords/Search Tags:Carrot defect detection, Deep learning, Attention mechanism, Model lightweight, Bench performance test
PDF Full Text Request
Related items