Kitchen waste detection method, device, equipment and storage medium
Through the combination of camera video monitoring and detection models, real-time identification and warning of the location of food waste on the ground solves the problems of low cleaning efficiency and high cost in the existing technology, and improves the efficiency and economy of food waste management.
Patent Information
- Application Number
- CN202210508499.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-05-11
AI Technical Summary
Existing technology makes it difficult to detect and clean up food waste discarded on the ground in real time, resulting in low cleaning efficiency and high management costs.
By obtaining the camera video of the garbage dumping area, calling the preset food waste detection model, trash can detection model and pedestrian detection model, real-time monitoring and identification of the location of food waste, generating warning information and sending it to the management terminal to remind the person who discards or Managers clean up.
It realizes real-time monitoring and warning of food waste on the ground, improves cleaning efficiency and reduces management costs.
Smart Images

Figure CN114882407B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a kitchen waste detection method, device, equipment and storage medium. Background Art
[0002] Kitchen waste refers to the garbage generated from residents' daily life and food processing activities. Some people discard kitchen waste at will, causing the kitchen waste to fail to be put into the trash can and fall on the ground. Kitchen waste is not easy to clean and is accompanied by odor, affecting the living environment of the community.
[0003] A common solution is for the property management to divide the community into sections and assign cleaners to patrol each area. When the cleaners see kitchen waste discarded on the ground, they will clean it up to avoid the problem of kitchen waste affecting the environment. However, the cleaning staff cannot find the kitchen waste thrown on the ground in real time, and there is a lag in cleaning behavior. They can only rely on high-frequency patrols by the cleaning staff, which not only has low cleaning efficiency, but also increases management costs. Summary of the invention
[0004] The main purpose of the present invention is to provide a kitchen waste detection method to solve the problem that kitchen waste discarded on the ground cannot be discovered in real time, improve cleaning efficiency and reduce management costs.
[0005] A first aspect of the present invention provides a method for detecting kitchen waste, comprising: acquiring a camera video of a garbage disposal area, decoding the camera video, and obtaining continuous video frames; calling a preset kitchen waste detection model to detect the continuous video frames, and screening out target video frames, wherein the target video frames contain a target object, and the target object is kitchen waste; calling a preset trash can detection model to detect the target video frame, and determining whether the target object is outside the trash can; if the target object is outside the trash can, calling a preset pedestrian detection model to detect the target video frame, and obtaining a pedestrian detection result; generating a warning message based on the target object and the pedestrian detection result, and sending the warning message to a management terminal.
[0006] Optionally, in a first implementation method of the first aspect of the present invention, calling a preset food waste detection model to detect the continuous video frames and filter out target video frames, wherein the target video frames contain a target object, and the target object is kitchen waste, including: calling a preset food waste detection model to detect the continuous video frames one by one, and generating a kitchen waste detection result corresponding to each video frame; if the video frame corresponding to the target food waste detection result contains the target object, then determining the video frame corresponding to the target food waste detection result as the target video frame.
[0007] Optionally, in a second implementation method of the first aspect of the present invention, the calling of a preset trash can detection model to detect the target video frame to determine whether the target object is outside the trash can, includes: calling a preset trash can detection model to detect the target video frame to obtain the area where the target object is located and the trash can detection area, the trash can detection area being the area directly above the mouth of the trash can; if the trash can detection area covers the area where the target object is located, it is determined that the target object is not outside the trash can; if the trash can detection area does not cover the area where the target object is located, it is determined that the target object is outside the trash can.
[0008] Optionally, in a third implementation method of the first aspect of the present invention, if the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to obtain a pedestrian detection result, including: if the target detection result is that the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to determine whether the target video frame contains a pedestrian; if the target video frame contains a pedestrian, a preset value is determined as the pedestrian detection result; if the target video frame does not contain a pedestrian, a null value is determined as the pedestrian detection result.
[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, if the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame. After obtaining the pedestrian detection result, a warning message is generated based on the target object and the pedestrian detection result, and before the warning message is sent to the management terminal, it also includes: querying a food waste detection database to determine whether the target object already exists in the food waste detection database, and the food waste detection database is used to store the detected food waste information; if the target object does not exist in the food waste detection database, the target object is stored in the food waste detection database.
[0010] Optionally, in a fifth implementation method of the first aspect of the present invention, the warning information is generated based on the target object and the pedestrian detection result, and the warning information is sent to the management terminal, including: when the pedestrian detection result is not empty, generating a voice warning information, and the voice warning information is used to remind the pedestrian to clean the target object; judging whether the pedestrian has cleaned the target object, and if not, generating a cleaning warning information based on the target object, and sending the cleaning warning information to the management terminal; when the pedestrian detection result is empty, generating a cleaning warning information based on the target object, and sending the warning information to the management terminal.
[0011] Optionally, in a sixth implementation method of the first aspect of the present invention, before calling the preset food waste detection model to detect the continuous video frames, it also includes: obtaining an original picture set, which is a pre-collected picture set containing food waste, trash cans or pedestrians; classifying the original picture set to obtain a classified picture set, which includes a kitchen waste picture set, a trash can picture set and a pedestrian picture set; inputting the kitchen waste picture set into the initial food waste detection model for training to obtain a preset food waste detection model; inputting the trash can picture set into the initial trash can detection model for training to obtain a preset trash can detection model; inputting the pedestrian picture set into the initial pedestrian detection model for training to obtain a preset pedestrian detection model.
[0012] The second aspect of the present invention provides a kitchen waste detection device, including: an acquisition decoding module, which is used to acquire camera video of a garbage disposal area, decode the camera video, and obtain continuous video frames; a first detection module, which is used to call a preset kitchen waste detection model to detect the continuous video frames, and filter out target video frames, wherein the target video frames contain a target object, and the target object is kitchen waste; a second detection module, which is used to call a preset trash can detection model to detect the target video frame, and determine whether the target object is outside the trash can; a third detection module, which is used to call a preset pedestrian detection model to detect the target video frame if the target object is outside the trash can, and obtain a pedestrian detection result; and a generation and sending module, which is used to generate warning information according to the target object and the pedestrian detection result, and send the warning information to a management terminal.
[0013] Optionally, in a first implementation method of the second aspect of the present invention, the first detection module is specifically used to: call a preset food waste detection model to detect the continuous video frames one by one, and generate a kitchen waste detection result corresponding to each video frame; if the video frame corresponding to the target food waste detection result contains the target object, then the video frame corresponding to the target food waste detection result is determined as the target video frame.
[0014] Optionally, in a second implementation method of the second aspect of the present invention, the second detection module is specifically used to: call a preset trash can detection model to detect the target video frame, and obtain the area where the target object is located and the trash can detection area, the trash can detection area being the area directly above the mouth of the trash can; if the trash can detection area covers the area where the target object is located, it is determined that the target object is not outside the trash can; if the trash can detection area does not cover the area where the target object is located, it is determined that the target object is outside the trash can.
[0015] Optionally, in a third implementation method of the second aspect of the present invention, the third detection module is specifically used to: if the target detection result is that the target object is outside the trash can, call a preset pedestrian detection model to detect the target video frame to determine whether the target video frame contains pedestrians; if the target video frame contains pedestrians, determine a preset value as the pedestrian detection result; if the target video frame does not contain pedestrians, determine a null value as the pedestrian detection result.
[0016] Optionally, in a fourth implementation method of the second aspect of the present invention, after the third detection module and before the generation and sending module, a query storage module is also included, and the query storage module is specifically used to: query a food waste detection database to determine whether the target object already exists in the food waste detection database, and the food waste detection database is used to store the detected food waste information; if the target object does not exist in the food waste detection database, the target object is stored in the food waste detection database.
[0017] Optionally, in a fifth implementation method of the second aspect of the present invention, the generation and sending module is specifically used to: generate a voice warning message when the pedestrian detection result is not empty, and the voice warning message is used to remind the pedestrian to clean the target object; determine whether the pedestrian has cleaned the target object, and if not, generate a cleaning warning message based on the target object, and send the cleaning warning message to the management terminal; when the pedestrian detection result is empty, generate a cleaning warning message based on the target object, and send the warning message to the management terminal.
[0018] Optionally, in a sixth implementation manner of the second aspect of the present invention, a model training module is further included before the first detection module, and the model training module is specifically used to: obtain an original picture set, which is a pre-collected picture set containing kitchen waste, trash cans or pedestrians; classify the original picture set to obtain a classified picture set, which includes a kitchen waste picture set, a trash can picture set and a pedestrian picture set; input the kitchen waste picture set into an initial kitchen waste detection model for training to obtain a preset kitchen waste detection model; input the trash can picture set into an initial trash can detection model for training to obtain a preset trash can detection model; input the pedestrian picture set into an initial pedestrian detection model for training to obtain a preset pedestrian detection model.
[0019] The third aspect of the present invention provides a food waste detection device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the food waste detection device executes the above-mentioned food waste detection method.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned kitchen waste detection method.
[0021] In the technical solution provided by the present invention, the camera video of the garbage disposal area is obtained, the camera video is decoded to obtain continuous video frames; the preset kitchen waste detection model is called to detect the continuous video frames, and the target video frame is screened out, the target video frame contains a target object, and the target object is kitchen waste; the preset trash can detection model is called to detect the target video frame to determine whether the target object is outside the trash can; if the target object is outside the trash can, the preset pedestrian detection model is called to detect the target video frame to obtain the pedestrian detection result; a warning message is generated according to the target object and the pedestrian detection result, and the warning message is sent to the management terminal. In the embodiment of the present invention, by real-time monitoring of the garbage disposal area, the kitchen waste scattered outside the trash can is identified, and the garbage dumper or management personnel are warned to clean up, thereby improving the cleaning efficiency and reducing the management cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram of an embodiment of a method for detecting kitchen waste in an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of another embodiment of the kitchen waste detection method in an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of an embodiment of a kitchen waste detection device in an embodiment of the present invention;
[0025] Figure 4 It is a schematic diagram of another embodiment of the kitchen waste detection device in the embodiment of the present invention;
[0026] Figure 5 Schematic diagram of an embodiment of a kitchen waste detection device in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The embodiments of the present invention provide a kitchen waste detection method, device, equipment and storage medium, which monitor the kitchen waste scattered on the ground in the delivery area in real time, alert the garbage dumper or management personnel to clean up, improve cleaning efficiency and reduce management costs.
[0028] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] For ease of understanding, the specific process of the embodiment of the present invention is described below. It can be understood that the execution subject of the present invention can be a kitchen waste detection device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0030] See also Figure 1 , an embodiment of the kitchen waste detection method in the embodiment of the present invention includes:
[0031] 101. Obtain camera video of the garbage disposal area, decode the camera video, and obtain continuous video frames;
[0032] Among them, the server periodically receives compressed source video data packets based on the Real Time Streaming Protocol (RTSP). RTSP is an application layer protocol in the Transmission Control Protocol (TCP) / Internet Protocol (IP) system. The protocol defines a way for one-to-many applications to transmit multimedia data through an IP network. RTSP is located above the Real-time Transport Protocol (RTP) and the Real-time Transport Control Protocol (RTCP) in terms of architecture. It uses TCP or User Datagram Protocol (UDP) to complete data transmission. The source video data is the real-time monitoring data collected by the camera in the garbage disposal area. The real-time monitoring data collected by the camera is packaged into data packets and transmitted to the server in sequence. The server calls a preset decoder to decode the source video data packet, generate monitoring data in the required format, and obtain continuous video frames.
[0033] 102. Calling a preset food waste detection model to detect continuous video frames, and filtering out target video frames, wherein the target video frames contain a target object, and the target object is food waste;
[0034] Among them, the initial food waste monitoring model is built based on the deep learning framework. Common deep learning frameworks include convolutional neural networks, deep belief networks, and recursive neural networks. In this embodiment, the convolutional neural network is used as an example for reference. The initial food waste monitoring model includes a convolutional layer, a pooling layer, and a fully connected layer. Users can add layers to design the initial food waste monitoring model by themselves, or they can call mature network models, such as VGG-16, as the initial food waste monitoring model. Select the optimizer and loss function, input the food waste training picture to train the initial food waste monitoring model, and generate a preset food waste detection model.
[0035] The server calls the preset food waste detection model to identify whether there is a target object on the video frame. The target object is food waste. The two are equivalent in the following description. If there is no target object on the video frame, continue to detect the next video frame. If there is a target object on the video frame, the video frame is determined as the target video frame.
[0036] For example, the server calls the preset food waste detection model to detect video frame 1 and obtains food waste detection result A. The food waste detection result A shows that video frame 1 does not contain the target object. The server continues to call the preset food waste detection model to detect video frame 2 and obtains food waste detection result B. The food waste detection result B shows that video frame 2 contains the target object, so video frame 2 is determined as the target video frame.
[0037] 103. Call the preset trash can detection model to detect the target video frame to determine whether the target object is outside the trash can;
[0038] The initial trash can detection model is also built based on the deep learning framework. Here we also choose the convolutional neural network to build the initial trash can detection model. The initial trash can detection model includes convolutional layers, pooling layers, and fully connected layers. Users can add layers to design the initial trash can detection model or call mature network models, such as VGG-16, as the initial trash can detection model. Select the optimizer and loss function, input the trash can training picture to train the initial trash can detection model, and generate a preset trash can detection model.
[0039] The server calls the preset trash can detection model to identify whether the target object in the target video frame is outside the trash can. If the target object in the target video frame is not outside the trash can, the next target video frame will be detected. If the target object in the target video frame is outside the trash can, the target video frame will be input into the preset pedestrian detection model for detection.
[0040] 104. If the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to obtain a pedestrian detection result;
[0041] The initial pedestrian detection model is still built based on the convolutional neural network. The initial pedestrian detection model includes convolutional layers, pooling layers, and fully connected layers. Users can add layers to design the initial pedestrian detection model or call mature network models, such as VGG-16, as the initial pedestrian detection model. Select the optimizer and loss function, input pedestrian training pictures to train the initial pedestrian detection model, and generate a preset pedestrian detection model.
[0042] When the target object in the target video frame is outside the trash can, the server calls a preset pedestrian detection model to detect the target video frame, and the preset pedestrian detection model detects pedestrians near the target object.
[0043] 105. Generate warning information based on the target object and pedestrian detection results, and send the warning information to the management terminal.
[0044] When the preset pedestrian detection model detects a pedestrian, the server issues a sound warning to remind the pedestrian to deal with the randomly discarded target object. If the target object is discarded on the ground for more than the set time, it is determined that the pedestrian has not dealt with the target object. The server sends a warning message to the management terminal to remind the management staff to arrange for cleaning to clean it up;
[0045] When the preset pedestrian detection model does not detect a pedestrian, the server sends a warning message to the management terminal to remind the management staff to arrange for cleaning.
[0046] In the embodiment of the present invention, whether kitchen waste is discarded on the ground is monitored in real time, and a warning message to clean up the kitchen waste is sent to the person who discards the kitchen waste or the cleaning staff, which can improve the cleaning efficiency and reduce the management cost.
[0047] See also Figure 2 Another embodiment of the kitchen waste detection method in the embodiment of the present invention includes:
[0048] 201. Obtain a training picture set;
[0049] Manually collect pictures containing kitchen waste, trash cans or pedestrians, and classify the collected pictures into three categories: kitchen waste picture set, trash can picture set and pedestrian picture set. These three picture sets together constitute a training picture set, and the server obtains the training picture set.
[0050] 202. Input the training picture set into the initial model for training to obtain a preset kitchen waste detection model, a preset trash can detection model, and a preset pedestrian detection model;
[0051] Among them, the initial model is built based on the convolutional neural network. The initial model includes convolutional layers, pooling layers and fully connected layers. Users can add layers by themselves to design the initial model or call mature network models, such as VGG-16 and ResNet18, as the initial model to obtain the initial kitchen waste detection model, the initial trash can detection model and the initial pedestrian detection model.
[0052] An optimizer and loss function are selected for each initial model. The server inputs the kitchen waste image set into the initial kitchen waste detection model for training to obtain a preset kitchen waste detection model, inputs the trash can image set into the initial trash can detection model for training to obtain a preset trash can detection model, and inputs the pedestrian image set into the initial pedestrian detection model for training to obtain a preset pedestrian detection model.
[0053] 203. Obtain camera video of the garbage disposal area, decode the camera video, and obtain continuous video frames;
[0054] The server periodically receives compressed source video data packets based on the real-time streaming protocol RTSP. RTSP is an application layer protocol in the transmission control protocol TCP / Internet protocol IP system. The protocol defines the way one-to-many applications transmit multimedia data through an IP network. RTSP is located above the real-time transport protocol RTP and the real-time transport control protocol RTCP in terms of architecture. It uses TCP or the user datagram protocol UDP to complete data transmission. The source video data is the real-time monitoring data collected by the camera in the garbage disposal area. The real-time monitoring data collected by the camera is packaged into data packets and transmitted to the server in sequence. The server calls the preset decoder to decode the source video data packet, generate the monitoring data in the required format, and obtain continuous video frames.
[0055] 204. Calling a preset food waste detection model to detect continuous video frames, and filtering out target video frames, wherein the target video frames contain a target object, and the target object is food waste;
[0056] Among them, the server calls the preset food waste detection model to detect continuous video frames one by one, and generates a food waste detection result corresponding to each video frame. If the video frame corresponding to the target food waste detection result contains the target object, the video frame corresponding to the target food waste detection result is determined as the target video frame. If the video frame corresponding to the target food waste detection result does not contain the target object, the next video frame will continue to be detected. The target object is the food waste. The two are equivalent in the following description.
[0057] For example, the server calls the preset food waste detection model to detect video frame 1 and obtains food waste detection result A. The food waste detection result A shows that video frame 1 does not contain the target object. The server continues to call the preset food waste detection model to detect video frame 2 and obtains food waste detection result B. The food waste detection result B shows that video frame 2 contains the target object, so video frame 2 is determined as the target video frame.
[0058] 205. Calling a preset trash can detection model to detect the target video frame to determine whether the target object is outside the trash can;
[0059] Among them, the server calls the preset trash can detection model to detect the target video frame, and obtains the area where the target object is located and the trash can detection area. The trash can detection area is the area directly above the mouth of the trash can. If the trash can detection area covers the area where the target object is located, it is determined that the target object is not outside the trash can. If the trash can detection area does not cover the area where the target object is located, it is determined that the target object is outside the trash can.
[0060] For example, if the kitchen waste is in the area directly above the opening of the trash can, it is determined that the target object is not outside the trash can; if the kitchen waste is in the upper side, side or bottom area of the opening of the trash can, it is determined that the target object is outside the trash can.
[0061] It should be noted that when the trash can detection area covers the area where the target object is located, there are two situations: the first situation: the target object is separated from the human hand and runs above the trash can for a distance before falling into the trash can; the second situation: the target object is separated from the human hand and falls on the ground after passing over the trash can. In either case, as long as the target object in the target video frame is covered by the trash can detection area, the target object in the target video frame will be determined as not outside the trash can, because the subsequent video frames can show the final location of the target object and no misjudgment will occur.
[0062] 206. If the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to obtain a pedestrian detection result;
[0063] Among them, if the target detection result is that the target object is outside the trash can, the server calls the preset pedestrian detection model to detect the target video frame to determine whether the target video frame contains pedestrians. If the target video frame contains pedestrians, the preset value is determined as the pedestrian detection result. The preset value can be a number or a string. If the target video frame does not contain pedestrians, the empty value is determined as the pedestrian detection result.
[0064] In addition, when a pedestrian is detected in the target video frame, the server obtains the time information of the target video frame in the source video. The property staff traces back based on the target video frame to find the target pedestrian who randomly discards kitchen waste and stores the image information of the target pedestrian. If the target pedestrian is found to randomly discard kitchen waste multiple times, the community resident information is matched to find the target pedestrian and warn or punish him.
[0065] 207. Querying a kitchen waste detection database to determine whether the target object already exists in the kitchen waste detection database, where the kitchen waste detection database is used to store detected kitchen waste information;
[0066] The food waste detection database stores food waste images that have been identified in the past, and the server determines whether the same food waste exists in the food waste detection database based on the characteristics of the target object.
[0067] 208. If the target object does not exist in the kitchen waste detection database, store the target object in the kitchen waste detection database;
[0068] If the determination result of step 207 is that the same kitchen waste image exists, the server continues to determine whether the next target object exists in the kitchen waste detection database;
[0069] If the judgment result of step 207 is that there is no identical kitchen waste picture, the picture of the target object is stored in the kitchen waste detection database.
[0070] 209. Generate warning information based on the target object and pedestrian detection results, and send the warning information to the management terminal.
[0071] When the pedestrian detection result is not empty, it means that a pedestrian is detected nearby, and the server generates a voice warning message, which is used to remind pedestrians to clean the target object. When the time when the kitchen waste is discarded on the ground exceeds the set value, it is determined that the kitchen waste has not been cleaned up. The server generates a cleaning warning message according to the target object and the location of the target object, and sends the cleaning warning message to the management terminal;
[0072] When the pedestrian detection result is empty, it means that no pedestrians are detected nearby. The server generates a cleaning warning message based on the target object and the location of the target object, and sends the cleaning warning message to the management terminal.
[0073] In the embodiment of the present invention, whether kitchen waste is discarded on the ground is monitored in real time, and a warning message to clean up the kitchen waste is issued to the person who discards the waste or the cleaning staff. At the same time, a kitchen waste detection database is established to avoid repeated warnings, which can more effectively improve cleaning efficiency and reduce management costs.
[0074] The above describes the kitchen waste detection method in the embodiment of the present invention. The following describes the kitchen waste detection device in the embodiment of the present invention. Figure 3 , an embodiment of the kitchen waste detection device in the embodiment of the present invention includes:
[0075] The acquisition decoding module 301 is used to acquire the camera video of the garbage disposal area, decode the camera video, and obtain continuous video frames;
[0076] The first detection module 302 is used to call a preset food waste detection model to detect continuous video frames and filter out target video frames, wherein the target video frames contain a target object, and the target object is food waste;
[0077] The second detection module 303 is used to call a preset trash can detection model to detect the target video frame and determine whether the target object is outside the trash can;
[0078] The third detection module 304 is used to call a preset pedestrian detection model to detect the target video frame if the target object is outside the trash can to obtain a pedestrian detection result;
[0079] The generating and sending module 305 is used to generate warning information according to the target object and pedestrian detection results, and send the warning information to the management terminal.
[0080] In the embodiment of the present invention, it is monitored in real time whether the kitchen waste is randomly discarded on the ground, and a warning message to clean up the kitchen waste is sent to the person who discards the kitchen waste or the cleaning staff, which can improve the cleaning efficiency and reduce the management cost.
[0081] See also Figure 4 Another embodiment of the kitchen waste detection device in the embodiment of the present invention includes:
[0082] The acquisition decoding module 301 is used to acquire the camera video of the garbage disposal area, decode the camera video, and obtain continuous video frames;
[0083] The first detection module 302 is used to call a preset food waste detection model to detect continuous video frames and filter out target video frames, wherein the target video frames contain a target object, and the target object is food waste;
[0084] The second detection module 303 is used to call a preset trash can detection model to detect the target video frame and determine whether the target object is outside the trash can;
[0085] The third detection module 304 is used to call a preset pedestrian detection model to detect the target video frame if the target object is outside the trash can to obtain a pedestrian detection result;
[0086] A generating and sending module 305 is used to generate warning information according to the target object and pedestrian detection results, and send the warning information to the management terminal;
[0087] A query storage module 306 is used to store the target object in a food waste detection database;
[0088] The model training module 307 is used to generate a preset food waste detection model, a preset trash can detection model and a preset pedestrian detection model.
[0089] Optionally, the first detection module 302 may also be specifically used for:
[0090] The preset food waste detection model is called to detect continuous video frames one by one to generate a food waste detection result corresponding to each video frame; if the video frame corresponding to the target food waste detection result contains the target object, the video frame corresponding to the target food waste detection result is determined as the target video frame.
[0091] Optionally, the second detection module 303 may also be specifically used for:
[0092] The preset trash can detection model is called to detect the target video frame to obtain the area where the target object is located and the trash can detection area. The trash can detection area is the area directly above the trash can mouth. If the trash can detection area covers the area where the target object is located, it is determined that the target object is not outside the trash can. If the trash can detection area does not cover the area where the target object is located, it is determined that the target object is outside the trash can.
[0093] Optionally, the third detection module 304 may also be specifically used for:
[0094] If the target detection result is that the target object is outside the trash can, the preset pedestrian detection model is called to detect the target video frame to determine whether the target video frame contains a pedestrian; if the target video frame contains a pedestrian, the preset value is determined as the pedestrian detection result; if the target video frame does not contain a pedestrian, the null value is determined as the pedestrian detection result.
[0095] Optionally, the generating and sending module 305 may also be specifically used for:
[0096] When the pedestrian detection result is not empty, a voice warning message is generated, and the voice warning message is used to remind the pedestrian to clean the target object; it is judged whether the pedestrian has cleaned the target object. If not, a cleaning warning message is generated according to the target object, and the cleaning warning message is sent to the management terminal; when the pedestrian detection result is empty, a cleaning warning message is generated according to the target object, and the warning message is sent to the management terminal.
[0097] Optionally, the query storage module 306 may also be specifically used for:
[0098] Query the kitchen waste detection database to determine whether the target object already exists in the kitchen waste detection database, and the kitchen waste detection database is used to store the detected kitchen waste information; if the target object does not exist in the kitchen waste detection database, the target object is stored in the kitchen waste detection database.
[0099] Query the kitchen waste detection database to determine whether the target object already exists in the kitchen waste detection database, and the kitchen waste detection database is used to store the detected kitchen waste information; if the target object does not exist in the kitchen waste detection database, the target object is stored in the kitchen waste detection database.
[0100] Optionally, the model training module 307 may also be specifically used for:
[0101] An original picture set is obtained, which is a pre-collected picture set containing kitchen waste, trash cans or pedestrians; the original picture set is classified to obtain a classified picture set, which includes a kitchen waste picture set, a trash can picture set and a pedestrian picture set; the kitchen waste picture set is input into an initial kitchen waste detection model for training to obtain a preset kitchen waste detection model; the trash can picture set is input into an initial trash can detection model for training to obtain a preset trash can detection model; the pedestrian picture set is input into an initial pedestrian detection model for training to obtain a preset pedestrian detection model.
[0102] In the embodiment of the present invention, whether kitchen waste is discarded on the ground is monitored in real time, and a warning message to clean up the kitchen waste is issued to the person who discards the waste or the cleaning staff. At the same time, a kitchen waste detection database is established to avoid repeated warnings, which can more effectively improve cleaning efficiency and reduce management costs.
[0103] above Figure 3 and Figure 4 The kitchen waste detection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The kitchen waste detection device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0104] Figure 5is a schematic diagram of the structure of a kitchen waste detection device provided by an embodiment of the present invention. The kitchen waste detection device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more massive storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be short-term storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the kitchen waste detection device 500. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the kitchen waste detection device 500.
[0105] The food waste detection device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 5 The structure of the food waste detection device shown does not constitute a limitation of the food waste detection device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0106] The present invention also provides a kitchen waste detection device, the computer device includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the kitchen waste detection method in the above-mentioned embodiments.
[0107] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the food waste detection method.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0110] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting kitchen waste, characterized in that: The kitchen waste detection method comprises: Obtaining a camera video of a garbage disposal area, and decoding the camera video to obtain continuous video frames; Calling a preset food waste detection model to detect the continuous video frames, and filtering out a target video frame, wherein the target video frame contains a target object, and the target object is food waste; Calling a preset trash can detection model to detect the target video frame to determine whether the target object is outside the trash can; The calling of a preset trash can detection model to detect the target video frame and determine whether the target object is outside the trash can includes: Calling a preset trash can detection model to detect the target video frame, and obtaining the area where the target object is located and the trash can detection area, wherein the trash can detection area is the area directly above the trash can mouth; If the trash can detection area covers the area where the target object is located, it is determined that the target object is not outside the trash can; If the trash can detection area does not cover the area where the target object is located, it is determined that the target object is outside the trash can; If the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to obtain a pedestrian detection result; Generate warning information according to the target object and the pedestrian detection results, and send the warning information to the management terminal; The generating warning information according to the target object and the pedestrian detection result, and sending the warning information to the management terminal includes: When the pedestrian detection result is not empty, generating a voice warning message, the voice warning message is used to remind the pedestrian to clear the target object; Determine whether the pedestrian has cleaned the target object, and if not, generate cleaning warning information according to the target object, and send the cleaning warning information to the management terminal; When the pedestrian detection result is empty, a cleaning warning message is generated according to the target object, and the warning message is sent to the management terminal.
2. The method for detecting kitchen waste according to claim 1, characterized in that: The calling of a preset kitchen waste detection model to detect the continuous video frames and filter out a target video frame, wherein the target video frame contains a target object, and the target object is kitchen waste, including: Calling a preset food waste detection model to detect the continuous video frames one by one, and generating a food waste detection result corresponding to each video frame; If the video frame corresponding to the target food waste detection result contains the target object, the video frame corresponding to the target food waste detection result is determined as the target video frame.
3. The method for detecting kitchen waste according to claim 1, characterized in that: If the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to obtain a pedestrian detection result, including: If the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame to determine whether the target video frame contains a pedestrian; If the target video frame contains a pedestrian, determining a preset value as a pedestrian detection result; If the target video frame does not contain a pedestrian, a null value is determined as the pedestrian detection result.
4. The method for detecting kitchen waste according to claim 1, characterized in that: If the target object is outside the trash can, a preset pedestrian detection model is called to detect the target video frame, and after obtaining the pedestrian detection result, a warning message is generated according to the target object and the pedestrian detection result, and before the warning message is sent to the management terminal, the method further includes: Querying a kitchen waste detection database to determine whether the target object already exists in the kitchen waste detection database, wherein the kitchen waste detection database is used to store detected kitchen waste information; If the target object does not exist in the food waste detection database, the target object is stored in the food waste detection database.
5. The method for detecting kitchen waste according to any one of claims 1 to 4, characterized in that: Before calling the preset food waste detection model to detect the continuous video frames, the method further includes: Acquire an original picture set, where the original picture set is a pre-collected picture set containing kitchen waste, trash cans, or pedestrians; Classifying the original picture set to obtain a classified picture set, wherein the classified picture set includes a kitchen waste picture set, a trash can picture set, and a pedestrian picture set; Inputting the kitchen waste image set into an initial kitchen waste detection model for training to obtain a preset kitchen waste detection model; Inputting the trash can image set into an initial trash can detection model for training to obtain a preset trash can detection model; The pedestrian image set is input into an initial pedestrian detection model for training to obtain a preset pedestrian detection model.
6. A kitchen waste detection device, executing the kitchen waste detection method according to any one of claims 1 to 5, characterized in that: The kitchen waste detection device comprises: An acquisition decoding module is used to acquire a camera video of a garbage disposal area, and decode the camera video to obtain continuous video frames; A first detection module is used to call a preset food waste detection model to detect the continuous video frames and filter out a target video frame, wherein the target video frame contains a target object, and the target object is food waste; A second detection module is used to call a preset trash can detection model to detect the target video frame to determine whether the target object is outside the trash can; A third detection module is used to call a preset pedestrian detection model to detect the target video frame if the target object is outside the trash can to obtain a pedestrian detection result; A generating and sending module is used to generate warning information according to the target object and the pedestrian detection results, and send the warning information to the management terminal.
7. A kitchen waste detection device, characterized in that: The kitchen waste detection device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the food waste detection device executes the food waste detection method as described in any one of claims 1-5.
8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by the processor, the kitchen waste detection method as described in any one of claims 1-5 is implemented.
