CN113158956B - Garbage detection and identification method based on improved yolov network - Google Patents
Garbage detection and identification method based on improved yolov network Download PDFInfo
- Publication number
- CN113158956B CN113158956B CN202110481897.4A CN202110481897A CN113158956B CN 113158956 B CN113158956 B CN 113158956B CN 202110481897 A CN202110481897 A CN 202110481897A CN 113158956 B CN113158956 B CN 113158956B
- Authority
- CN
- China
- Prior art keywords
- network
- garbage
- detection
- yolov
- improved
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 70
- 238000000034 method Methods 0.000 title claims abstract description 30
- 230000007246 mechanism Effects 0.000 claims abstract description 9
- 238000007405 data analysis Methods 0.000 claims abstract description 6
- 238000004458 analytical method Methods 0.000 claims abstract description 4
- 230000001502 supplementing effect Effects 0.000 claims abstract description 3
- 238000002372 labelling Methods 0.000 claims description 19
- 238000012549 training Methods 0.000 claims description 18
- 238000013515 script Methods 0.000 claims description 13
- 230000009466 transformation Effects 0.000 claims description 7
- 238000007781 pre-processing Methods 0.000 claims description 6
- 238000012986 modification Methods 0.000 claims description 5
- 230000004048 modification Effects 0.000 claims description 5
- 235000010585 Ammi visnaga Nutrition 0.000 claims description 4
- 244000153158 Ammi visnaga Species 0.000 claims description 4
- 238000012795 verification Methods 0.000 claims description 4
- 210000003278 egg shell Anatomy 0.000 claims description 3
- 238000009432 framing Methods 0.000 claims description 3
- 238000005286 illumination Methods 0.000 claims description 3
- 230000010354 integration Effects 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 3
- 230000004913 activation Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 239000002184 metal Substances 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 238000004064 recycling Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000000919 ceramic Substances 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 235000019504 cigarettes Nutrition 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 235000011194 food seasoning agent Nutrition 0.000 description 1
- 235000021478 household food Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000002674 ointment Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 235000011888 snacks Nutrition 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000005406 washing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/41—Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- 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
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- 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
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a garbage detection and identification method based on an improved yolov network, which comprises the steps of firstly, establishing and marking a garbage data set containing 36 categories, and expanding the whole data set by utilizing a data enhancement means and supplementing the categories with insufficient quantity after analysis by using a data analysis method. Then, a target detection network is established based on yolov, an attention mechanism is introduced to improve the backbone network part, and a new small-size branch is added to improve the PaNet detection head part. The bottleneckCPS module of the network introduces a ghost structure, and uses deep separable convolution in the high-dimensional network, so that the parameter number of the network is reduced, and the improved yolov network is finally obtained. Finally, the garbage picture is sent to the improved yolov network after being preprocessed, and a detection and identification result is output. The method can realize simultaneous detection and identification of multiple garbage in the same frame image, the identification types are up to 36 types, and compared with the original yolov network, the method improves the detection precision, reduces the network parameter quantity and has certain application value.
Description
Technical Field
The invention belongs to the technical field of deep learning target detection, and particularly relates to a garbage detection and identification method based on an improved yolov network.
Background
With the improvement of living standard of residents and the acceleration of urban progress, the garbage yield of residents in China is continuously improved, the average garbage yield reaches 0.36 ton in 2019, the data can be further increased, and great challenges are brought to environmental protection and garbage recovery. Currently, nations and society call residents to sort garbage, so that garbage is turned into wealth, and resources at wrong positions are reused. In the society of present, the garbage throwing process still mainly adopts volunteer supervision, or only mechanically placing garbage cans of different types for recycling; for sorting after garbage recovery, a pipeline manual operation mode is mostly adopted, so that a great deal of manpower and material resources are wasted. Meanwhile, the mainstream garbage classification algorithm only can give single garbage class output to an input image, and multi-class detection and recognition cannot be carried out when multiple kinds of garbage coexist, so that the intelligent supervision of the garbage throwing terminal and the intelligent sorting of the mechanical device bring much inconvenience. Therefore, the limitation of the current algorithm and the requirements of higher precision, more categories and faster processing speed of the intelligent AI monitoring system of the garbage throwing terminal and the intelligent sorting equipment during recycling force us to design a detection and identification method which is more perfect and can simultaneously identify garbage of various categories. Therefore, a garbage detection data set containing various types is established, a yolov network is improved, a garbage detection and identification algorithm for various types of garbage is provided, garbage detection and identification problems can be better solved, and the garbage detection and identification method has extremely wide application scenes and market value.
Disclosure of Invention
In view of the above circumstances, the invention provides a garbage detection and identification method based on an improved yolov network, which can detect and identify multiple kinds of garbage in a picture or video stream and give out position information at the same time, improves the precision to a certain extent, reduces the computational complexity of a network structure, is convenient for terminal equipment deployment, and can be used for the intelligent garbage treatment process.
In order to achieve the above purpose, the technical scheme of the invention is as follows: a rubbish detection and identification method based on an improved yolov network comprises the following steps:
S1: and collecting and labeling garbage images containing various categories, carrying out data enhancement after data statistics analysis and data set expansion, and establishing a garbage detection data set containing various categories.
S2: the yolov network is selected as a reference network, the structure of the detection head is improved, the branches of the small-size target detection head are increased, and a attention mechanism is introduced into a backbone network, so that the network is more focused on a region with garbage, the omission rate is reduced, meanwhile, the standard bottleneck structure in the network is replaced by a bottleneck structure based on ghost, the depth separable convolution is used in a network layer with the channel dimension being more than 512 dimensions, the parameter number of the network is reduced, the improved yolov network is constructed as a multi-type garbage detection network, the dataset of the step S1 is preprocessed to the standard size, and then the multi-type garbage detection network is trained, so that the multi-type garbage detection reasoning model is obtained.
S3: and inputting the garbage picture which is preprocessed to the standard size and needs to be detected and identified into a trained multi-type garbage detection inference model, and detecting the types and positions of all garbage in the image.
Further, in the step S1:
step S11: all the garbage categories required are determined, and a crawler script is written to collect public garbage picture data sets of corresponding categories on the network; labeling the collected data set by using labImg tools, wherein labeling information is stored in an xml format and mainly comprises position coordinate information, garbage size length and width information and garbage type information of garbage in a picture;
Step S12: after the marking is finished, respectively writing a garbage number statistical script, marking information modification scripts and marking position information statistical scripts by using python to carry out data analysis; aiming at the garbage types with the picture data quantity less than 600, manually shooting garbage pictures under different illumination, environments and shooting angles, marking and expanding the garbage pictures into a data set;
Step S13: and supplementing and expanding the whole data set by using a target detection universal data enhancement means of pixel content transformation and space geometric transformation for the expanded data set.
Further, in the step S2: the small-size target detection head branch is used for detecting small target objects, including toothpicks, eggshells and the like.
Further, in the step S2:
Step S21: selecting a basic network yolov, wherein the basic network mainly comprises a backbone network and a detection head network PaNet, an original detection head with the size of PaNet increased by 160 x 160 pixels is improved into a four-detection head structure, a branch is led out from a characteristic layer with the size of 160 x 160 pixels in the backbone network, a branch with the size of 160 x 160 pixels is led out from a characteristic image with the size of 80 x 80 pixels in the highest dimension of the detection head PaNet network through up-sampling operation, the two branches are combined and then input into a bottleneck structural integration characteristic image, and a convolution kernel with the size of 1*1 pixels is input for output; introducing an attention mechanism in the last layer of the backbone network and maintaining the network dimension unchanged; the standard bottleneck structure in the network is replaced by a bottleneck structure based on the ghost, for the original standard bottleneck structure with the step length of 1, the input feature map is divided into two branches, the first branch is sequentially output after passing through a ghost module, a BN layer, a ReLU activation function, the ghost module and the BN layer, the second branch is output after passing through a depth separable convolution layer, the two branch outputs are combined to be output as a whole, for the original standard bottleneck structure with the step length of 2, the input map is also divided into two branches, the first branch is sequentially output after passing through the ghost module, the BN layer, the ReLU activation function, the depth separable convolution module, the ghost module and the BN layer, the second branch is sequentially output after passing through the depth separable convolution layer and the standard convolution layer, and the two branch outputs are combined to be output as a whole; replacing a common convolution module with a channel dimension larger than 512 dimensions in a network with a depth separable convolution module; sequentially stacking the modified structures and modules according to the original yolov network form to obtain an improved yolov network;
Step S22: preprocessing the garbage detection data set obtained in the step S1, converting all labeling files from an xml format into a txt format, normalizing coordinates, uniformly scaling the txt text after completion to 640 x 640 pixel sizes, taking 80% data as a training set and 20% data as a verification set, and thus finishing all preprocessing before picture input;
Step S23: and building a virtual environment for a training model on the GPU server, inputting a training set into the improved yolov network to train the target detection model after the training is completed, and obtaining an inference model for detecting and identifying various garbage at the same time after the training is completed.
Further, in the step S3: and (2) inputting the picture or video stream to be detected into an inference model obtained after training in the step (S2), namely obtaining the categories of all garbage in the output file or the output video stream, and framing out the coordinate positions, thereby realizing the simultaneous identification, detection and positioning of various garbage.
The invention has the beneficial effects that: the number of the detectable and identifiable garbage categories is greatly increased to 36 categories, and different from a classification network, the garbage categories can be detected and identified in the same picture or video stream, and coordinate information in an image is given, so that the detection accuracy is improved, the calculation complexity of a model is reduced, and the method can be used for the intelligent garbage treatment process.
Drawings
FIG. 1 is a flow chart of a method for detecting and identifying garbage based on a modified yolov network according to one embodiment of the present invention;
fig. 2 is a schematic diagram showing a size change of a modified four detection heads PAnet of a garbage detection and identification method based on a modified yolov network according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating the attention mechanism of a method for detecting and identifying spam based on the improved yolov network according to one embodiment of the present invention;
Fig. 4 is a schematic diagram of a structure of a ghost-based bottleneck of a method for detecting and identifying garbage based on a modified yolov network according to an embodiment of the present invention;
Fig. 5 is a network structure of a modified yolov of a method for detecting and identifying garbage based on a modified yolov network according to an embodiment of the present invention.
Detailed Description
As shown in fig. 1, the garbage detection and identification method based on the improved yolov network provided by the invention comprises the following steps:
S1: the method comprises the steps of collecting and labeling garbage images containing various categories, acquiring a dataset by referring to a network public database and writing a crawler script to crawl, labeling the acquired images by using labelImg tools according to the part of data, wherein the main labeling information is the type, the size and the position of a target in the images, and acquiring a complete initial dataset after completion. After data statistics analysis and expansion of the data set, data enhancement is performed to establish a garbage detection data set containing 36 kinds of kinds. The method comprises the following specific steps:
Step S11: all the garbage categories required are determined, and a crawler script is written to collect public garbage picture data sets of corresponding categories on the network; labeling the collected data set by using labImg tools, wherein labeling information is stored in an xml format and mainly comprises position coordinate information, garbage size length and width information and garbage type information of garbage in a picture; all garbage categories include 36 kinds of garbage, which are respectively: the household multifunctional household food comprises a charger, a bag, a washing article, a plastic toy, a plastic container, a plastic clothes hanger, a glassware, a metal container, an express paper bag, a plug wire, old clothes, a pop can, a pillow, a plush toy, shoes, a chopping board, a paper box, a seasoning bottle, a wine bottle, a metal food can, a metal kitchen ware, a pot, a plastic bottle, book paper, a big bone, a dry cell, ointment, expired medicine, a disposable snack box, stained plastic, cigarette butts, toothpicks, flowerpots, ceramic containers, chopsticks and stained paper.
Step S12: and (3) carrying out data analysis on the obtained initial dataset, respectively writing a garbage number statistics script, a labeling information modification script and a labeling position information statistics script by using python for carrying out data analysis, checking data analysis conditions, screening out pictures with fuzzy, labeling errors and overproof sizes, manually shooting and complementing garbage types with the picture data quantity of less than 600 under different angles, illumination, environments and forms, labeling the newly added dataset, merging all datasets to obtain a preliminary expansion dataset, wherein the preliminary expansion dataset contains 36 types, 13591 pictures and 21657 labeling targets.
Step S13: and the obtained preliminary expansion data set is subjected to data enhancement, so that samples of the model are increased, and a large amount of data is helpful to improve the generalization capability of the model. The method mainly uses a general enhancement means for target detection of pixel content transformation and space geometry transformation. And finally, a complete data set for model training, testing and verification is obtained.
S2: the yolov network is selected as a reference network, the structure of the detection head is improved, and small-size target detection head branches are added for detecting small target objects, including toothpicks, eggshells and the like, and the modified detection head structure and the size transformation of the characteristic diagram are shown in the figure 2. Attention mechanisms are introduced into the backbone network, so that the network is more focused on the area with garbage, the omission ratio is reduced, and the attention mechanism structure is shown in the figure 3; meanwhile, a standard bottleneck structure in a network is replaced by a bottleneck structure based on the ghest, for an original standard bottleneck structure with the step length of 1, an input feature graph is divided into two branches, the first branch sequentially passes through a ghest module, a BN layer, a ReLU activation function, a ghest module and a BN layer and then is output, the second branch sequentially passes through a depth separable convolution layer and then is output, merging operation is carried out on the two branch outputs to serve as integral output, for an original standard bottleneck structure with the step length of 2, the input graph is also divided into two branches, the first branch sequentially passes through the ghest module, the BN layer, the ReLU activation function, the depth separable convolution module, the ghest module and the BN layer and then is output, the second branch sequentially passes through the depth separable convolution layer and then is output, the two branch outputs are combined to serve as integral output, and a bottleneck structure based on the ghest is shown in a drawing 4; the depth separable convolution is used in the network layer with the channel dimension larger than 512 dimensions, the parameter quantity of the network is reduced, the improved yolov network is constructed to serve as a multi-type garbage detection network, the overall structure of the network is shown in the figure 5, the dataset in the step S1 is preprocessed to the standard dimension, and then the multi-type garbage detection network is trained, so that a multi-type garbage detection reasoning model is obtained. The method comprises the following specific steps:
Step S21: selecting a basic network yolov, wherein the basic network mainly comprises a backbone network and a detection head network PaNet, an original detection head with the size of PaNet increased by 160 x 160 pixels is improved into a four-detection head structure, a branch is led out from a characteristic layer with the size of 160 x 160 pixels in the backbone network, a branch with the size of 160 x 160 pixels is led out from a characteristic image with the size of 80 x 80 pixels in the highest dimension of the detection head PaNet network through up-sampling operation, the two branches are combined and then input into a bottleneck structural integration characteristic image, and a convolution kernel with the size of 1*1 pixels is input for output; introducing an attention mechanism in the last layer of the backbone network and maintaining the network dimension unchanged; replacing the standard bottleneck structure in the network with a ghost-based bottleneck structure; replacing a common convolution module with a channel dimension larger than 512 dimensions in a network with a depth separable convolution module; sequentially stacking the modified structures and modules according to the original yolov network form to obtain an improved yolov network;
Step S22: preprocessing the garbage detection data set obtained in the step S1, converting all labeling files from an xml format into a txt format, normalizing coordinates, uniformly scaling the txt text after completion to 640 x 640 pixel sizes, taking 80% data as a training set and 20% data as a verification set, and thus finishing all preprocessing before picture input;
Step S23: and constructing a virtual environment container for training a model on a GPU server by utilizing a dock technology, loading a necessary dependency library, completing the writing of frame codes by utilizing pytorch, uploading and loading a data set to a modified yolov5 network to train a target detection model, and obtaining an inference model for simultaneously detecting and identifying various garbage after training.
S3: and inputting the garbage picture which is preprocessed to the standard size and needs to be detected and identified into a trained multi-type garbage detection inference model, and detecting the types and positions of all garbage in the image. The method comprises the following steps: and (2) inputting the picture or video stream to be detected into an inference model obtained after training in the step (S2), namely obtaining the categories of all garbage in the output file or the output video stream and framing the coordinate positions, and not only outputting one category, so that the simultaneous identification, detection and positioning of multiple garbage are realized.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While still being apparent from variations or modifications that may be made by those skilled in the art are within the scope of the invention.
Claims (4)
1. The garbage detection and identification method based on the improved yolov network is characterized by comprising the following steps of:
s1: collecting and labeling garbage images containing various categories, carrying out data enhancement after data statistics analysis and data set expansion, and establishing a garbage detection data set containing various categories;
S2: the yolov network is selected as a reference network, the structure of a detection head is improved, a small-size target detection head branch is increased, and a attention mechanism is introduced into a backbone network, so that the network is more focused on a region with garbage, the omission rate is reduced, meanwhile, a standard bottleneck structure in the network is replaced by a bottleneck structure based on ghost, depth separable convolution is used in a network layer with a channel dimension of more than 512 dimensions, the parameter of the network is reduced, an improved yolov network is constructed as a multi-class garbage detection network, a dataset is preprocessed to a standard size, and after GPU training, a multi-class garbage detection reasoning model is obtained; the specific implementation is as follows:
Step S21: selecting a basic network yolov, wherein the basic network mainly comprises a backbone network and a detection head network PaNet, an original detection head with the size of PaNet increased by 160 x 160 pixels is improved into a four-detection head structure, a branch is led out from a characteristic layer with the size of 160 x 160 pixels in the backbone network, a branch with the size of 160 x 160 pixels is led out from a characteristic image with the size of 80 x 80 pixels in the highest dimension of the detection head PaNet network through up-sampling operation, the two branches are combined and then input into a bottleneck structural integration characteristic image, and a convolution kernel with the size of 1*1 pixels is input for output; introducing an attention mechanism in the last layer of the backbone network and maintaining the network dimension unchanged; replacing the standard bottleneck structure in the network with a ghost-based bottleneck structure; replacing a common convolution module with a channel dimension larger than 512 dimensions in a network with a depth separable convolution module; sequentially stacking the modified structures and modules according to the original yolov network form to obtain an improved yolov network;
Step S22: preprocessing the garbage detection data set obtained in the step S1, converting all labeling files from an xml format into a txt format, normalizing coordinates, uniformly scaling the txt text after completion to 640 x 640 pixel sizes, taking 80% data as a training set and 20% data as a verification set, and thus finishing all preprocessing before picture input;
step S23: setting up a virtual environment for a training model on a GPU server, inputting a training set into an improved yolov network to train a target detection model after the training is finished, and obtaining an inference model for detecting and identifying various garbage at the same time after the training is finished;
S3: and inputting the garbage picture which is preprocessed to the standard size and needs to be detected and identified into a trained multi-type garbage detection inference model, and detecting the types and positions of all garbage in the image.
2. The method for detecting and identifying garbage based on the improved yolov network according to claim 1, wherein in the step S1:
step S11: all the garbage categories required are determined, and a crawler script is written to collect public garbage picture data sets of corresponding categories on the network; labeling the collected data set by using labImg tools, wherein labeling information is stored in an xml format and mainly comprises position coordinate information, garbage size length and width information and garbage type information of garbage in a picture;
Step S12: after the marking is finished, respectively writing a garbage number statistical script, marking information modification scripts and marking position information statistical scripts by using python to carry out data analysis; aiming at the garbage types with the picture data quantity less than 600, manually shooting garbage pictures under different illumination, environments and shooting angles, marking and expanding the garbage pictures into a data set;
Step S13: and supplementing and expanding the whole data set by using a target detection universal data enhancement means of pixel content transformation and space geometric transformation for the expanded data set.
3. The method for detecting and identifying garbage based on the improved yolov network according to claim 1, wherein in the step S2: the small-size target detection head branch is used for detecting small target objects, including toothpicks, eggshells and the like.
4. The method for detecting and identifying garbage based on the improved yolov network as claimed in claim 1, wherein in the step S3: and (2) inputting the picture or video stream to be detected into an inference model obtained after training in the step (S2), namely obtaining the categories of all garbage in the output file or the output video stream, and framing out the coordinate positions, thereby realizing the simultaneous identification, detection and positioning of various garbage.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110481897.4A CN113158956B (en) | 2021-04-30 | 2021-04-30 | Garbage detection and identification method based on improved yolov network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110481897.4A CN113158956B (en) | 2021-04-30 | 2021-04-30 | Garbage detection and identification method based on improved yolov network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113158956A CN113158956A (en) | 2021-07-23 |
CN113158956B true CN113158956B (en) | 2024-06-14 |
Family
ID=76873170
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110481897.4A Active CN113158956B (en) | 2021-04-30 | 2021-04-30 | Garbage detection and identification method based on improved yolov network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113158956B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113724219A (en) * | 2021-08-27 | 2021-11-30 | 重庆大学 | Building surface disease detection method and system based on convolutional neural network |
CN113688759A (en) * | 2021-08-31 | 2021-11-23 | 重庆科技学院 | Safety helmet identification method based on deep learning |
CN114373121A (en) * | 2021-09-08 | 2022-04-19 | 武汉众智数字技术有限公司 | Method and system for improving small target detection of yolov5 network |
CN113850324B (en) * | 2021-09-24 | 2022-08-16 | 郑州大学 | Multispectral target detection method based on Yolov4 |
CN114418064B (en) * | 2021-12-27 | 2023-04-18 | 西安天和防务技术股份有限公司 | Target detection method, terminal equipment and storage medium |
CN114467862B (en) * | 2022-01-29 | 2022-12-09 | 浙江旺能生态科技有限公司 | Automatic feeding system for kitchen waste breeding insects |
CN114332666A (en) * | 2022-03-11 | 2022-04-12 | 齐鲁工业大学 | Image target detection method and system based on lightweight neural network model |
CN114842240A (en) * | 2022-04-06 | 2022-08-02 | 盐城工学院 | Method for classifying images of leaves of MobileNet V2 crops by fusing ghost module and attention mechanism |
CN114821440B (en) * | 2022-05-12 | 2023-03-24 | 清研灵智信息咨询(北京)有限公司 | Mobile video stream content identification and analysis method based on deep learning |
CN115240194B (en) * | 2022-07-28 | 2023-10-13 | 广东小白龙环保科技有限公司 | Garbage classification and cloud recycling valuation method based on vision |
CN116778346B (en) * | 2023-08-23 | 2023-12-08 | 蓝茵建筑数据科技(上海)有限公司 | Pipeline identification method and system based on improved self-attention mechanism |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111814860A (en) * | 2020-07-01 | 2020-10-23 | 浙江工业大学 | Multi-target detection method for garbage classification |
CN112241679B (en) * | 2020-09-14 | 2024-02-20 | 浙江理工大学 | Automatic garbage classification method |
-
2021
- 2021-04-30 CN CN202110481897.4A patent/CN113158956B/en active Active
Non-Patent Citations (1)
Title |
---|
基于YOLOv5s网络的垃圾分类和检测;王莉 等;包装工程;第50-56页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113158956A (en) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113158956B (en) | Garbage detection and identification method based on improved yolov network | |
CN109190752A (en) | The image, semantic dividing method of global characteristics and local feature based on deep learning | |
CN110929760A (en) | Garbage classification software based on computer vision | |
CN102385592B (en) | Image concept detection method and device | |
CN111126138A (en) | AI image recognition method for garbage classification | |
CN113343901A (en) | Human behavior identification method based on multi-scale attention-driven graph convolutional network | |
CN112364944A (en) | Deep learning-based household garbage classification method | |
CN114937179B (en) | Junk image classification method and device, electronic equipment and storage medium | |
WO2021129236A1 (en) | Acoustic garbage classification method using one-dimensional convolutional neural network | |
CN114140665A (en) | Dense small target detection method based on improved YOLOv5 | |
CN104951791A (en) | Data classification method and apparatus | |
Nanni et al. | How could a subcellular image, or a painting by Van Gogh, be similar to a great white shark or to a pizza? | |
CN111507325B (en) | Industrial visual OCR recognition system and method based on deep learning | |
CN113191335A (en) | Household ceramic type identification method based on deep learning | |
Feng et al. | Garbage disposal of complex background based on deep learning with limited hardware resources | |
CN210161172U (en) | Bottle and can type garbage identification and classification robot based on deep learning | |
CN113537173B (en) | Face image authenticity identification method based on face patch mapping | |
CN112183333B (en) | Human screen interaction method, system and device based on micro-expressions | |
CN112307967A (en) | Commodity recognition model training optimization method | |
CN116580233A (en) | Intelligent working robot control system for industrial garbage classification | |
CN113095235B (en) | Image target detection method, system and device based on weak supervision and discrimination mechanism | |
CN115457317A (en) | Household garbage classification method based on spatial forgetting channel attention convolution neural network | |
CN113408523A (en) | Image generation technology-based junk article image data set construction method | |
Hu et al. | Application research of automatic garbage sorting based on TensorFlow and OpenCV | |
Meena Deshpande | License plate detection and recognition using yolo v4 |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |