CN113111792A - Beverage bottle recovery visual detection method based on transfer learning - Google Patents
Beverage bottle recovery visual detection method based on transfer learning Download PDFInfo
- Publication number
- CN113111792A CN113111792A CN202110410989.3A CN202110410989A CN113111792A CN 113111792 A CN113111792 A CN 113111792A CN 202110410989 A CN202110410989 A CN 202110410989A CN 113111792 A CN113111792 A CN 113111792A
- Authority
- CN
- China
- Prior art keywords
- beverage bottle
- transfer learning
- model
- beverage
- training
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F7/00—Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
- G07F7/06—Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by returnable containers, i.e. reverse vending systems in which a user is rewarded for returning a container that serves as a token of value, e.g. bottles
- G07F7/0609—Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by returnable containers, i.e. reverse vending systems in which a user is rewarded for returning a container that serves as a token of value, e.g. bottles by fluid containers, e.g. bottles, cups, gas containers
Abstract
The invention relates to the field of beverage bottle recovery visual detection, in particular to a beverage bottle recovery visual detection method based on transfer learning, which comprises the following steps: putting different beverage bottles into a bottle feeding opening of a beverage bottle recycling machine, conveying the beverage bottles to the inside by a conveying belt device, and collecting image data of the beverage bottles by a camera at the top of the beverage bottle recycling machine; manually labeling the image data of the beverage bottle by using image labeling software; preprocessing the image data of the beverage bottle; carrying out data enhancement processing on the image of the beverage bottle; defining a data set for training and validation; building and training a transfer learning model, loading a pre-training target detection model, and performing transfer learning fine-tuning stage parameter learning by using image data of a beverage bottle; evaluating the effect of the model, namely evaluating the average precision value of the mean value of the target detection model; model export and deployment, and export and deploy CPU and NPU models for beverage bottle recovery visual inspection.
Description
Technical Field
The invention relates to the field of beverage bottle recovery visual detection, in particular to a beverage bottle recovery visual detection method based on transfer learning.
Background
The visual inspection for beverage bottle recovery is the core of the beverage bottle recovery device, and the beverage bottle recovery device on the market at present uses a bottle bar code scanning identification mode or a mode for identifying the shape of a bottle, so that the condition of a flattened or non-beverage bottle is difficult to identify. The method based on the traditional neural network is used for identifying training sample data which needs a large amount of manual labeling, training needs a large amount of calculation power and time, and the problems of low detection precision, poor real-time performance, target omission and the like exist.
Disclosure of Invention
In view of the above defects in the prior art, the technical problem to be solved by the present invention is to provide a beverage bottle recycling visual inspection method based on transfer learning, which solves the problems of the prior art and the requirements and disadvantages of the prior art
The invention is realized by the following technical scheme:
a beverage bottle recovery visual detection method based on transfer learning is characterized in that the implementation process of the method comprises the following steps:
s01, putting different beverage bottles into the bottle feeding opening of the beverage bottle recycling machine, transmitting the beverage bottles to the inside by the conveyor belt device, and collecting image data of the beverage bottles by the camera at the top of the beverage bottle recycling machine;
s02, manually labeling the image data of the beverage bottle by using image labeling software;
s03, preprocessing the image data of the beverage bottle;
s04, performing data enhancement processing on the image of the beverage bottle;
s05, defining a data set used for training and verification;
s06, building and training a transfer learning model, loading a pre-training target detection model, and performing transfer learning fine-tuning stage parameter learning by using image data of a beverage bottle;
s07, evaluating the effect of the model, and evaluating the mean average accuracy value (mAP) of the target detection model;
s08, model export and deployment, and export and deployment of a CPU and NPU model for beverage bottle recovery visual inspection.
The beverage bottle recovery top camera in step S01 may be one or more CCD cameras, or one or more CMOS cameras.
Wherein, the manual labeling beverage bottle data set in step S02 may be in COCO format or VOC format.
In step S03, preprocessing the beverage bottle image data is automatically completed by a program, where the preprocessing includes adjusting color tone, contrast, and image size.
Wherein in the step S04, the image data enhancement processing includes one or more of rotating the image, randomly translating, flipping the image, changing hue and saturation, enhancing contrast, randomly cropping the image, randomly expanding the image, or normalizing the image.
In step S05, defining a data set used for training and verification to be divided by a random sampling method, and dividing the data into a training set, a verification set, and a test set, where the ratio of the training set, the verification set, and the test set is 6:2: 2.
In step S06, the loaded pre-trained target detection model includes one or more of ResNet, Yolo, VGG, MobileNet, LeNet, and CNN.
Wherein, in the step S07, the mean average precision value of the evaluation target detection model is used to evaluate the model effect.
In step S08, the trained model includes a CPU and NPU visual inspection model that can be deployed on a mobile phone APP or Linux platform.
The invention has the beneficial effects that:
the problem of beverage bottle recovery unit detection precision low is solved: according to the beverage bottle recovery visual detection method based on transfer learning, model construction and training are carried out on images based on transfer learning, training is carried out without a large amount of training sample data marked manually and a large amount of computing power and time, and the problem of low beverage bottle recovery detection precision is solved.
Drawings
The invention is further illustrated by means of the attached drawings, but the embodiments in the drawings do not constitute any limitation to the invention, and for a person skilled in the art, other drawings can be obtained on the basis of the following drawings without inventive effort.
Fig. 1 is a flow chart of a beverage bottle recovery visual inspection method based on transfer learning according to the invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.
It should be noted that the structures shown in the drawings are only used for matching the disclosure of the present invention, so as to be understood and read by those skilled in the art, and are not used to limit the conditions of the present invention, so that the present invention has no technical significance, and any modifications or adjustments of the structures should still fall within the scope of the technical contents of the present invention without affecting the function and the achievable purpose of the present invention.
As shown in fig. 1, a beverage bottle recovery visual inspection method based on transfer learning is characterized in that the method is implemented by the following steps:
s01, putting different bottles into the bottle feeding opening of the beverage bottle recycling machine, transmitting the beverage bottles to the inside by the conveyor belt device, and collecting image data of the beverage bottles by the beverage bottle recycling top camera;
s02, manually labeling the beverage bottle image data by using image labeling software;
s03, preprocessing the beverage bottle image data, such as adjusting color tone, contrast, image size and the like;
s04, enhancing the beverage bottle image data, such as enhancing the image contrast, randomly cutting the image, randomly expanding the image and standardizing the image;
s05, defining a data set used for training and verification;
s06, building and training a transfer learning model, loading a pre-training target detection model, and performing transfer learning fine-tuning stage parameter learning by using beverage bottle image data;
s07, evaluating the effect of the model, and evaluating the mean average accuracy value (mAP) of the target detection model;
s08, model export and deployment, and export and deployment of a CPU and NPU model for beverage bottle recovery visual inspection.
In this embodiment, each step includes the following specific implementation modes:
s01, putting 40 different bottles into a bottle feeding opening of a beverage bottle recycling machine, conveying the beverage bottles to the inside by a conveying belt device, shooting image data of the beverage bottles once every 1S by a top camera for recycling the beverage bottles, and storing the image data in a JPEGImages folder in a jpg format;
s02, manually labeling the beverage bottle image data by using image labeling software, wherein the data set format is a VOC format, the labeling tool is labellimg, and storing an XML file generated by labeling in antibiotics;
and S03, performing image size cutting, color tone adjustment and contrast adjustment on the beverage bottle image data by using a data preprocessing program written based on OpenCV.
S04, the data enhancement program carries out operations such as image contrast enhancement, random image cutting, random image expansion, image standardization data enhancement and the like on the beverage bottle image;
and S05, dividing the manually marked beverage bottle image into a training set, a verification set and a test set by the program to generate a train.
S06, modifying a training configuration file, using an ssd _ mobilenet _ v1_ voc model to train a transfer learning model, using beverage bottle image data to perform transfer learning fine-tuning stage parameter learning, setting training parameters, setting the total number of rounds to be 28000 rounds, and setting the learning rate to be 0.000125;
s07, storing the model every 2000 rounds in the training, wherein the named rounds are all periodic models, the output model after the training is finished is stored in an output/ssd _ mobilene _ v1_ voc folder, the model _ final is the model stored after the training is finished, and the best _ model is the optimal mAP model after each evaluation;
and S08, optimizing the model, exporting a CPU (central processing unit) and NPU (neutral point unit) model for beverage bottle recovery visual detection, which can be deployed on an Android platform, loading the CPU and NPU model into an Android development program, and connecting a beverage bottle recovery device through a USB (universal serial bus) for debugging.
Preferably, in step S01, the beverage bottle recycling top camera may be one or more CCD cameras, or may be a CMOS camera.
Preferably, in step S02, the manually labeled beverage bottle data set may be in COCO format or VOC format.
Preferably, in step S03, the preprocessing of the beverage bottle image data is automatically performed by a program, and the preprocessing includes adjusting color tone, contrast, image size, and the like.
Preferably, in step S04, the beverage bottle image data is enhanced, and the image data enhancement includes operations of rotating, randomly translating, flipping, changing hue and saturation of an image, enhancing image contrast, randomly cropping an image, randomly expanding an image, standardizing an image, and the like.
Preferably, in step S05, the data set used for training and verification is defined, the data set is divided by using a random sampling method, and the data is divided into a training set, a verification set and a test set, where the ratio may be 6:2:2 or other ratios.
Preferably, in step S06, the pre-training target detection model is loaded, the pre-training model may be a model such as ResNet, Yolo, VGG, MobileNet, LeNet, CNN, and the training method may be a method such as random gradient descent, Adam, and the training is terminated when the training reaches the convergence condition.
Preferably, in step S07, the evaluation model effect uses the mean average precision value of the evaluation target detection model, and a larger value provides better model performance.
Preferably, in step S08, the model is exported and deployed, and the trained model is exported as a CPU and NPU visual inspection model that can be deployed on a mobile phone APP deployment or Linux platform.
In summary, according to the beverage bottle recycling visual detection method based on the transfer learning of the embodiment of the present invention, based on the transfer learning, model construction and training are performed on an image, and training is performed without a large amount of training sample data labeled manually, a large amount of computing power and time, so that the problem of low beverage bottle recycling detection accuracy is solved.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the protection scope of the present invention, although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (9)
1. A beverage bottle recovery visual detection method based on transfer learning is characterized in that the implementation process of the method comprises the following steps:
s01, putting different beverage bottles into the bottle feeding opening of the beverage bottle recycling machine, transmitting the beverage bottles to the inside by the conveyor belt device, and collecting image data of the beverage bottles by the camera at the top of the beverage bottle recycling machine;
s02, manually labeling the image data of the beverage bottle by using image labeling software;
s03, preprocessing the image data of the beverage bottle;
s04, performing data enhancement processing on the image of the beverage bottle;
s05, defining a data set used for training and verification;
s06, building and training a transfer learning model, loading a pre-training target detection model, and performing transfer learning fine-tuning stage parameter learning by using image data of a beverage bottle;
s07, evaluating the effect of the model, and evaluating the mean average accuracy value (mAP) of the target detection model;
s08, model export and deployment, and export and deployment of a CPU and NPU model for beverage bottle recovery visual inspection.
2. The beverage bottle recovery visual inspection method based on transfer learning of claim 1, wherein the beverage bottle recovery top camera in step S01 can be one or more CCD cameras or one or more CMOS cameras.
3. A beverage bottle recycling visual inspection method based on transfer learning according to claim 1, wherein said step S02 manual labeling beverage bottle data set can be in COCO format or VOC format.
4. A beverage bottle recovery visual inspection method based on transfer learning as claimed in claim 1, wherein in step S03, the beverage bottle image data is automatically pre-processed by program, and the pre-processing includes adjusting color tone, contrast and image size.
5. A beverage bottle recycling visual inspection method based on transfer learning according to claim 1, wherein in step S04, the image data enhancement processing includes one or more of rotating, randomly translating, flipping, changing hue and saturation, contrast enhancing, randomly cropping, randomly expanding or standardizing the image.
6. The beverage bottle recycling visual inspection method based on transfer learning of claim 1, wherein in step S05, the data set used for defining training and verification is divided by means of random sampling, and the data is divided into a training set, a verification set and a test set, wherein the ratio of the training set, the verification set and the test set is 6:2: 2.
7. A beverage bottle recovery visual detection method based on transfer learning according to claim 1, wherein in step S06, the loaded pre-trained target detection model comprises one or more of ResNet, Yolo, VGG, MobileNet, LeNet, and CNN.
8. A beverage bottle recycling visual inspection method based on transfer learning according to claim 1, wherein in said step S07, the evaluation model effect uses the mean average precision value of the evaluation target detection model.
9. The beverage bottle recycling visual inspection method based on transfer learning of claim 1, wherein in the step S08, the trained models comprise CPU and NPU visual inspection models which can be deployed on a mobile phone APP or Linux platform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110410989.3A CN113111792A (en) | 2021-04-16 | 2021-04-16 | Beverage bottle recovery visual detection method based on transfer learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110410989.3A CN113111792A (en) | 2021-04-16 | 2021-04-16 | Beverage bottle recovery visual detection method based on transfer learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113111792A true CN113111792A (en) | 2021-07-13 |
Family
ID=76717832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110410989.3A Pending CN113111792A (en) | 2021-04-16 | 2021-04-16 | Beverage bottle recovery visual detection method based on transfer learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113111792A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113537244A (en) * | 2021-07-23 | 2021-10-22 | 深圳职业技术学院 | Livestock image target detection method and device based on light-weight YOLOv4 |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647588A (en) * | 2018-04-24 | 2018-10-12 | 广州绿怡信息科技有限公司 | Goods categories recognition methods, device, computer equipment and storage medium |
CN109308479A (en) * | 2018-09-20 | 2019-02-05 | 云南师范大学 | A kind of automatic classified reclaiming method of Campus Garbage based on deep learning |
CN109934255A (en) * | 2019-01-22 | 2019-06-25 | 小黄狗环保科技有限公司 | A kind of Model Fusion method for delivering object Classification and Identification suitable for beverage bottle recycling machine |
CN110852420A (en) * | 2019-11-11 | 2020-02-28 | 北京智能工场科技有限公司 | Garbage classification method based on artificial intelligence |
US20200160212A1 (en) * | 2018-11-21 | 2020-05-21 | Korea Advanced Institute Of Science And Technology | Method and system for transfer learning to random target dataset and model structure based on meta learning |
CN111783841A (en) * | 2020-06-09 | 2020-10-16 | 中科院成都信息技术股份有限公司 | Garbage classification method, system and medium based on transfer learning and model fusion |
CN112016462A (en) * | 2020-08-28 | 2020-12-01 | 佛山市南海区广工大数控装备协同创新研究院 | Recovery bottle classification method based on deep learning model |
CN112287839A (en) * | 2020-10-29 | 2021-01-29 | 广西科技大学 | SSD infrared image pedestrian detection method based on transfer learning |
CN112620165A (en) * | 2020-12-11 | 2021-04-09 | 江西理工大学 | Garbage classification method |
-
2021
- 2021-04-16 CN CN202110410989.3A patent/CN113111792A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647588A (en) * | 2018-04-24 | 2018-10-12 | 广州绿怡信息科技有限公司 | Goods categories recognition methods, device, computer equipment and storage medium |
CN109308479A (en) * | 2018-09-20 | 2019-02-05 | 云南师范大学 | A kind of automatic classified reclaiming method of Campus Garbage based on deep learning |
US20200160212A1 (en) * | 2018-11-21 | 2020-05-21 | Korea Advanced Institute Of Science And Technology | Method and system for transfer learning to random target dataset and model structure based on meta learning |
CN109934255A (en) * | 2019-01-22 | 2019-06-25 | 小黄狗环保科技有限公司 | A kind of Model Fusion method for delivering object Classification and Identification suitable for beverage bottle recycling machine |
CN110852420A (en) * | 2019-11-11 | 2020-02-28 | 北京智能工场科技有限公司 | Garbage classification method based on artificial intelligence |
CN111783841A (en) * | 2020-06-09 | 2020-10-16 | 中科院成都信息技术股份有限公司 | Garbage classification method, system and medium based on transfer learning and model fusion |
CN112016462A (en) * | 2020-08-28 | 2020-12-01 | 佛山市南海区广工大数控装备协同创新研究院 | Recovery bottle classification method based on deep learning model |
CN112287839A (en) * | 2020-10-29 | 2021-01-29 | 广西科技大学 | SSD infrared image pedestrian detection method based on transfer learning |
CN112620165A (en) * | 2020-12-11 | 2021-04-09 | 江西理工大学 | Garbage classification method |
Non-Patent Citations (1)
Title |
---|
郑誉煌;戴冰燕;熊泽珲;陈钊;: "基于迁移学习的可回收生活垃圾图像分类识别研究", 广东第二师范学院学报, no. 03, pages 57 - 59 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113537244A (en) * | 2021-07-23 | 2021-10-22 | 深圳职业技术学院 | Livestock image target detection method and device based on light-weight YOLOv4 |
CN113537244B (en) * | 2021-07-23 | 2024-03-15 | 深圳职业技术学院 | Livestock image target detection method and device based on lightweight YOLOv4 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11443288B2 (en) | Automatic assessment of damage and repair costs in vehicles | |
WO2021135331A1 (en) | Product defect detection method, apparatus and system | |
WO2021135300A1 (en) | Product defect detection method, device, and system | |
US11836907B2 (en) | Product defect detection method, device and system | |
CN107832780B (en) | Artificial intelligence-based wood board sorting low-confidence sample processing method and system | |
CN110136101B (en) | Tire X-ray defect detection method based on twinning distance comparison | |
CN111814850A (en) | Defect detection model training method, defect detection method and related device | |
CN113239930B (en) | Glass paper defect identification method, system, device and storage medium | |
WO2020232816A1 (en) | Quality inspection method for target object, and edge computing device | |
CN109711407A (en) | A kind of method and relevant apparatus of Car license recognition | |
CN112348787A (en) | Training method of object defect detection model, object defect detection method and device | |
CN113111792A (en) | Beverage bottle recovery visual detection method based on transfer learning | |
CN111435446A (en) | License plate identification method and device based on L eNet | |
CN114677567B (en) | Model training method and device, storage medium and electronic equipment | |
CN111291773A (en) | Feature identification method and device | |
CN114022736A (en) | Garbage detection method and device | |
CN111444911B (en) | Training method and device of license plate recognition model and license plate recognition method and device | |
CN115619787A (en) | UV adhesive defect detection method, system, equipment and medium | |
CN115423755A (en) | Wafer micromachining structure defect detection method and device, equipment and medium thereof | |
CN115620083B (en) | Model training method, face image quality evaluation method, equipment and medium | |
CN111698418A (en) | Industrial intelligent camera system based on deep learning configuration cloud platform | |
CN115601341A (en) | Method, system, equipment, medium and product for detecting defects of PCBA (printed circuit board assembly) board | |
CN114998769A (en) | CBAM (cubic boron nitride) and improved YOLOX (YOLOX) -based rapid detection method and device for small aerial object of unmanned aerial vehicle | |
CN112750113B (en) | Glass bottle defect detection method and device based on deep learning and linear detection | |
CN111122582A (en) | Poultry egg detection method, image processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |