In recent years,the rapid development of society has been promoted by the artificial intelligence technology.More and more intelligent products bring great convenience to people’s life,including a series of intelligent service equipment in supermarkets,which improves customers’ shopping experience and brings benefits to supermarkets.However,the intelligent equipment is still not perfect.For example,the electronic scale for weighing vegetables still need to input information of the vegetables prices manually that is quite low efficiency.It is essential to intelligentize the weighing equipment to improve the operation efficiency and the shopping experience of customers.The intelligent weighing equipment for vegetables needs to detect vegetable objects accurately,and complete the weighing and pricing functions at the same time,so it brings greater convenience to customers and solve the problem of queuing.In the intelligent weighing equipment,the most important part is the vegetable detection.Current object detection algorithms mainly include the traditional machine learning and the deep learning.Comparing with the traditional machine learning method,the deep learning method is particularly outstanding in the aspect of computer vision.Therefore,this thesis based on deep learning object detection methods to achieve fast detection of vegetables.This thesis mainly includes the following contents:Because the absence of public vegetable dataset at home and abroad,vegetable images should be collected from supermarkets and internet,and effective data can be screened from a large number of vegetable images.In this thesis,there are 7632 vegetable images in total,with 20 categories,and these categories are common vegetables in supermarkets.We use annotation tool to set vegetable images as PASCAL VOC data format for training model.Due to the low robustness of the traditional object detection methods,this thesis chooses Faster RCNN with good performance in the two-stage object detection methods to detect vegetable objects.In order to improve the accuracy of vegetable object detection,the experiment is optimized based on Faster RCNN algorithm.Firstly,this thesis uses Res2Net-50 to improve the multi-scale expression ability of the network.Secondly,the top-down and bottom-up architecture are used to fuse the high-level and low-level features so that each feature map for detection contains rich context information.Thirdly,Soft-NMS is employed to solve the problem of poor recall caused by the intensive placement of vegetable objects.Finally,the data augmentation is used to expand the sample size to improve the generalization ability of the model.The improved Faster RCNN algorithm has m AP of 94.6% and 8 frames per second.Comparing with two-stage object detection methods,one-stage object detection methods has faster detection speed.this thesis adopts YOLOv3 algorithm to accurately detect vegetable objects in real time.As YOLOv3 is an algorithm optimized for public datasets,this thesis improved this algorithm to meet the needs of vegetable detection.The scale of the vegetable object is different from the PASCAL VOC dataset.In this thesis,the Dense Block structure is added to the Dark Net-53 network to obtain a deep convolutional neural network.In addition,as the bounding box regression loss function of YOLOv3,the MSE algorithm has a poor positioning accuracy for the object,this thesis proposes DIo U as the loss function of bounding box regression of YOLOv3 to improve the positioning accuracy of the objects.Finally,the K-means method is used to get the prior box which is suitable for vegetable dataset.The improved YOLOv3 algorithm is tested on the vegetable dataset,the m AP reaches 93.2%,and the detection speed is 35 frames per second,which meets the requirements of real-time detection.In this thesis,it is built by the intelligent weighing and coding equipment for vegetables in supermarket on the basis of the improved YOLOv3.After testing,we could get the good detection performance. |