CN112883921A - Garbage can overflow detection model training method and garbage can overflow detection method - Google Patents

Garbage can overflow detection model training method and garbage can overflow detection method Download PDF

Info

Publication number
CN112883921A
CN112883921A CN202110304591.1A CN202110304591A CN112883921A CN 112883921 A CN112883921 A CN 112883921A CN 202110304591 A CN202110304591 A CN 202110304591A CN 112883921 A CN112883921 A CN 112883921A
Authority
CN
China
Prior art keywords
garbage
training
detection model
monitoring
picture set
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
Application number
CN202110304591.1A
Other languages
Chinese (zh)
Inventor
魏巍
杨建权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing E Hualu Information Technology Co Ltd
Original Assignee
Beijing E Hualu Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing E Hualu Information Technology Co Ltd filed Critical Beijing E Hualu Information Technology Co Ltd
Priority to CN202110304591.1A priority Critical patent/CN112883921A/en
Publication of CN112883921A publication Critical patent/CN112883921A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a garbage can overflow detection model training method and a garbage can overflow detection method, wherein the garbage can overflow detection model training method comprises the following steps: acquiring a first monitoring picture set; labeling the first monitoring picture set to obtain a garbage can training picture set; training the first machine learning model by utilizing a garbage can training picture set to obtain a garbage can detection model; detecting the second monitoring picture set by using a garbage can detection model to obtain a garbage can picture set; labeling the garbage bin picture set to obtain a garbage overflow training picture set; training the second machine learning model by utilizing the garbage overflow training picture set to obtain a garbage overflow detection model; and fusing the garbage bin overflow detection model and the garbage overflow detection model to obtain the garbage bin overflow detection model. The intelligent garbage bin detection system can intelligently detect the garbage bin on the urban road through the trained garbage bin overflow detection model, so that garbage can be cleaned in time, and waste of human resources is reduced.

Description

Garbage can overflow detection model training method and garbage can overflow detection method
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a garbage can overflow detection model training method and a garbage can overflow detection method.
Background
In urban construction, timely and effective treatment of garbage in the garbage can is one of important factors influencing urban civilized construction. In the related art, the method for detecting the overflow of the garbage can is that a sanitation worker manually inspects the garbage can, which not only wastes time and energy of the sanitation worker, but also wastes a certain financial resource for the sanitation department to distribute the sanitation worker to each area. Therefore, a training method of the garbage bin overflow detection model is urgently needed to train the garbage bin overflow detection model so as to intelligently detect whether the garbage in the garbage bin is overflow or not.
Disclosure of Invention
Therefore, the technical problem to be solved by the invention is to overcome the defect of human resource waste caused by manual inspection of overflow of the trash can in the prior art, so that a trash can overflow detection model training method and a trash can overflow detection method are provided.
According to a first aspect, the invention discloses a garbage can overflow detection model training method, which comprises the following steps: acquiring a first monitoring picture set; labeling the first monitoring picture set to obtain a garbage can training picture set; training a first machine learning model by using the garbage can training picture set to obtain a garbage can detection model; detecting a second monitoring picture set by using the garbage can detection model to obtain a garbage can picture set; labeling the garbage bin picture set to obtain a garbage overflow training picture set; training a second machine learning model by using the garbage overflow training picture set to obtain a garbage overflow detection model; and fusing the garbage bin detection model and the garbage overflow detection model to obtain a garbage bin overflow detection model.
Optionally, each picture in the first monitoring picture set includes a trash can, and the acquiring the first monitoring picture set includes: acquiring a plurality of initial monitoring image sets; screening according to the identification information of each initial monitoring image set to obtain a target monitoring image set, wherein the images in the target monitoring image set comprise trash cans; performing frame extraction processing on the target monitoring image set to obtain a plurality of monitoring images; and deleting the monitoring pictures which do not meet the preset conditions to obtain the first monitoring picture set.
Optionally, the deleting the monitoring picture which does not satisfy the preset condition includes: respectively determining the hash value of each monitoring picture; determining the distance of the Hash values between every two monitoring pictures; and deleting any picture of which the distance is smaller than a preset distance threshold.
Optionally, the utilize garbage bin training picture set trains first machine learning model, obtains garbage bin detection model, includes: classifying the garbage can training picture sets to obtain various garbage can training picture sets; and training a plurality of first machine learning models by utilizing the plurality of garbage can training picture sets to obtain a plurality of garbage can detection models, wherein the number of the first machine learning models is the same as the number of the types of the garbage can training picture sets.
Optionally, the first machine learning model and the second machine learning model are both YOLOv5m models.
According to a second aspect, the invention also discloses a method for detecting overflow of the garbage can, which comprises the following steps: acquiring a monitoring video to be detected; performing frame extraction processing on the monitored video to be detected to obtain a monitored picture to be detected; and inputting the monitoring picture to be detected into a garbage bin overflow detection model for detection to obtain a detection result, wherein the garbage bin overflow detection model is obtained by training through the garbage bin overflow detection model training method in the first aspect or any optional embodiment of the first aspect.
According to a third aspect, the invention also discloses a training device for the overflow detection model of the garbage can, which comprises: the first monitoring picture set acquisition module is used for acquiring a first monitoring picture set; the first labeling module is used for labeling the first monitoring picture set to obtain a garbage bin training picture set; the first training module is used for training a first machine learning model by utilizing the garbage can training picture set to obtain a garbage can detection model; the garbage bin detection module is used for detecting the second monitoring picture set by using the garbage bin detection model to obtain a garbage bin picture set; the second labeling module is used for labeling the garbage bin picture set to obtain a garbage overflow training picture set; the second training module is used for training a second machine learning model by utilizing the garbage overflow training picture set to obtain a garbage overflow detection model; and the fusion module is used for fusing the garbage bin detection model and the garbage overflow detection model to obtain a garbage bin overflow detection model.
According to a fourth aspect, the invention also discloses a trash can overflow detection device, comprising: the monitoring video acquisition module to be detected is used for acquiring the monitoring video to be detected; the frame extracting module is used for carrying out frame extracting processing on the monitoring video to be detected to obtain a monitoring picture to be detected; the garbage bin overflow detection module is configured to input the monitoring picture to be detected into a garbage bin overflow detection model for training to obtain a detection result, and the garbage bin overflow detection model is obtained by training through the garbage bin overflow detection model training method according to the first aspect or any optional implementation manner of the first aspect.
According to a fifth aspect, the present invention also discloses a computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the method for training a trash can overflow detection model according to the first aspect or any one of the optional embodiments of the first aspect or the steps of the method for detecting trash can overflow according to the second aspect.
According to a sixth aspect, the present invention further discloses a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the training method for a trash can overflow detection model according to the first aspect or any one of the optional embodiments of the first aspect, or the steps of the method for detecting trash can overflow according to the second aspect.
The technical scheme of the invention has the following advantages:
1. the method comprises the steps of obtaining a first monitoring picture set, labeling the first monitoring picture set to obtain a garbage bin training picture set, training a first machine learning model by using the garbage bin training picture set to obtain a garbage bin detection model, detecting a second monitoring picture set by using the garbage bin detection model to obtain a garbage bin picture set, labeling the garbage bin picture set to obtain a garbage overfilling training picture set, training the second machine learning model by using the garbage overfilling training picture set to obtain a garbage overfilling detection model, and fusing the garbage bin detection model and the garbage overfilling detection model to obtain the garbage bin overfilling detection model. According to the method, a garbage bin overflow detection model is trained firstly, then a garbage overflow detection model is trained, then the two models are fused to obtain the garbage bin overflow detection model, and the garbage bin overflow detection model is used for intelligently detecting overflow of the garbage bin on the urban road, so that the garbage bin overflow detection model is convenient to clean in time, and waste of human resources caused by human supervision is reduced.
2. According to the garbage bin overflow detection method and device, the monitoring video to be detected is obtained, frame extraction processing is conducted on the monitoring video to be detected to obtain the monitoring picture to be detected, the monitoring picture to be detected is input into a garbage bin overflow detection model to be detected to obtain a detection result, and the garbage bin overflow detection model is obtained through training of a garbage bin overflow detection model training method. According to the invention, the overflow condition of the garbage can is intelligently detected in real time through the garbage can overflow detection model, so that the waste of human resources is reduced, the garbage is timely treated, and the clean environment is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart illustrating a specific example of a garbage bin overfill detection model training method in an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an exemplary method for detecting overflow of a trash can according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a specific example of a training apparatus for a garbage bin overfill detection model in an embodiment of the present invention;
FIG. 4 is a diagram illustrating an exemplary embodiment of an overflow detection device for a trash can;
FIG. 5 is a diagram of an exemplary computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention discloses a garbage can overflow detection model training method, which comprises the following steps as shown in figure 1:
s11: and acquiring a first monitoring picture set.
For example, the first monitoring picture set may be a set of pictures with a trash can and pictures without a trash can, or may be a set of pictures with a trash can. The first monitoring picture set can be directly obtained from monitoring equipment managed and controlled by a city management department, and can also be obtained from search engine searching. The first monitoring picture set and the method for acquiring the first monitoring picture set are not particularly limited, and can be determined by a person skilled in the art according to actual conditions.
The pictures are acquired from the urban management department management and control monitoring equipment, the data volume is large, the pictures are easy to acquire, the accuracy of the model obtained by training is high, extra equipment and manpower are not needed, and the cost is saved.
S12: and marking the first monitoring picture set to obtain a garbage can training picture set.
Illustratively, the garbage can training picture set is a set of pictures after labeling the garbage can. The labeling of the first monitoring picture set may be manually labeling the pictures in the first monitoring picture set, or may be automatically labeling by using a model trained in advance. In order to obtain an accurate garbage bin training picture set, in the embodiment of the invention, the labeling result can be rechecked.
S13: and training the first machine learning model by utilizing the garbage can training picture set to obtain a garbage can detection model.
For example, training the first machine learning model using the garbage can training picture set may be supervised or unsupervised training of the first machine learning model. The training method is not particularly limited in the embodiments of the present invention, and can be determined by those skilled in the art according to actual situations. The first machine learning model may be YOLO or YOLOv5, and the first machine learning model is not specifically limited in the embodiment of the present invention and may be determined by a person skilled in the art according to actual conditions.
The embodiment of the invention adopts a YOLOv5m model for training. The YOLO model is adopted as a single-stage target detection model, the detection speed is high, the model stability is good, YOLOv5 has higher flexibility and higher speed, and the model has strong advantages in rapid deployment.
S14: and detecting the second monitoring picture set by using the garbage can detection model to obtain a garbage can picture set.
For example, the second monitoring picture set may be a set of pictures with a trash can and pictures without a trash can, or may be a set of pictures with a trash can. The obtaining method is the same as the first monitoring picture set. However, in the embodiment of the present invention, the second monitoring photo set is different from the first monitoring photo set. The garbage can picture set refers to a set of garbage can pictures.
And detecting the second monitoring picture set by using the garbage can detection model, and cutting out all garbage cans on the pictures in the second monitoring picture set to obtain a garbage can picture set.
S15: and marking the picture set of the garbage can to obtain a garbage overflow training picture set.
Illustratively, the garbage overfill training picture set is a set of pictures after the garbage can is annotated whether it is overfilled. The labeling of the picture set of the trash can be manually labeling the pictures in the picture set of the trash can, and can also be automatically labeled by using a model trained in advance. In order to obtain an accurate garbage overflow training picture set, in the embodiment of the invention, the annotation result can be rechecked.
S16: and training the second machine learning model by utilizing the garbage overflow training picture set to obtain a garbage overflow detection model.
For example, the second machine learning model may be the same as or different from the first machine learning model, and the second machine learning model is not particularly limited in the implementation of the present invention and may be determined by those skilled in the art according to actual situations. In the implementation of the present invention, the second machine learning model is also a YOLOv5m model.
Training the first machine learning model using the garbage can training picture set may be supervised or unsupervised training of the first machine learning model. The training method is not particularly limited in the embodiments of the present invention, and can be determined by those skilled in the art according to actual situations.
S17: and fusing the garbage bin overflow detection model and the garbage overflow detection model to obtain the garbage bin overflow detection model. In the embodiment of the invention, the garbage bin overflow detection model and the garbage overflow detection model are directly connected in series to obtain the garbage bin overflow detection model.
The invention provides a garbage bin overfill detection model training method, which comprises the steps of obtaining a first monitoring picture set, labeling the first monitoring picture set to obtain a garbage bin training picture set, training a first machine learning model by using the garbage bin training picture set to obtain a garbage bin detection model, detecting a second monitoring picture set by using the garbage bin detection model to obtain a garbage bin picture set, labeling the garbage bin picture set to obtain a garbage overfill training picture set, training the second machine learning model by using the garbage overfill training picture set to obtain a garbage overfill detection model, and fusing the garbage bin detection model and the garbage overfill detection model to obtain the garbage bin overfill detection model. According to the method, a garbage bin overflow detection model is trained firstly, then a garbage overflow detection model is trained, then the two models are fused to obtain the garbage bin overflow detection model, the garbage bin overflow detection model is used for intelligently detecting overflow of the garbage bin on the urban road, so that the garbage bin overflow detection model is convenient to clean in time, waste of human resources caused by human supervision is reduced, and meanwhile, the garbage bin detection model can be suitable for various scenes with monitoring videos, and is high in transportability and good in applicability.
As an optional implementation manner of the embodiment of the present invention, when each picture in the first monitoring picture set includes a trash can, the step S11 includes:
first, a plurality of initial monitoring image sets are acquired. Each initial monitoring image set corresponds to one image pickup device, and the embodiment of the invention can acquire videos shot by a plurality of image pickup devices.
And secondly, screening according to the identification information of each initial monitoring image set to obtain a target monitoring image set, wherein the images in the target monitoring image set comprise trash cans.
Illustratively, the identification information may be an ID number of the image pickup apparatus. And determining whether a trash can exists in the shooting range of the camera according to the ID number of the camera, and deleting the initial monitoring image set of the camera without the trash can to obtain a target monitoring image set.
And thirdly, performing frame extraction processing on the target monitoring picture set to obtain a plurality of monitoring pictures.
For example, the frame extraction processing on the target monitoring picture set may be performed at preset time intervals (e.g., 5s) or at preset frame intervals (e.g., 2 frames). The frame extraction processing method is not particularly limited in the embodiment of the present invention, and those skilled in the art can determine the frame extraction processing method according to actual situations.
And deleting the monitoring pictures which do not meet the preset conditions to obtain a first monitoring picture set. The preset condition may be any one of 2 pictures having a similarity greater than a preset threshold (e.g., 90%).
According to the embodiment of the invention, the acquired video monitoring is preprocessed, so that the acquired images in the first monitoring image set all comprise garbage cans, the number of training images is reduced, and the model training speed is increased.
As an optional implementation manner of the embodiment of the present invention, the deleting the monitoring picture that does not satisfy the preset condition includes:
first, the hash value of each monitoring picture is determined.
Illustratively, the hash value may be determined by a difference hash algorithm, a mean hash algorithm, a perceptual hash algorithm, or a wavelet hash algorithm. The method for determining the hash value in the embodiment of the present invention is not particularly limited, and those skilled in the art may determine the hash value according to actual situations.
Secondly, determining the distance of the hash value between every two monitoring pictures.
Illustratively, the distance may be a euclidean distance or a hamming distance. The distance is not particularly limited in the embodiments of the present invention, and can be determined by those skilled in the art according to actual situations. The embodiment of the present invention will be described by taking the euclidean distance as an example.
And deleting any picture with the distance smaller than the preset distance threshold.
Illustratively, the preset distance threshold may be 4. The preset distance threshold is not specifically limited in the embodiment of the present invention, and may be determined by a person skilled in the art according to actual conditions. And when the distance between the 2 pictures is less than 4, determining that the similarity of the 2 pictures is large, and deleting any one of the 2 pictures.
As an optional implementation manner of the embodiment of the present invention, the step S13 includes:
firstly, classifying the garbage can training picture sets to obtain various garbage can training picture sets.
For example, classifying the garbage can training picture set may be classified according to garbage can types, such as street garbage cans, blue circular garbage cans, community garbage cans, and the like. The above classification method is only a specific classification example, and other classification methods may also be used for classification in the embodiments of the present invention.
Secondly, a plurality of first machine learning models are trained by utilizing a plurality of garbage can training picture sets to obtain a plurality of garbage can detection models, and the number of the first machine learning models is the same as the number of the types of the garbage can training picture sets.
Illustratively, a garbage bin detection model is trained for each garbage bin training picture set, for example, a street garbage bin training picture set is trained using a first machine learning model to obtain a street garbage bin detection model; training a blue circular garbage can training picture set by using a first machine learning model to obtain a blue circular garbage can detection model; and training the community garbage can training picture set by using the first machine learning model to obtain a community garbage can detection model.
According to the embodiment of the invention, the accuracy of model detection is higher by training various garbage can detection models.
The embodiment of the invention also discloses a method for detecting overflow of the garbage can, which comprises the following steps as shown in fig. 2:
s21: and acquiring the monitoring video to be detected.
For example, the monitoring video to be detected may be an offline monitoring video, or may be a real-time transmitted city street video. The obtaining method is the same as the obtaining method of the initial monitoring image set, and is not described herein again. After the surveillance video to be detected is acquired, the video not including the trash can be screened according to the ID information of the camera equipment for shooting the surveillance video to be detected, and the workload of the processor is reduced.
S22: and performing frame extraction processing on the monitoring video to be detected to obtain a monitoring picture to be detected. In the specific implementation method, reference is made to the description of the step "performing frame extraction processing on the target monitoring image set to obtain a plurality of monitoring images", which is not described herein again.
S23: and inputting the monitoring picture to be detected into a garbage bin overflow detection model for detection to obtain a detection result, wherein the garbage bin overflow detection model is obtained by the embodiment training of the garbage bin overflow detection model training method.
For example, the monitoring pictures to be detected are input into the trash can overflow detection model to be detected one by one, namely, the monitoring pictures are input into the trash can detection model to be detected, the trash cans next to each other are detected as a whole, the separate trash cans are detected separately, in order to prevent false detection, the confidence coefficient of the trash can detection model is set to be 0.6, and the detection result with the confidence coefficient larger than or equal to 0.6 is reserved. And then inputting the detected garbage can picture into a garbage overflow detection model for detection, setting the confidence coefficient of the garbage overflow detection model to be 0.8 in order to prevent false detection, and if the confidence coefficient is greater than or equal to 0.8, determining that the garbage overflow condition exists.
The confidence 0.6 of the garbage bin detection model and the confidence 0.8 of the garbage overfill detection model are both a specific implementation manner, and are not limited to the present invention, and those skilled in the art may also implement other implementation manners.
When a certain garbage can is detected to be full immediately or the same garbage can is detected to be full for a preset number of times (for example, 5 times) or for a preset time (for example, 2 minutes), warning information can be sent out to prompt related personnel to clean in time, and the warning information can be sound information (for example, a buzzer) or text information (for example, text that "the garbage can is full" is displayed on a picture). The sending time of the warning information and the warning information are not particularly limited, and can be determined by a person skilled in the art according to actual conditions.
The garbage bin overflow detection method provided by the invention comprises the steps of obtaining a monitoring video to be detected, carrying out frame extraction processing on the monitoring video to be detected to obtain a monitoring picture to be detected, inputting the monitoring picture to be detected into a garbage bin overflow detection model for detection to obtain a detection result, and training the garbage bin overflow detection model by a garbage bin overflow detection model training method. The overflow condition of the garbage can is intelligently detected in real time through the garbage can overflow detection model, waste of human resources is reduced, garbage is timely treated, the environment is ensured to be clean, and meanwhile, the garbage can detection model can be suitable for various scenes with monitoring videos, and is high in transportability and good in applicability.
The embodiment of the invention also discloses a training device for the overflow detection model of the garbage can, which comprises the following components as shown in fig. 3:
a first monitoring picture set obtaining module 31, configured to obtain a first monitoring picture set; the specific implementation manner is described in the above embodiment in relation to step S11, and is not described herein again.
The first labeling module 32 is configured to label the first monitoring picture set to obtain a garbage bin training picture set; the specific implementation manner is described in the above embodiment in relation to step S12, and is not described herein again.
The first training module 33 is configured to train the first machine learning model by using the garbage can training picture set to obtain a garbage can detection model; the specific implementation manner is described in the above embodiment in relation to step S13, and is not described herein again.
The garbage bin detection module 34 is configured to detect the second monitoring picture set by using a garbage bin detection model to obtain a garbage bin picture set; the specific implementation manner is described in the above embodiment in relation to step S14, and is not described herein again.
The second labeling module 35 is configured to label the garbage bin picture set to obtain a garbage overflow training picture set; the specific implementation manner is described in the above embodiment in relation to step S15, and is not described herein again.
A second training module 36, configured to train a second machine learning model by using the garbage overflow training picture set, so as to obtain a garbage overflow detection model; the specific implementation manner is described in the above embodiment in relation to step S16, and is not described herein again.
And the fusion module 37 is configured to fuse the garbage bin detection model and the garbage overflow detection model to obtain a garbage bin overflow detection model. The specific implementation manner is described in the above embodiment in relation to step S17, and is not described herein again.
The garbage bin overfill detection model training device provided by the invention is used for obtaining a garbage bin training picture set by obtaining a first monitoring picture set and marking the first monitoring picture set, training a first machine learning model by using the garbage bin training picture set to obtain a garbage bin detection model, detecting a second monitoring picture set by using the garbage bin detection model to obtain a garbage bin picture set, marking the garbage bin picture set to obtain a garbage overfill training picture set, training the second machine learning model by using the garbage overfill training picture set to obtain a garbage overfill detection model, and fusing the garbage bin detection model and the garbage overfill detection model to obtain the garbage bin overfill detection model. According to the method, a garbage bin overflow detection model is trained firstly, then a garbage overflow detection model is trained, then the two models are fused to obtain the garbage bin overflow detection model, the garbage bin overflow detection model is used for intelligently detecting overflow of the garbage bin on the urban road, so that the garbage bin overflow detection model is convenient to clean in time, waste of human resources caused by human supervision is reduced, and meanwhile, the garbage bin detection model can be suitable for various scenes with monitoring videos, and is high in transportability and good in applicability.
As an optional implementation manner of the embodiment of the present invention, the first monitoring photo set obtaining module 31 includes:
an initial monitoring image set obtaining module, configured to obtain a plurality of initial monitoring image sets; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The screening module is used for screening according to the identification information of each initial monitoring image set to obtain a target monitoring image set, and the images in the target monitoring image set all comprise trash cans; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The frame extraction processing module is used for carrying out frame extraction processing on the target monitoring image set to obtain a plurality of monitoring images; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the deleting module is used for deleting the monitoring pictures which do not meet the preset conditions to obtain a first monitoring picture set. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the deleting module includes:
and the first determining module is used for respectively determining the hash value of each monitoring picture. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the second determining module is used for determining the distance of the hash value between every two monitoring pictures. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the deleting submodule is used for deleting any picture of which the distance is smaller than a preset distance threshold. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the first training module 33 includes:
and the classification module is used for classifying the garbage can training picture sets to obtain various garbage can training picture sets. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The first training submodule is used for training a plurality of first machine learning models by utilizing a plurality of garbage can training picture sets to obtain a plurality of garbage can detection models, and the number of the first machine learning models is the same as the number of the types of the garbage can training picture sets. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, both the first machine learning model and the second machine learning model are YOLOv5m models. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The embodiment of the invention also discloses a garbage bin overflow detection device, as shown in fig. 4, comprising:
and a to-be-detected monitoring video obtaining module 41, configured to obtain a to-be-detected monitoring video. The specific implementation manner is described in the above embodiment in relation to step S21, and is not described herein again.
And the frame extracting module 42 is configured to perform frame extraction processing on the monitoring video to be detected to obtain a monitoring picture to be detected. The specific implementation manner is described in the above embodiment in relation to step S22, and is not described herein again.
The trash can overflow detection module 43 is configured to input the monitoring picture to be detected into a trash can overflow detection model for training to obtain a detection result, and the trash can overflow detection model is obtained through the training of the trash can overflow detection model training method. The specific implementation manner is described in the above embodiment in relation to step S23, and is not described herein again.
The trash can overflow detection device provided by the invention obtains a to-be-detected monitoring video, performs frame extraction on the to-be-detected monitoring video to obtain a to-be-detected monitoring picture, inputs the to-be-detected monitoring picture into a trash can overflow detection model for detection to obtain a detection result, and the trash can overflow detection model is obtained by training through a trash can overflow detection model training method. According to the invention, the overflow condition of the garbage can is intelligently detected in real time through the garbage can overflow detection model, so that the waste of human resources is reduced, the garbage is timely treated, and the clean environment is ensured.
An embodiment of the present invention further provides a computer device, as shown in fig. 5, the computer device may include a processor 51 and a memory 52, where the processor 51 and the memory 52 may be connected by a bus or in another manner, and fig. 5 takes the example of connection by a bus as an example.
The processor 51 may be a Central Processing Unit (CPU). The Processor 51 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 52 is a non-transitory computer readable storage medium, and can be used to store a non-transitory software program, a non-transitory computer executable program, and program instructions/modules corresponding to the garbage bin overflow detection model training method or the garbage bin overflow detection method in the embodiment of the present invention (for example, the first monitoring picture set obtaining module 31, the first labeling module 32, the first training module 33, the garbage bin detection module 34, the second labeling module 35, the second training module 36, and the fusion module 37 shown in fig. 3, or the to-be-detected monitoring video obtaining module 41, the frame extracting module 42, and the garbage bin overflow detection module 43 shown in fig. 4). The processor 51 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 52, namely, implementing the garbage can overflow detection model training method or the garbage can overflow detection method in the above method embodiments.
The memory 52 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 51, and the like. Further, the memory 52 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 52 may optionally include memory located remotely from the processor 51, and these remote memories may be connected to the processor 51 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 52 and, when executed by the processor 51, perform a garbage can overflow detection model training method as in the embodiment shown in fig. 1 or a garbage can overflow detection method as shown in fig. 2.
The details of the computer device may be understood by referring to the corresponding descriptions and effects in the embodiments shown in fig. 1 to fig. 2, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A garbage bin overflow detection model training method is characterized by comprising the following steps:
acquiring a first monitoring picture set;
labeling the first monitoring picture set to obtain a garbage can training picture set;
training a first machine learning model by using the garbage can training picture set to obtain a garbage can detection model;
detecting a second monitoring picture set by using the garbage can detection model to obtain a garbage can picture set;
labeling the garbage bin picture set to obtain a garbage overflow training picture set;
training a second machine learning model by using the garbage overflow training picture set to obtain a garbage overflow detection model;
and fusing the garbage bin detection model and the garbage overflow detection model to obtain a garbage bin overflow detection model.
2. The method of claim 1, wherein each picture in the first set of monitoring pictures contains a trash can, and wherein obtaining the first set of monitoring pictures comprises:
acquiring a plurality of initial monitoring image sets;
screening according to the identification information of each initial monitoring image set to obtain a target monitoring image set, wherein the images in the target monitoring image set comprise trash cans;
performing frame extraction processing on the target monitoring image set to obtain a plurality of monitoring images;
and deleting the monitoring pictures which do not meet the preset conditions to obtain the first monitoring picture set.
3. The method according to claim 2, wherein the deleting the monitoring pictures which do not satisfy the preset condition comprises:
respectively determining the hash value of each monitoring picture;
determining the distance of the Hash values between every two monitoring pictures;
and deleting any picture of which the distance is smaller than a preset distance threshold.
4. The method of claim 1, wherein training a first machine learning model using the garbage can training picture set to obtain a garbage can detection model comprises:
classifying the garbage can training picture sets to obtain various garbage can training picture sets;
and training a plurality of first machine learning models by utilizing the plurality of garbage can training picture sets to obtain a plurality of garbage can detection models, wherein the number of the first machine learning models is the same as the number of the types of the garbage can training picture sets.
5. The method of claim 1, wherein the first machine learning model and the second machine learning model are both YOLOv5m models.
6. A garbage bin overflow detection method is characterized by comprising the following steps:
acquiring a monitoring video to be detected;
performing frame extraction processing on the monitored video to be detected to obtain a monitored picture to be detected;
inputting the monitoring picture to be detected into a garbage bin overflow detection model for detection to obtain a detection result, wherein the garbage bin overflow detection model is obtained by training through the garbage bin overflow detection model training method of any one of claims 1 to 5.
7. The utility model provides a garbage bin overflow detection model trainer which characterized in that includes:
the first monitoring picture set acquisition module is used for acquiring a first monitoring picture set;
the first labeling module is used for labeling the first monitoring picture set to obtain a garbage bin training picture set;
the first training module is used for training a first machine learning model by utilizing the garbage can training picture set to obtain a garbage can detection model;
the garbage bin detection module is used for detecting the second monitoring picture set by using the garbage bin detection model to obtain a garbage bin picture set;
the second labeling module is used for labeling the garbage bin picture set to obtain a garbage overflow training picture set;
the second training module is used for training a second machine learning model by utilizing the garbage overflow training picture set to obtain a garbage overflow detection model;
and the fusion module is used for fusing the garbage bin detection model and the garbage overflow detection model to obtain a garbage bin overflow detection model.
8. The utility model provides a garbage bin overflow detection device which characterized in that includes:
the monitoring video acquisition module to be detected is used for acquiring the monitoring video to be detected;
the frame extracting module is used for carrying out frame extracting processing on the monitoring video to be detected to obtain a monitoring picture to be detected;
the garbage bin overflow detection module is used for inputting the monitoring picture to be detected into a garbage bin overflow detection model for training to obtain a detection result, and the garbage bin overflow detection model is obtained by training according to the garbage bin overflow detection model training method of any one of claims 1 to 5.
9. A computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the trash can overflow detection model training method of any of claims 1-5 or the steps of the trash can overflow detection method of claim 6.
10. A computer-readable storage medium, having stored thereon a computer program, the computer program, when being executed by a processor, implementing the steps of the method for garbage can overfill detection model training according to any of the claims 1-5, or the steps of the method for garbage can overfill detection according to claim 6.
CN202110304591.1A 2021-03-22 2021-03-22 Garbage can overflow detection model training method and garbage can overflow detection method Pending CN112883921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110304591.1A CN112883921A (en) 2021-03-22 2021-03-22 Garbage can overflow detection model training method and garbage can overflow detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110304591.1A CN112883921A (en) 2021-03-22 2021-03-22 Garbage can overflow detection model training method and garbage can overflow detection method

Publications (1)

Publication Number Publication Date
CN112883921A true CN112883921A (en) 2021-06-01

Family

ID=76041722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110304591.1A Pending CN112883921A (en) 2021-03-22 2021-03-22 Garbage can overflow detection model training method and garbage can overflow detection method

Country Status (1)

Country Link
CN (1) CN112883921A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378703A (en) * 2021-06-09 2021-09-10 成都恒创新星科技有限公司 Method and system for detecting state of garbage can
CN113420673A (en) * 2021-06-24 2021-09-21 苏州科达科技股份有限公司 Garbage classification method, device, equipment and storage medium
CN113450401A (en) * 2021-07-19 2021-09-28 北京航空航天大学杭州创新研究院 Trash can fullness degree determining method, device and equipment and trash can
CN113468976A (en) * 2021-06-10 2021-10-01 浙江大华技术股份有限公司 Garbage detection method, garbage detection system and computer readable storage medium
CN114119959A (en) * 2021-11-09 2022-03-01 盛视科技股份有限公司 Vision-based garbage can overflow detection method and device
CN114202725A (en) * 2021-12-07 2022-03-18 牧原食品股份有限公司 Biogas slurry overflow monitoring method and system based on intelligent vision
CN114283387A (en) * 2022-03-08 2022-04-05 深圳市万物云科技有限公司 Intelligent garbage point cleaning work order generation method and device and related medium
CN114553907A (en) * 2021-12-27 2022-05-27 山东新一代信息产业技术研究院有限公司 Garbage bin overflow detecting system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6393433B1 (en) * 2018-02-09 2018-09-19 株式会社ビコー Information processing apparatus, information processing method, and program
EP3605416A1 (en) * 2018-08-03 2020-02-05 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for collecting garbage
CN111611948A (en) * 2020-05-25 2020-09-01 陈金山 Urban garbage can overflow detection method based on CIM and block chain
CN112036500A (en) * 2020-09-04 2020-12-04 广东弓叶科技有限公司 Garbage classification method and device based on depth image and multispectral image fusion
CN112052744A (en) * 2020-08-12 2020-12-08 成都佳华物链云科技有限公司 Environment detection model training method, environment detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6393433B1 (en) * 2018-02-09 2018-09-19 株式会社ビコー Information processing apparatus, information processing method, and program
EP3605416A1 (en) * 2018-08-03 2020-02-05 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for collecting garbage
CN111611948A (en) * 2020-05-25 2020-09-01 陈金山 Urban garbage can overflow detection method based on CIM and block chain
CN112052744A (en) * 2020-08-12 2020-12-08 成都佳华物链云科技有限公司 Environment detection model training method, environment detection method and device
CN112036500A (en) * 2020-09-04 2020-12-04 广东弓叶科技有限公司 Garbage classification method and device based on depth image and multispectral image fusion

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378703A (en) * 2021-06-09 2021-09-10 成都恒创新星科技有限公司 Method and system for detecting state of garbage can
CN113468976A (en) * 2021-06-10 2021-10-01 浙江大华技术股份有限公司 Garbage detection method, garbage detection system and computer readable storage medium
CN113420673A (en) * 2021-06-24 2021-09-21 苏州科达科技股份有限公司 Garbage classification method, device, equipment and storage medium
CN113420673B (en) * 2021-06-24 2022-08-02 苏州科达科技股份有限公司 Garbage classification method, device, equipment and storage medium
CN113450401A (en) * 2021-07-19 2021-09-28 北京航空航天大学杭州创新研究院 Trash can fullness degree determining method, device and equipment and trash can
CN114119959A (en) * 2021-11-09 2022-03-01 盛视科技股份有限公司 Vision-based garbage can overflow detection method and device
CN114202725A (en) * 2021-12-07 2022-03-18 牧原食品股份有限公司 Biogas slurry overflow monitoring method and system based on intelligent vision
CN114553907A (en) * 2021-12-27 2022-05-27 山东新一代信息产业技术研究院有限公司 Garbage bin overflow detecting system
CN114283387A (en) * 2022-03-08 2022-04-05 深圳市万物云科技有限公司 Intelligent garbage point cleaning work order generation method and device and related medium
CN114283387B (en) * 2022-03-08 2022-06-24 深圳市万物云科技有限公司 Intelligent garbage point cleaning work order generation method and device and related medium

Similar Documents

Publication Publication Date Title
CN112883921A (en) Garbage can overflow detection model training method and garbage can overflow detection method
CN110084165B (en) Intelligent identification and early warning method for abnormal events in open scene of power field based on edge calculation
CN110689054B (en) Worker violation monitoring method
CN111429726B (en) Monitoring video illegal parking vehicle detection and management method and corresponding system
CN110533950A (en) Detection method, device, electronic equipment and the storage medium of parking stall behaviour in service
CN108319926A (en) A kind of the safety cap wearing detecting system and detection method of building-site
CN111210399B (en) Imaging quality evaluation method, device and equipment
CN109360362A (en) A kind of railway video monitoring recognition methods, system and computer-readable medium
CN111898581A (en) Animal detection method, device, electronic equipment and readable storage medium
CN110956104A (en) Method, device and system for detecting overflow of garbage can
CN113642474A (en) Hazardous area personnel monitoring method based on YOLOV5
CN113420673B (en) Garbage classification method, device, equipment and storage medium
CN113313006B (en) Urban illegal building supervision method, system and storage medium based on unmanned aerial vehicle
WO2022213565A1 (en) Review method and apparatus for prediction result of artificial intelligence model
CN111275984B (en) Vehicle detection method and device and server
CN112733864B (en) Model training method, target detection method, device, equipment and storage medium
CN114170569A (en) Method, system, storage medium and equipment for monitoring road surface abnormal condition
CN113591758A (en) Human behavior recognition model training method and device and computer equipment
CN114627394B (en) Muck vehicle fake plate identification method and system based on unmanned aerial vehicle
CN113850773A (en) Detection method, device, equipment and computer readable storage medium
CN116630866B (en) Abnormal event monitoring method, device, equipment and medium for audio-video radar fusion
CN116071711B (en) Traffic jam condition detection method and device
CN116959099B (en) Abnormal behavior identification method based on space-time diagram convolutional neural network
CN117765348A (en) Target detection model deployment method, target detection method and electronic equipment
CN113239931A (en) Logistics station license plate recognition method

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