CN111242151A - Detection method of garbage classification model - Google Patents
Detection method of garbage classification model Download PDFInfo
- Publication number
- CN111242151A CN111242151A CN201811446298.3A CN201811446298A CN111242151A CN 111242151 A CN111242151 A CN 111242151A CN 201811446298 A CN201811446298 A CN 201811446298A CN 111242151 A CN111242151 A CN 111242151A
- Authority
- CN
- China
- Prior art keywords
- garbage
- image
- hog
- garbage classification
- classification model
- 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
- 239000010813 municipal solid waste Substances 0.000 title claims abstract description 62
- 238000001514 detection method Methods 0.000 title claims abstract description 15
- 238000013145 classification model Methods 0.000 title claims abstract description 13
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 13
- 238000007781 pre-processing Methods 0.000 claims abstract description 3
- 238000003708 edge detection Methods 0.000 claims description 7
- 239000013598 vector Substances 0.000 claims description 6
- 238000012549 training Methods 0.000 claims description 4
- 239000000284 extract Substances 0.000 abstract 1
- 230000036544 posture Effects 0.000 description 10
- 238000012360 testing method Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000005286 illumination Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- 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
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- 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/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/462—Salient features, e.g. scale invariant feature transforms [SIFT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20016—Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a detection method of a garbage classification model, which comprises the following steps of; step 1, preprocessing an image; step 2, searching the contour; step 3, acquiring HOG characteristics; step 4, establishing an identification model of the SVM algorithm; the method adopts garbage recognition based on image edge characteristics, and the algorithm firstly extracts the edge characteristics of the image, then trains a model by using HOG + SVM and finally detects the target. The technical scheme can accurately identify the garbage.
Description
Technical Field
The invention relates to the technical field of garbage treatment, in particular to a detection method of a garbage classification model.
Background
The classification of municipal solid waste has been carried out for many years, but the current situation is not satisfactory. Mainly due to the weak consciousness of people, there is no concept for garbage classification. When people put garbage into the garbage can, firstly, people are afraid of trouble and do not want to classify and put garbage, and secondly, people do not understand how to classify the garbage, so that people often simply put the garbage into the garbage can at will due to the two reasons, and the classification of the garbage is not enough in society. In order to solve the technical problems, the main scheme of the prior art for garbage classification is to give a prompt or remind a throwing person to classify garbage in a more friendly mode, so that the problems are not solved fundamentally, and the garbage classification is not intelligent enough.
The most important link is to separate and classify the garbage, and then utilize the separated garbage according to the characteristics of the garbage, the existing garbage classification only simply depends on manual work, the manual work efficiency is low, mistakes are easy to occur, and the high requirement of urban garbage resource recycling cannot be met.
At present, for example, a garbage classification evaluation method based on image recognition and two-dimensional code recognition technology is disclosed in patent application with the patent application number CN201610056777.9, and a garbage classification robot and a garbage recognition and classification method thereof are disclosed in patent application with the patent application number CN201310091764.1, but the existing image processing technology is not mature enough and the image recognition algorithm is various, the identification of target objects is limited by software recognition such as image processing, and the result of image processing is influenced by factors such as environment and equipment to a large extent, so that the garbage classification has errors.
Disclosure of Invention
The invention mainly aims at the technical problems that the existing detection method of the garbage classification model is low in identification accuracy and working efficiency, and provides the detection method of the garbage classification model.
The purpose of the invention is mainly realized by the following scheme: a detection method of a garbage classification model comprises the following steps;
step 1, image preprocessing.
The method comprises the steps of firstly obtaining a garbage image from a CCD camera, then calculating a threshold value of garbage edge detection in a background environment, setting a subsequent detection threshold value as the threshold value, and removing background noise by adopting a weighted local linear embedding method to improve the identification efficiency.
And 2, searching the contour.
And carrying out Canny edge detection according to the set threshold, searching the outline meeting certain conditions for the result image, reserving the maximum outline, and drawing the minimum circumscribed rectangle.
And step 3, acquiring HOG characteristics.
The image is divided into pyramid levels, the gradient direction is divided into N spaces, a feature vector of each level is formed, HOG of each region in each layer is summed, HOG description sub-vectors of a target image to be trained are finally formed, HOG features in a sample image are merged and extracted, the HOG features can describe local information of the image in detail, and the process of extracting the garbage image information can be more efficient.
And 4, establishing an identification model of the SVM algorithm.
And adjusting the values of the neighborhood K and the parameter α through the image characteristics to obtain the optimal parameters of the HOG characteristics, training the SVM by using the descriptor vector and storing model data, obtaining a needed garbage classification recognition model through the trained SVM classifier, and carrying out target detection on the training data so as to classify the garbage in the target image.
The weighted local linear embedding algorithm increases the important value of the sample on the basis of the traditional local linear embedding algorithm, reduces noise points and sample outer points, enhances the robustness of the algorithm, has small calculation complexity and is easy to realize, and the retained local characteristics, including the distance between sample points, are slightly influenced by noise.
The HOG, namely, the histogram of directional gradients, is a feature for describing local textures of an image, and the histogram is obtained by calculating values of gradients in different directions in a certain region of the image and accumulating the values, and the histogram can be used as a feature to represent the region and further can be input into a classifier for classification.
Among them, the SVM, i.e. the support vector machine, is a supervised learning algorithm, and is generally used for classification and pattern recognition.
The Canny edge detection algorithm is a multi-stage edge detection algorithm. The Canny edge detection algorithm can be divided into the following 5 steps: applying gaussian filtering to smooth the image with the aim of removing noise; finding an intensity gradient of the image; applying non-maximum suppression technology to eliminate edge false detection; applying a dual threshold approach to determine possible potential boundaries; the boundaries are tracked using a hysteresis technique.
The CCD is a semiconductor device which can convert an optical image into a digital signal, is an ideal CCD camera element, and a CCD camera formed by the CCD camera has a small size, a light weight, is not affected by a magnetic field, and has vibration and impact resistance, and thus is widely used.
The detection method of the garbage classification model provided by the invention starts from the garbage principle of machine vision, and performs target classification on garbage by using a machine vision experiment platform on the basis of an image processing algorithm. The invention has the following advantages: the weighted local linear embedding algorithm fully excavates the class information among samples and improves the identification efficiency of the image. In addition, the method can well master the global characteristics of the images, is low in cost, can obtain the classification of the garbage by only acquiring the images by one camera, is high in identification accuracy, and can effectively improve the working efficiency.
In the description of the present invention, it is to be noted that, unless otherwise explicitly specified or limited, the term "connected" is to be interpreted broadly, e.g. as a fixed connection, a detachable connection, or an integral connection; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The following describes in further detail embodiments of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments are clearly and completely described below, and the following embodiments are used for illustrating the present invention and are not used for limiting the scope of the present invention.
The following describes specific embodiments of the present invention in detail with reference to the technical solutions.
Example (b): by adopting the detection method of the garbage classification model provided by the invention, three types of garbage are selected, each type of garbage takes 5 different postures for testing, and for each posture, as long as the rotation angles of the garbage around the x axis and the y axis are unchanged, the structure of the garbage is not changed, and the garbage belongs to one type of garbage. Its rotation angle about the x and y axes is fixed and then randomly rotated about the z axis while also randomly translated a random small distance along the x and y directions. For each posture, 200 pictures were taken, and a total of 3000 pictures were tested, and the test results are shown in table 1.
From table 1, it can be seen that the average accuracy of each posture classification is 98.03%, the overall accuracy is high, and the probable reason why some posture classifications are wrong is that garbage is identified by using the HOG algorithm and is greatly influenced by illumination, and garbage in a test picture is randomly offset, so that the change of surface illumination intensity finally influences the test result; meanwhile, the 3 rd posture of the garbage 1, the 2 nd posture of the garbage 2 and the 1 st posture of the garbage 3 are low in test accuracy, and the posture of a wrongly-divided picture is close to the postures of other types through careful observation, so that the classification is finally inevitable to be wrong.
Although the present invention has been described with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the present invention, and it is intended that all matter contained in the above description or shown in the accompanying drawings shall be interpreted as illustrative and not in a limiting sense, and that all changes, equivalents and modifications that fall within the true spirit and scope of the present invention are intended to be embraced by the present invention
TABLE 1 Experimental test results for three types of garbage
Claims (4)
1. A detection method of a garbage classification model comprises the following steps; step 1: image preprocessing, step 2: searching for the contour, and step 3: obtaining HOG characteristics, and step 4: establishing a recognition model of the SVM algorithm, wherein the step 3 comprises the following steps: the image is divided into pyramid levels, the gradient direction is divided into N spaces, a feature vector of each level is formed, HOG of each region in each layer is summed, HOG description sub-vectors of a target image to be trained are finally formed, HOG features in a sample image are merged and extracted, the HOG features can describe local information of the image in detail, and the process of extracting the garbage image information can be more efficient.
2. The method for detecting the garbage classification model according to claim 1, wherein the step 4 comprises the steps of adjusting the values of the neighborhood K and the parameter α through image features to obtain the optimal parameters of HOG features, training an SVM by using a descriptor vector and storing model data, obtaining a needed garbage classification recognition model through a trained SVM classifier, and carrying out target detection on the training data to classify garbage in the target image.
3. The method for detecting a garbage classification model according to claim 2, wherein the step 2 comprises: and carrying out Canny edge detection according to the set threshold, searching the outline meeting certain conditions for the result image, reserving the maximum outline, and drawing the minimum circumscribed rectangle.
4. The method for detecting a garbage classification model according to claim 3, wherein the step 1 comprises: the method comprises the steps of firstly obtaining a garbage image from a CCD camera, then calculating a threshold value of garbage edge detection in a background environment, setting a subsequent detection threshold value as the threshold value, and removing background noise by adopting a weighted local linear embedding method to improve the identification efficiency.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811446298.3A CN111242151A (en) | 2018-11-29 | 2018-11-29 | Detection method of garbage classification model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811446298.3A CN111242151A (en) | 2018-11-29 | 2018-11-29 | Detection method of garbage classification model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111242151A true CN111242151A (en) | 2020-06-05 |
Family
ID=70872538
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811446298.3A Pending CN111242151A (en) | 2018-11-29 | 2018-11-29 | Detection method of garbage classification model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111242151A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112489067A (en) * | 2020-12-04 | 2021-03-12 | 合肥工业大学 | Sweeper control method and sweeper operated by adopting same |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663448A (en) * | 2012-03-07 | 2012-09-12 | 北京理工大学 | Network based augmented reality object identification analysis method |
US20160364849A1 (en) * | 2014-11-03 | 2016-12-15 | Shenzhen China Star Optoelectronics Technology Co. , Ltd. | Defect detection method for display panel based on histogram of oriented gradient |
-
2018
- 2018-11-29 CN CN201811446298.3A patent/CN111242151A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663448A (en) * | 2012-03-07 | 2012-09-12 | 北京理工大学 | Network based augmented reality object identification analysis method |
US20160364849A1 (en) * | 2014-11-03 | 2016-12-15 | Shenzhen China Star Optoelectronics Technology Co. , Ltd. | Defect detection method for display panel based on histogram of oriented gradient |
Non-Patent Citations (2)
Title |
---|
卜伟 等: "基于图像边缘特征的零件分类与定位算法" * |
申晓霞 等: "基于Kinect和金字塔特征的行为识别算法" * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112489067A (en) * | 2020-12-04 | 2021-03-12 | 合肥工业大学 | Sweeper control method and sweeper operated by adopting same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017190574A1 (en) | Fast pedestrian detection method based on aggregation channel features | |
CN110688987A (en) | Pedestrian position detection and tracking method and system | |
CN108564814B (en) | Image-based parking lot parking space detection method and device | |
CN105740780B (en) | Method and device for detecting living human face | |
CN112686812B (en) | Bank card inclination correction detection method and device, readable storage medium and terminal | |
CN109815850A (en) | Iris segmentation and localization method, system, device based on deep learning | |
CN106845487A (en) | A kind of licence plate recognition method end to end | |
CN109460704B (en) | Fatigue detection method and system based on deep learning and computer equipment | |
CN106384345B (en) | A kind of image detection and flow statistical method based on RCNN | |
KR101697161B1 (en) | Device and method for tracking pedestrian in thermal image using an online random fern learning | |
CN111582126B (en) | Pedestrian re-recognition method based on multi-scale pedestrian contour segmentation fusion | |
CN106709500B (en) | Image feature matching method | |
CN103198319B (en) | For the blurred picture Angular Point Extracting Method under the wellbore environment of mine | |
CN105760858A (en) | Pedestrian detection method and apparatus based on Haar-like intermediate layer filtering features | |
CN111695373B (en) | Zebra stripes positioning method, system, medium and equipment | |
Ji et al. | Integrating visual selective attention model with HOG features for traffic light detection and recognition | |
CN104915642B (en) | Front vehicles distance measuring method and device | |
CN114693661A (en) | Rapid sorting method based on deep learning | |
CN114842397A (en) | Real-time old man falling detection method based on anomaly detection | |
CN112784712B (en) | Missing child early warning implementation method and device based on real-time monitoring | |
CN110599463A (en) | Tongue image detection and positioning algorithm based on lightweight cascade neural network | |
CN109063669B (en) | Bridge area ship navigation situation analysis method and device based on image recognition | |
CN111724566A (en) | Pedestrian falling detection method and device based on intelligent lamp pole video monitoring system | |
CN107045630B (en) | RGBD-based pedestrian detection and identity recognition method and system | |
CN110458019B (en) | Water surface target detection method for eliminating reflection interference under scarce cognitive sample condition |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200605 |