Image recognition methods, devices, non-volatile storage media, and electronic devices

By automatically analyzing images inside the waste bins using image recognition technology and machine learning models, the problem of low efficiency in manual waste sorting has been solved, achieving efficient and low-cost waste sorting.

CN116342951BActive Publication Date: 2026-03-10BEIJING INTELLIGENT BUILDING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, manual waste sorting is inefficient and costly, and poses health risks to operators, resulting in poor waste sorting efficiency.

Method used

By employing image recognition methods, images of the waste bins are acquired, and machine learning models are used to segment and analyze the images to identify waste types. When waste types are inconsistent, alarm information is generated to achieve automatic waste sorting.

Benefits of technology

No manual sorting is required, which improves the efficiency of waste sorting, reduces costs, and minimizes health risks, thus achieving efficient waste sorting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116342951B_ABST
    Figure CN116342951B_ABST
Patent Text Reader

Abstract

This invention discloses an image recognition method, apparatus, non-volatile storage medium, and electronic device. The method includes: acquiring an image of the interior of a preset garbage bin; segmenting the image into multiple regions to be identified; analyzing each region using a preset machine learning model to determine the preset garbage type indicated by each region, wherein the preset machine learning model is trained using multiple sets of training data, each set including: a preset garbage image and the preset garbage type identified in the image; and generating a preset alarm message when a target region exists that does not belong to the target garbage type among the multiple regions indicating the preset garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin. This invention solves the technical problem of low garbage sorting efficiency caused by manual garbage sorting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically, to an image recognition method, apparatus, non-volatile storage medium, and electronic device. Background Technology

[0002] The current urban household waste recycling and disposal system is inadequate. While advocating for a low-carbon and healthy lifestyle, the current state of waste sorting and recycling is not optimistic, seriously hindering the process of urban modernization and causing inconvenience to urban residents.

[0003] According to surveys, the total daily amount of garbage generated in urban areas is about 1,100 tons, with an annual growth rate of 5%. If household waste can be sorted and recycled, the amount of garbage generated can be reduced by about 50%, and the resource recycling rate can reach 30%. However, traditional manual sorting is costly and inefficient, and poses certain health risks to operators.

[0004] There is currently no effective solution to the problem of low efficiency in waste sorting caused by manual waste sorting. Summary of the Invention

[0005] This invention provides an image recognition method, apparatus, non-volatile storage medium, and electronic device to at least solve the technical problem of low efficiency in waste sorting caused by manual waste sorting.

[0006] According to one aspect of the present invention, an image recognition method is provided, comprising: acquiring an image of the interior of a preset garbage bin to be identified; segmenting the image of the interior of the bin to be identified into multiple regions to be identified; analyzing each region to be identified using a preset machine learning model to determine a preset garbage type indicated by each region to be identified, wherein the preset machine learning model is trained using multiple sets of training data, each set of training data including: a preset garbage image and a preset garbage type identified in the preset garbage image; generating preset alarm information when the preset garbage type indicated by multiple regions to be identified does not belong to a target garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm information is used to indicate that the type of garbage collected by the preset garbage bin is inconsistent with the type of garbage indicated by the preset garbage bin.

[0007] Optionally, obtaining the image of the interior of the preset garbage bin to be identified includes: acquiring an image of the top cover of the preset garbage bin at preset time intervals, wherein the top cover image is used to represent the cooperation relationship between the preset garbage bin and the top cover, and the cooperation relationship is used to represent whether the preset garbage bin and the top cover are in an open state or a closed state; when the cooperation relationship between the preset garbage bin and the top cover is in an open state, acquiring the image of the interior of the bin to be identified.

[0008] Optionally, segmenting the image of the cabin interior to be identified into multiple regions to be identified includes: performing grid segmentation on the image of the cabin interior to be identified to obtain multiple grid regions, wherein each grid region has the same area; and selecting the region to be identified from the multiple grid regions.

[0009] Optionally, selecting the region to be identified from among the multiple grid regions includes: identifying feature information in each grid region, wherein the feature information is used to represent the internal features and external features of the preset waste bin; determining the feature ratio of the internal features and the external features in each grid region; and determining the grid region whose feature ratio is higher than a preset feature threshold as the region to be identified.

[0010] Optionally, after analyzing each of the regions to be identified using a preset machine learning model to determine the preset waste type indicated by each region to be identified, the method further includes: determining that the regions to be identified that the preset machine learning model fails to analyze as preset waste types are preset identification regions; receiving classification labels added by the target object to the preset identification regions, wherein the classification labels are used to indicate the preset waste type corresponding to the preset identification regions; and using the preset identification regions with added classification labels and the preset waste types corresponding to the preset identification regions as training data for the preset machine learning model.

[0011] Optionally, if multiple preset waste types indicated by the areas to be identified do not belong to the target waste type, before generating the preset alarm information, the method further includes: counting the number of areas to be identified for each preset waste type; and determining the preset waste type whose number of areas is greater than a preset number threshold as the target waste type.

[0012] Optionally, before generating a preset alarm message, if multiple preset waste types indicated by the areas to be identified do not belong to the target waste type, the method further includes: acquiring an external image of a preset waste compartment to be identified, wherein the outer surface of the preset waste compartment is pre-set with waste classification labels; identifying the waste classification labels in the external image of the compartment to be identified; querying a preset database to find a preset waste type that matches the waste classification label as the target waste type, wherein the preset database records the correspondence between multiple waste classification labels and the preset waste types.

[0013] According to another aspect of the present invention, an image recognition device is also provided, comprising: an acquisition module for acquiring an image of the interior of a preset garbage bin to be identified; a segmentation module for segmenting the image of the interior of the bin to be identified into multiple regions to be identified; an analysis module for analyzing each region to be identified using a preset machine learning model to determine a preset garbage type indicated by each region to be identified, wherein the preset machine learning model is trained using multiple sets of training data, each set of training data including: a preset garbage image and a preset garbage type identified in the preset garbage image; and an alarm module for generating preset alarm information when the preset garbage type indicated by multiple regions to be identified does not belong to a target garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm information indicates that the type of garbage collected by the preset garbage bin is inconsistent with the type of garbage indicated by the preset garbage bin.

[0014] According to another aspect of the present invention, a non-volatile storage medium is also provided, the non-volatile storage medium being used to store a program, wherein the program controls the device where the non-volatile storage medium is located to execute the image recognition method described above during runtime.

[0015] According to another aspect of the present invention, an electronic device is also provided, characterized in that it includes: a memory and a processor, the processor being configured to run a program stored in the processor, wherein the program executes the image recognition method described above when it runs.

[0016] In this embodiment of the invention, an image of the interior of a preset garbage bin to be identified is acquired; the image is segmented into multiple regions to be identified; a preset machine learning model is used to analyze each region to determine the preset garbage type indicated by each region. The preset machine learning model is trained using multiple sets of training data, each set including a preset garbage image and the preset garbage type identified in the image. If the preset garbage type indicated by multiple regions does not belong to the target garbage type, a preset alarm message is generated. The target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm message indicates that the type of garbage collected in the preset garbage bin is inconsistent with the type indicated by the preset garbage bin. This achieves the goal of automatically analyzing the garbage classification situation in the preset garbage bin based on image recognition technology, thereby eliminating the need for manual garbage classification in the preset garbage bin, improving garbage classification efficiency, and solving the technical problem of low garbage classification efficiency caused by manual garbage classification. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0018] Figure 1 This is a flowchart of an image recognition method according to an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of a waste sorting system based on algorithm-based automatic identification according to an embodiment of the present invention;

[0020] Figure 3a This is a schematic diagram of an image inside a cabin to be identified according to an embodiment of the present invention. Figure 1 ;

[0021] Figure 3b This is a schematic diagram of an image inside a cabin to be identified according to an embodiment of the present invention. Figure 2 ;

[0022] Figure 4 This is a schematic diagram of an image recognition device according to an embodiment of the present invention;

[0023] Figure 5 This is a structural block diagram of a computer terminal according to an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] According to an embodiment of the present invention, an image recognition method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] Figure 1 This is a flowchart of an image recognition method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0028] Step S102: Obtain an image of the interior of the preset garbage bin to be identified;

[0029] Step S104: Segment the image of the cabin interior to be identified into multiple regions to be identified;

[0030] Step S106: Analyze each region to be identified using a preset machine learning model to determine the preset garbage type indicated by each region to be identified. The preset machine learning model is trained by machine learning using multiple sets of training data. Each set of training data includes: a preset garbage image and the preset garbage type identified in the preset garbage image.

[0031] Step S108: If the preset waste type indicated by multiple areas to be identified does not belong to the target waste type, a preset alarm message is generated. The target waste type is the waste type indicated by the preset waste bin. The preset alarm message is used to indicate that the waste type collected by the preset waste bin is inconsistent with the waste type indicated by the preset waste bin.

[0032] In this embodiment of the invention, an image of the interior of a preset garbage bin to be identified is acquired; the image is segmented into multiple regions to be identified; a preset machine learning model is used to analyze each region to determine the preset garbage type indicated by each region. The preset machine learning model is trained using multiple sets of training data, each set including a preset garbage image and the preset garbage type identified in the image. If the preset garbage type indicated by multiple regions does not belong to the target garbage type, a preset alarm message is generated. The target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm message indicates that the type of garbage collected in the preset garbage bin is inconsistent with the type indicated by the preset garbage bin. This achieves the goal of automatically analyzing the garbage classification situation in the preset garbage bin based on image recognition technology, thereby eliminating the need for manual garbage classification in the preset garbage bin, improving garbage classification efficiency, and solving the technical problem of low garbage classification efficiency caused by manual garbage classification.

[0033] In step S102 above, the image inside the compartment to be identified can be the top image of the preset garbage compartment. When the top cover of the preset garbage compartment is open, the image inside the preset garbage compartment can be collected to obtain the image inside the compartment to be identified.

[0034] Optionally, while the preset garbage bin is continuously collecting garbage, images of the bin to be identified can be obtained over a period of time. Analyzing these images can prevent inaccurate garbage sorting caused by garbage accumulation in the preset garbage bin.

[0035] In step S102 above, images of the cabin to be identified can be collected at preset time intervals, and then the images of the cabin to be identified collected at preset time intervals can be analyzed respectively. This eliminates the need to analyze the images of the cabin to be identified at all times, thus reducing the processing resources occupied by the analysis.

[0036] Optionally, since the purpose of collecting multiple images of the compartment to be identified is to avoid the inability to accurately classify the bottom layer of garbage due to garbage accumulation, it is only necessary to re-identify and classify the images of the compartment to be identified in the preset garbage compartment when new garbage appears in the preset garbage compartment. After collecting images of the compartment to be identified at preset time intervals, the differences between adjacent images of the compartment to be identified collected at adjacent time intervals can be compared first. If there are differences between adjacent images of the compartment to be identified, then the garbage classification analysis can be performed on the images of the compartment to be identified that have differences.

[0037] As an optional embodiment, obtaining the image of the interior of the preset garbage bin to be identified includes: acquiring the top cover image of the preset garbage bin at preset time intervals, wherein the top cover image is used to represent the cooperation relationship between the preset garbage bin and the top cover, and the cooperation relationship is used to represent whether the preset garbage bin and the top cover are in an open state or a closed state; when the cooperation relationship between the preset garbage bin and the top cover is in an open state, acquiring the image of the interior of the bin to be identified.

[0038] In the above embodiments of the present invention, when the preset garbage compartment and the top cover are in an open state, the image inside the compartment to be identified is acquired and then analyzed; however, when the preset garbage compartment and the top cover are in a closed state, the image inside the compartment to be identified is not analyzed, thus eliminating the need to analyze the image inside the compartment constantly and reducing the processing resources occupied by the analysis.

[0039] It should be noted that the preset garbage bin cannot accept new garbage when the top cover is closed, and the preset garbage bin will only accept new garbage when the top cover is open. Therefore, by simply taking and analyzing the image of the compartment to be identified in the preset garbage bin when the top cover is open, it is possible to avoid inaccurate garbage classification results caused by garbage accumulation in the compartment, and also to reduce the processing resources occupied by the analysis.

[0040] Optionally, the top cover image can be a top view of a pre-defined waste compartment.

[0041] Optionally, since the garbage in the preset garbage bin is thrown into the preset garbage bin by the user, it can be determined whether to collect an image of the bin to be identified by detecting whether a user is present in the top view of the preset garbage bin. The presence of a user in the top view of the preset garbage bin can be determined by detecting whether human features appear in the top view of the preset garbage bin.

[0042] For example, if human features are detected in the top view of the preset garbage compartment, the action of detecting the cooperation relationship between the preset garbage compartment and the top cover can be triggered, or the action of acquiring the image of the compartment to be identified can be directly triggered.

[0043] Optionally, the detection of whether a user is throwing trash into the preset trash bin can also be carried out by an infrared device. When the infrared device detects a person approaching the preset trash bin, the camera is activated to capture an image of the top cover of the preset trash bin or an image of the inside of the bin to be identified.

[0044] Optionally, the detection of the matching relationship between the preset garbage compartment and the top cover can be determined by the matching switch between the preset garbage compartment and the top cover. The matching switch can be an infrared switch or an electromagnetic switch. When the preset garbage compartment and the top cover are in different matching relationships, the matching switch can emit different matching signals. Then, based on the matching signal, it can be determined whether to collect the top cover image of the preset garbage compartment or collect the image of the compartment to be identified.

[0045] Optionally, when the switch is an infrared switch, an infrared transmitter and an infrared receiver can be installed at the feeding port and top cover of the preset garbage compartment, respectively. When the preset garbage compartment and top cover are closed, the infrared receiver can receive the infrared signal provided by the infrared transmitter; when the preset garbage compartment and top cover are open, the infrared receiver cannot receive the infrared signal provided by the infrared transmitter, thereby triggering the camera to capture the image of the top cover of the preset garbage compartment or the image of the compartment to be identified.

[0046] Optionally, when the matching switch is an electromagnetic switch, a pair of electromagnetic switches can be installed at the feeding port and the top cover of the preset garbage compartment. When the preset garbage compartment and the top cover are in the closed state, the electromagnetic strength of the electromagnetic switch is higher than the preset strength threshold; when the preset garbage compartment and the top cover are in the open state, the electromagnetic strength of the electromagnetic switch is not higher than the preset strength threshold, thereby triggering the camera to capture the top cover image of the preset garbage compartment or capture the image inside the compartment to be identified.

[0047] As an optional embodiment, segmenting the image of the cabin interior to be identified into multiple regions to be identified includes: performing grid segmentation on the image of the cabin interior to be identified to obtain multiple grid regions, wherein each grid region has the same area; and selecting a region to be identified from the multiple grid regions.

[0048] In the above embodiments of the present invention, since the image of the cabin to be identified contains a large number of features, directly analyzing the image of the cabin to be identified would consume a large amount of analysis resources, resulting in low analysis efficiency and a high risk of inaccurate analysis. Therefore, the image of the cabin to be identified can be segmented into a grid, dividing it into multiple regions of the same size, and then analyzing each region separately. This can reduce the resources consumed by the analysis and improve the efficiency and accuracy of the analysis.

[0049] It should be noted that the image of the compartment to be identified cannot be set exactly according to the size of the preset garbage compartment. Therefore, in order to make the image of the compartment to be identified more comprehensively display the information of the preset garbage compartment, the image of the compartment to be identified will include the edge of the preset garbage compartment and the outside view near the edge. However, the edge of the preset garbage compartment and the outside view near the edge may affect the analysis results of the image of the compartment to be identified. Therefore, the area to be identified that can accurately represent the information of the preset garbage compartment can be selected from the grid area segmented from the image of the compartment to be identified, and the interfering information in the image of the compartment to be identified can be removed.

[0050] Optionally, the process of selecting the region to be identified from the grid area segmented from the image inside the cabin can be done manually by the user or intelligently by machine learning.

[0051] As an optional embodiment, selecting the region to be identified from multiple grid regions includes: identifying feature information in each grid region, wherein the feature information is used to represent the internal features and external features of the preset garbage bin; determining the feature ratio of the internal and external features in each grid region; and determining the grid region whose feature ratio is higher than a preset feature threshold as the region to be identified.

[0052] In the above embodiments of the present invention, when selecting a region to be identified from multiple grid regions, the feature information of each grid region can be identified through machine learning, distinguishing between features inside and outside the cabin, and then automatically determining whether the grid region belongs to the region to be identified based on the feature ratio of features inside and outside the cabin. This achieves automatic selection of the region to be identified and can improve the selection efficiency of the region to be identified.

[0053] Optionally, the preset feature threshold can be set according to actual needs. By setting an appropriate preset feature threshold, any grid area containing cabin features can be used as the area to be identified; or a grid area with a sufficiently large number or proportion of cabin features can be used as the area to be identified.

[0054] In step S106 above, the preset waste types include at least: kitchen waste, recyclable waste, hazardous waste and other waste. When the preset machine learning model is used to analyze each of the areas to be identified, the preset waste type corresponding to each area to be identified can be determined.

[0055] Optionally, a preset machine learning model is used to analyze the area to be identified. If all the garbage in the area to be identified belongs to the same preset garbage type, the area to be identified is determined to be the preset garbage type. If the garbage in the area to be identified belongs to multiple preset garbage types, the preset machine learning model outputs that it cannot analyze the area to be identified.

[0056] Optionally, a preset machine learning model is used to analyze the region to be identified. If the number of features belonging to the preset garbage type in the region to be identified exceeds the preset feature threshold, the region to be identified is determined to be the preset garbage type; otherwise, the output of the preset machine learning model cannot analyze the region to be identified.

[0057] As an optional embodiment, after analyzing each region to be identified using a preset machine learning model and determining the preset waste type indicated by each region to be identified, the method further includes: determining that the regions to be identified that the preset machine learning model fails to analyze as preset waste types are preset identification regions; receiving classification labels added by the target object to the preset identification regions, wherein the classification labels are used to indicate the preset waste type corresponding to the preset identification regions; and using the preset identification regions with added classification labels and the preset waste types corresponding to the preset identification regions as training data for the preset machine learning model.

[0058] In the above embodiments of the present invention, when the preset machine learning model is unable to classify the garbage in the area to be identified, the area to be identified can be displayed as a preset identification area to the target object, and the target object can be received to add classification tags to the preset identification area. Then, the preset identification area with added classification tags and the preset garbage type indicated by the preset identification area can be used as training data for the preset machine learning model, thereby supplementing the training data of the preset machine learning model in real time, realizing the update of the preset machine learning model, and enabling the preset machine learning model to classify garbage more accurately.

[0059] As an optional embodiment, if the preset waste types indicated by multiple areas to be identified belong to the target waste type, waste can be directly recycled from the preset waste bins.

[0060] In step S108 above, the target waste type can be a preset setting for a pre-set waste bin, indicating that the pre-set waste bin can only recycle waste of the target waste type; or it can be determined based on the waste collected in the pre-set waste bin.

[0061] For example, although a preset garbage bin is set up for the collection of designated garbage, the garbage sorting system cannot predict or specify the target garbage type indicated by the preset garbage bin. However, the user still follows the garbage sorting rules. Therefore, the garbage collected in the preset garbage bin also conforms to the same preset garbage type. Thus, by analyzing the image inside the bin to be identified, the target garbage type indicated by the preset garbage bin can also be determined, making it easier to carry out garbage sorting and collection.

[0062] As an optional embodiment, if there are preset waste types indicated by multiple areas to be identified that do not belong to the target waste type, before generating preset alarm information, the method further includes: counting the number of areas to be identified for each preset waste type; and determining the preset waste type with a number of areas greater than a preset number threshold as the target waste type.

[0063] In the above embodiments of the present invention, when the waste analysis system fails to know in advance the target waste type indicated by the preset waste bin, the target waste type indicated by the preset waste bin can be determined by analyzing the image inside the bin to be identified, and then it can be determined whether the waste type collected by the preset waste bin is consistent with the waste type indicated by the preset waste bin.

[0064] Optionally, if the waste collected in the preset waste bin includes multiple preset waste types, the preset waste type with the most of the same type can be used as the target waste type, other preset waste types can be marked as abnormal waste types, and prompt information or preset alarm information can be issued to instruct waste sorting staff to separate the abnormal waste types from the preset waste bin.

[0065] As an optional embodiment, before generating a preset alarm message when multiple areas to be identified indicate a preset waste type that does not belong to the target waste type, the method further includes: acquiring an external image of a preset waste compartment to be identified, wherein the outer surface of the preset waste compartment is pre-set with waste classification labels; identifying the waste classification labels in the external image of the compartment to be identified; querying a preset database to find a preset waste type that matches the waste classification label as the target waste type, wherein the preset database records the correspondence between multiple waste classification labels and preset waste types.

[0066] In the above embodiments of the present invention, the waste analysis system can pre-determine the target waste type indicated by the preset waste bin. If waste that does not belong to the target waste type appears in the preset waste bin, a preset alarm message will be issued. In this case, the target waste type indicated by the waste classification label can be determined by collecting the image outside the preset waste bin and then determining the waste classification label in the image outside the bin.

[0067] Optionally, the outside of the preset garbage bin can be pre-set with garbage classification signs, and the correspondence between garbage classification signs and preset garbage types can be recorded through a preset database. Then, by collecting the image of the outside of the preset garbage bin to be identified, the target garbage type indicated by the preset garbage bin can be determined.

[0068] Alternatively, waste sorting signs can be text signs, graphic signs, or color signs.

[0069] Optionally, the process of identifying the target waste type indicated by the preset waste bin can also be carried out using radio frequency tag technology. Radio frequency tags for representing different preset waste types are set in the preset waste bin, and a scanning device for the radio frequency tags is set at the placement location of the preset waste bin. The target waste type indicated by the preset waste bin can then be determined based on the scanning results of the radio frequency tags by the scanning device.

[0070] The present invention also provides a preferred embodiment, which provides a waste sorting system based on algorithm-based automatic identification.

[0071] The waste sorting system provided by this invention uses AI algorithms to identify waste. Cameras around the waste bins take pictures and collect data. If waste that does not belong to the correct category is identified, an alarm will be triggered and the results will be notified to the relevant departments.

[0072] The technical solution provided by this invention utilizes AI recognition technology programmed with code, combined with camera-assisted photography, to perform intelligent AI recognition for different types of scenarios. Through technologies such as Vue, HTML, CSS, and JavaScript, it intelligently identifies images of garbage inside the cabin and divides them into 8... There are 64 grids in total. The algorithm performs standard identification and comparison on each grid to determine whether the waste corresponds to that bin, and returns the sorted results to the customer.

[0073] Figure 2 This is a schematic diagram of a waste sorting system based on algorithmic automatic identification according to an embodiment of the present invention, such as... Figure 2 As shown, the camera takes pictures of the sorted trash cans (i.e., the preset trash compartments) and sends them to the algorithm server. The algorithm server executes a preset machine learning model to analyze the images and determine the type of trash. For images that the algorithm server can recognize, it returns the recognition result. For complex images that the algorithm server cannot recognize, manual assistance is required. The target user manually sorts and adds tags to the unrecognized content. Then, the results of the manual recognition and the algorithm server recognition are returned to the customer (or trash sorting personnel). The customer can then determine whether the trash can be directly recycled or whether relevant measures (such as further sorting of the recycled trash) can be taken based on the recognition results.

[0074] Figure 3a This is a schematic diagram of an image inside a cabin to be identified according to an embodiment of the present invention. Figure 1 , Figure 3b This is a schematic diagram of an image inside a cabin to be identified according to an embodiment of the present invention. Figure 2 ,like Figure 3a and Figure 3b As shown, by analyzing Figure 3a The image of the cabin interior to be identified can be divided into grids to obtain... Figure 3b Through this pair of divisions Figure 3b By performing zone identification, it can be determined that the waste collected in the preset waste compartment is kitchen waste.

[0075] The technical solution provided by this invention upgrades the original manual identification of garbage classification to computer AI algorithm + manual assistance identification. Through intelligent AI algorithm identification, garbage classification can be identified with high efficiency and low cost, which greatly reduces the cost of garbage classification and improves the efficiency and quantity of identification, thereby making the promotion of garbage classification more effective and sustainable.

[0076] According to an embodiment of the present invention, an image recognition device embodiment is also provided. It should be noted that the image recognition device can be used to execute the image recognition method in the embodiment of the present invention, and the image recognition method in the embodiment of the present invention can be executed in the image recognition device.

[0077] Figure 4 This is a schematic diagram of an image recognition device according to an embodiment of the present invention, such as... Figure 4 As shown, the device may include: an acquisition module 42 for acquiring an image of the interior of a preset garbage bin to be identified; a segmentation module 44 for segmenting the image of the interior of the bin to be identified into multiple regions to be identified; an analysis module 46 for analyzing each region to be identified using a preset machine learning model to determine the preset garbage type indicated by each region to be identified, wherein the preset machine learning model is trained using multiple sets of training data, and each set of training data includes: a preset garbage image and the preset garbage type identified in the preset garbage image; and an alarm module 48 for generating a preset alarm message when the preset garbage type indicated by multiple regions to be identified does not belong to the target garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm message is used to indicate that the type of garbage collected by the preset garbage bin is inconsistent with the type of garbage indicated by the preset garbage bin.

[0078] It should be noted that the acquisition module 42 in this embodiment can be used to execute step S102 in this application embodiment, the segmentation module 44 in this embodiment can be used to execute step S104 in this application embodiment, the analysis module 46 in this embodiment can be used to execute step S106 in this application embodiment, and the alarm module 48 in this embodiment can be used to execute step S108 in this application embodiment. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.

[0079] In this embodiment of the invention, an image of the interior of a preset garbage bin to be identified is acquired; the image is segmented into multiple regions to be identified; a preset machine learning model is used to analyze each region to determine the preset garbage type indicated by each region. The preset machine learning model is trained using multiple sets of training data, each set including a preset garbage image and the preset garbage type identified in the image. If the preset garbage type indicated by multiple regions does not belong to the target garbage type, a preset alarm message is generated. The target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm message indicates that the type of garbage collected in the preset garbage bin is inconsistent with the type indicated by the preset garbage bin. This achieves the goal of automatically analyzing the garbage classification situation in the preset garbage bin based on image recognition technology, thereby eliminating the need for manual garbage classification in the preset garbage bin, improving garbage classification efficiency, and solving the technical problem of low garbage classification efficiency caused by manual garbage classification.

[0080] As an optional embodiment, the acquisition module includes: a collection unit, used to collect images of the top cover of a preset garbage bin at preset time intervals, wherein the top cover image is used to represent the cooperation relationship between the preset garbage bin and the top cover, and the cooperation relationship is used to represent whether the preset garbage bin and the top cover are in an open state or a closed state; and an acquisition unit, used to acquire an image of the bin to be identified when the cooperation relationship between the preset garbage bin and the top cover is in an open state.

[0081] As an optional embodiment, the segmentation module includes: a segmentation unit for performing grid segmentation on the image of the cabin to be identified to obtain multiple grid regions, wherein each grid region has the same area; and a selection unit for selecting the region to be identified from the multiple grid regions.

[0082] As an optional embodiment, the selection unit includes: an identification subunit for identifying feature information in each grid region, wherein the feature information is used to represent the internal features and external features of the preset garbage bin; a first determination subunit for determining the feature ratio of the internal features and external features in each grid region; and a second determination subunit for determining grid regions with feature ratios higher than a preset feature threshold as regions to be identified.

[0083] As an optional embodiment, the device further includes: a determining module, configured to analyze each region to be identified using a preset machine learning model, and after determining the preset waste type indicated by each region to be identified, determine the regions to be identified where the preset machine learning model fails to analyze the preset waste type as preset identification regions; an adding module, configured to receive classification tags added by the target object to the preset identification regions, wherein the classification tags are used to indicate the preset waste type corresponding to the preset identification regions; and a training module, configured to use the preset identification regions with added classification tags and the preset waste types corresponding to the preset identification regions as training data for the preset machine learning model.

[0084] As an optional embodiment, the device further includes: a statistics submodule, used to count the number of regions to be identified for each preset waste type before generating preset alarm information when there are preset waste types indicated by multiple regions to be identified that do not belong to the target waste type; and a determination submodule, used to determine the preset waste type with a region number greater than a preset number threshold as the target waste type.

[0085] As an optional embodiment, the device further includes: an acquisition submodule, used to acquire an external image of a preset waste bin before generating a preset alarm message if a preset waste type indicated by multiple areas to be identified does not belong to the target waste type; wherein the outer surface of the preset waste bin is pre-set with waste classification labels; an identification submodule, used to identify the waste classification labels in the external image of the bin to be identified; and a query submodule, used to query a preset database to find a preset waste type that matches the waste classification label as the target waste type; wherein the preset database records the correspondence between multiple waste classification labels and preset waste types.

[0086] Embodiments of the present invention can provide a computer terminal, which can be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the computer terminal can also be replaced by a mobile terminal or other terminal device.

[0087] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.

[0088] In this embodiment, the computer terminal described above can execute the program code for the following steps in the image recognition method: acquiring an image of the interior of a preset garbage bin to be identified; segmenting the image of the interior of the bin to be identified into multiple regions to be identified; analyzing each region to be identified using a preset machine learning model to determine the preset garbage type indicated by each region to be identified, wherein the preset machine learning model is trained using multiple sets of training data, and each set of training data includes: a preset garbage image and the preset garbage type identified in the preset garbage image; generating preset alarm information when the preset garbage type indicated by multiple regions to be identified does not belong to the target garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm information is used to indicate that the type of garbage collected by the preset garbage bin is inconsistent with the type of garbage indicated by the preset garbage bin.

[0089] Optionally, Figure 5 This is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 5 As shown, the computer terminal 50 may include one or more (only one is shown in the figure) processors 52 and memory 54.

[0090] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the image recognition method and apparatus in this embodiment of the invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned image recognition method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal 50 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0091] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: acquiring an image of the interior of a preset garbage bin to be identified; segmenting the image into multiple regions to be identified; analyzing each region using a preset machine learning model to determine the preset garbage type indicated by each region, wherein the preset machine learning model is trained using multiple sets of training data, and each set of training data includes: a preset garbage image and the preset garbage type identified in the preset garbage image; generating a preset alarm message if the preset garbage type indicated by multiple regions does not belong to the target garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm message is used to indicate that the type of garbage collected by the preset garbage bin is inconsistent with the type of garbage indicated by the preset garbage bin.

[0092] Optionally, the processor may also execute program code for the following steps: acquiring images of the top cover of a preset waste bin at preset time intervals, wherein the top cover image is used to represent the cooperation relationship between the preset waste bin and the top cover, and the cooperation relationship is used to represent whether the preset waste bin and the top cover are in an open or closed state; when the cooperation relationship between the preset waste bin and the top cover is in an open state, acquiring an image of the interior of the bin to be identified.

[0093] Optionally, the processor may also execute program code that performs the following steps: performing grid segmentation on the image of the cabin to be identified to obtain multiple grid regions, wherein each grid region has the same area; and selecting the region to be identified from the multiple grid regions.

[0094] Optionally, the processor may also execute program code for the following steps: identifying feature information in each grid region, wherein the feature information is used to represent the internal features and external features of the preset garbage bin; determining the feature ratio of the internal and external features in each grid region; and determining the grid region whose feature ratio is higher than a preset feature threshold as the region to be identified.

[0095] Optionally, the processor may also execute program code that performs the following steps: after analyzing each region to be identified using a preset machine learning model and determining the preset waste type indicated by each region to be identified, the processor determines the regions to be identified that the preset machine learning model fails to analyze as preset waste types as preset identification regions; receives classification labels added by the target object to the preset identification regions, wherein the classification labels are used to indicate the preset waste type corresponding to the preset identification regions; and uses the preset identification regions with added classification labels and the preset waste types corresponding to the preset identification regions as training data for the preset machine learning model.

[0096] Optionally, the processor may also execute program code that performs the following steps: if multiple pre-defined garbage types indicated by the regions to be identified do not belong to the target garbage type, before generating the pre-defined alarm information, count the number of regions to be identified for each pre-defined garbage type; determine the pre-defined garbage type whose number of regions is greater than a pre-defined threshold as the target garbage type.

[0097] Optionally, the processor may also execute program code for the following steps: before generating a preset alarm message, if the preset waste type indicated by multiple areas to be identified does not belong to the target waste type, acquire an external image of the preset waste compartment to be identified, wherein the outer surface of the preset waste compartment is pre-set with waste classification labels; identify the waste classification labels in the external image of the compartment to be identified; query a preset database to find the preset waste type that matches the waste classification label as the target waste type, wherein the preset database records the correspondence between multiple waste classification labels and preset waste types.

[0098] This invention provides an image recognition scheme. It involves acquiring an image of the interior of a preset garbage bin; segmenting the image into multiple regions; analyzing each region using a preset machine learning model to determine the preset garbage type indicated by each region. The preset machine learning model is trained using multiple sets of training data, each set including a preset garbage image and the preset garbage type identified within it. If any of the preset garbage types indicated by multiple regions do not belong to the target garbage type, a preset alarm is generated. The target garbage type is the type of garbage indicated by the preset garbage bin, and the alarm indicates that the garbage type in the preset garbage bin is inconsistent with the type indicated by the preset garbage bin. This achieves the goal of automatically analyzing the garbage classification within the preset garbage bin based on image recognition technology, eliminating the need for manual garbage classification and improving garbage classification efficiency. This solves the technical problem of low garbage classification efficiency caused by manual garbage classification.

[0099] Those skilled in the art will understand that Figure 5 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a mobile internet device (MID), a PAD, and other terminal devices. Figure 5 This does not limit the structure of the aforementioned electronic device. For example, computer terminal 50 may also include components that are more advanced than those described above. Figure 5 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 5The different configurations shown.

[0100] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0101] Embodiments of the present invention also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the image recognition method provided in the above embodiments.

[0102] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0103] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: acquiring an image of the interior of a preset garbage bin to be identified; segmenting the image of the interior of the bin to be identified into multiple regions to be identified; analyzing each region to be identified using a preset machine learning model to determine the preset garbage type indicated by each region to be identified, wherein the preset machine learning model is trained using multiple sets of training data, and each set of training data includes: a preset garbage image and the preset garbage type identified in the preset garbage image; generating a preset alarm message when the preset garbage type indicated by multiple regions to be identified does not belong to the target garbage type, wherein the target garbage type is the type of garbage indicated by the preset garbage bin, and the preset alarm message is used to indicate that the type of garbage collected by the preset garbage bin is inconsistent with the type of garbage indicated by the preset garbage bin.

[0104] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: acquiring images of the top cover of a preset waste bin at preset time intervals, wherein the top cover image is used to represent the cooperation relationship between the preset waste bin and the top cover, and the cooperation relationship is used to represent whether the preset waste bin and the top cover are in an open or closed state; when the cooperation relationship between the preset waste bin and the top cover is in an open state, acquiring an image of the interior of the bin to be identified.

[0105] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: performing grid segmentation on the image inside the cabin to be identified to obtain multiple grid regions, wherein each grid region has the same area; selecting the region to be identified from the multiple grid regions.

[0106] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: identifying feature information in each grid region, wherein the feature information is used to represent the internal features and external features of the preset garbage bin; determining the feature ratio of the internal and external features in each grid region; and determining the grid region whose feature ratio is higher than a preset feature threshold as the region to be identified.

[0107] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: after analyzing each region to be identified using a preset machine learning model and determining the preset waste type indicated by each region to be identified, determining that the regions to be identified that the preset machine learning model fails to analyze as preset waste types are preset identification regions; receiving classification tags added by the target object to the preset identification regions, wherein the classification tags are used to indicate the preset waste type corresponding to the preset identification regions; and using the preset identification regions with added classification tags and the preset waste types corresponding to the preset identification regions as training data for the preset machine learning model.

[0108] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: if there are preset garbage types indicated by multiple regions to be identified that do not belong to the target garbage type, before generating preset alarm information, the number of regions to be identified for each preset garbage type is counted; and the preset garbage type with a region number greater than a preset number threshold is determined as the target garbage type.

[0109] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: before generating a preset alarm message when multiple preset waste types indicated by the areas to be identified do not belong to the target waste type, an external image of the preset waste compartment to be identified is obtained, wherein the outer surface of the preset waste compartment is pre-set with waste classification labels; the waste classification labels in the external image of the compartment to be identified are identified; and a preset database is used to query the preset waste type that matches the waste classification label as the target waste type, wherein the preset database records the correspondence between multiple waste classification labels and preset waste types.

[0110] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0111] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0112] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0113] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0114] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0115] If the integrated unit is implemented as 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, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0116] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An image recognition method characterized by, The method comprises the following steps: acquiring an image to be recognized in a preset garbage compartment; segmenting the image to be recognized into a plurality of regions to be recognized; using a preset machine learning model to analyze each region to be recognized, and determining a preset garbage type indicated by each region to be recognized, wherein the preset machine learning model is trained by machine learning using a plurality of sets of training data, and each set of training data comprises a preset garbage image and a preset garbage type identified in the preset garbage image; in a case where the preset garbage types indicated by a plurality of regions to be recognized do not belong to a target garbage type, generating preset alarm information, wherein the target garbage type is a garbage type indicated by the preset garbage compartment for storage, and the preset alarm information is used to indicate that the garbage type stored in the preset garbage compartment is inconsistent with the garbage type indicated by the preset garbage compartment for storage; wherein, before generating the preset alarm information in a case where the preset garbage types indicated by a plurality of regions to be recognized do not belong to the target garbage type, the method further comprises: counting the number of regions to be recognized for each preset garbage type; determining that the preset garbage type with a region number greater than a preset number threshold is the target garbage type.

2. The method of claim 1, wherein, The step of acquiring an image to be recognized in a preset garbage compartment comprises: collecting a top cover image of the preset garbage compartment at a preset time interval, wherein the top cover image is used to represent the cooperation relationship between the preset garbage compartment and the top cover, and the cooperation relationship is used to represent that the preset garbage compartment and the top cover are in an open state or a closed state; in a case where the cooperation relationship between the preset garbage compartment and the top cover is in the open state, acquiring the image to be recognized in the preset garbage compartment.

3. The method of claim 1, wherein, The step of segmenting the image to be recognized into a plurality of regions to be recognized comprises: performing grid segmentation on the image to be recognized to obtain a plurality of grid regions, wherein each grid region has the same area; selecting the regions to be recognized from the plurality of grid regions.

4. The method of claim 3, wherein, The step of selecting the regions to be recognized from the plurality of grid regions comprises: identifying feature information in each grid region, wherein the feature information is used to represent the in-compartment feature of the preset garbage compartment and the out-compartment feature of the preset garbage compartment; determining a feature ratio of the in-compartment feature and the out-compartment feature in each grid region; determining that a grid region with a feature ratio higher than a preset feature threshold is the region to be recognized.

5. The method of claim 1, wherein, After the step of using a preset machine learning model to analyze each region to be recognized and determining a preset garbage type indicated by each region to be recognized, the method further comprises: determining that a region to be recognized for which the preset machine learning model fails to analyze a preset garbage type is a preset recognition region; receiving a classification label added to the preset recognition region by a target object, wherein the classification label is used to indicate a preset garbage type corresponding to the preset recognition region; using the preset recognition region with the added classification label and the preset garbage type corresponding to the preset recognition region as training data for the preset machine learning model.

6. The method of claim 1, wherein, In a case where the preset garbage types indicated by the plurality of to-be-identified regions do not belong to the target garbage type, the method further includes: obtaining a to-be-identified outside image of a preset garbage bin, wherein an outside surface of the preset garbage bin is pre-provided with a garbage classification mark; identifying the garbage classification mark in the to-be-identified outside image; querying, through a preset database, a preset garbage type matched with the garbage classification mark as the target garbage type, wherein the preset database records a correspondence between a plurality of garbage classification marks and the preset garbage types.

7. An image recognition apparatus characterized by comprising: comprises: an obtaining module configured to obtain a to-be-identified inside image of a preset garbage bin; a segmentation module configured to segment the to-be-identified inside image into a plurality of to-be-identified regions; an analysis module configured to analyze each to-be-identified region using a preset machine learning model to determine a preset garbage type indicated by each to-be-identified region, wherein the preset machine learning model is trained by machine learning using a plurality of sets of training data, and each set of training data in the plurality of sets of training data includes a preset garbage image and a preset garbage type identified in the preset garbage image; an alarm module configured to generate a preset alarm information in a case where the preset garbage types indicated by the plurality of to-be-identified regions do not belong to the target garbage type, wherein the target garbage type is a garbage type to be accommodated by the preset garbage bin, and the preset alarm information is used to indicate that the garbage type accommodated by the preset garbage bin is inconsistent with the garbage type indicated by the preset garbage bin; wherein the apparatus further comprises: a statistical submodule configured to, before generating the preset alarm information in a case where the preset garbage types indicated by the plurality of to-be-identified regions do not belong to the target garbage type, count a region number of the to-be-identified regions of each preset garbage type; a determination statistical submodule configured to determine a preset garbage type with a region number greater than a preset number threshold as the target garbage type.

8. A non-volatile storage medium, comprising: The non-volatile storage medium is configured to store a program, wherein the program controls a device in which the non-volatile storage medium is located to execute the image recognition method in any one of claims 1 to 6 when the program is running.

9. An electronic device, comprising: comprises: a memory and a processor, the processor being configured to run a program stored in the processor, wherein the program executes the image recognition method in any one of claims 1 to 6 when the program is running.

Citation Information

Patent Citations

  • Garbage classification recycling method and system based on multi-target image recognition

    CN112364758A

  • Intelligent property management system based on smart community

    CN112866647A