A method, device, electronic device, and storage medium for identifying foreign objects in waste.
By using an improved SSD network model to identify foreign substances in kitchen waste, the problem of low identification accuracy of kitchen waste was solved, realizing unmanned or minimally manned kitchen waste sorting and improving identification speed and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing food waste identification technologies suffer from poor target boundaries and unclear features due to the heterogeneity and severe occlusion of oil, water, and solid materials. As a result, existing technologies are unable to effectively extract the characteristics of foreign materials in food waste, leading to low identification accuracy.
Deep learning-based object detection technology is used to identify foreign matter in kitchen waste using an improved SSD network model. Through data augmentation, annotation, and iterative optimization training, a foreign matter identification model is established to identify and output location information.
It improves the accuracy and speed of foreign matter identification in kitchen waste, realizes unmanned or minimally manned operation in the kitchen waste sorting stage, and solves the problems of difficulty in recruiting workers and poor working conditions for workers.
Smart Images

Figure CN115393780B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent waste identification technology, and in particular to a method, device, electronic device, and storage medium for identifying foreign objects in waste. Background Technology
[0002] With the continuous improvement of residents' living standards and the rapid development of the catering industry, the amount of food waste generated has entered a stage of explosive growth, and the resulting environmental and ecological problems are becoming increasingly prominent. Food waste refers to the containerized waste generated by profit-making businesses such as restaurants, canteens of enterprises and institutions, and eateries.
[0003] Food waste requires harmless treatment technologies and resource utilization methods to promote efficient resource reuse. Before resource utilization, it needs to undergo a sorting process to separate out foreign substances that damage the three-phase separation equipment and affect the utilization rate of organic matter. Currently, food waste is usually sorted manually or mechanically to remove impurities. However, manual sorting faces problems such as long working hours, harsh working environment, and difficulty in recruiting workers. While mechanical sorting has high sorting efficiency, its processing accuracy is low, separating out a lot of useful organic matter, resulting in resource waste.
[0004] With the development of IoT and AI technologies, China's waste sorting industry is gradually becoming more intelligent, moving from the early stages of manual and machine sorting to the initial stage of intelligent sorting. Most intelligent identification methods are used for easily sortable household waste, which has clear surface features, complete identification targets, and minimal obstruction, allowing intelligent identification methods to easily acquire target features for detection and identification. However, due to the special and complex nature of kitchen waste, no relevant research data or information has been found regarding the application of intelligent identification methods in the kitchen waste sorting stage. For example, patent CN112660671B discloses a foreign object image recognition system and management system for kitchen waste. This system performs partial image cutout processing on waste images to obtain foreign object images, matches these images with pre-stored foreign object comparison images, and generates corresponding foreign object identification result information based on the matching results. While the aforementioned patents can classify waste, they require clear image boundaries, minimal occlusion, and distinct features for feature extraction and matching. Due to the complex oil-water-solid material characteristics and heterogeneity of kitchen waste, the targets to be identified are often obscured by oil stains, leftover food, and other materials. Image matting makes it difficult to capture advanced semantic features and complex content, resulting in a low recognition rate for obscured targets. Summary of the Invention
[0005] To address the problem that the uneven mixing of oil, water, and solid materials in food waste leads to severe obstruction and blurred target boundaries and unclear features, existing food waste identification technologies cannot effectively extract the characteristics of foreign matter in food waste, resulting in low identification accuracy. This invention provides a method, device, electronic equipment, and storage medium for identifying foreign matter in food waste. It applies intelligent technology to the food waste sorting stage, detects and identifies foreign matter in food waste, and provides location information, thereby improving the accuracy and speed of target identification and enabling unmanned or minimally manned identification of foreign matter in food waste.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for identifying foreign objects in waste, the method comprising:
[0008] Acquire images of the target waste and identify foreign objects within those images;
[0009] The target waste and foreign objects are labeled to create a target waste and foreign object dataset;
[0010] Using the target garbage and foreign object dataset, the preset model is iteratively optimized and trained. When the preset model reaches the preset standard, the preset model is confirmed as a foreign object recognition model.
[0011] The system acquires images of the garbage to be detected, inputs these images into the foreign object recognition model, and outputs the recognition results.
[0012] In one possible implementation, before labeling the target debris and foreign objects to build a target debris and foreign object dataset, the method further includes:
[0013] Data augmentation of target waste and foreign objects is performed by random cropping, vertical flipping, horizontal flipping, and random rotation at a certain angle.
[0014] In one possible implementation, the target debris is labeled to create a target debris dataset, including:
[0015] Using annotation tools, the location coordinates, size, and category of the target waste / foreign object are annotated to create a dataset of the target waste / foreign object.
[0016] In one possible implementation, the preset model uses the SSD network as the base network, replaces the VGG16 network in the SSD with a multi-branch deep convolutional neural network, and removes the global pooling layer and fully connected layer of the deep convolutional neural network, retaining all the convolutional layers.
[0017] In one possible implementation, the pre-defined model also adds a channel attention mechanism.
[0018] In one possible implementation, the default loss function for the model is Focalloss.
[0019] In one possible implementation, a pre-defined model is iteratively trained and optimized using a target dataset of foreign objects. When the pre-defined model reaches a pre-defined standard, it is confirmed as a foreign object recognition model, including:
[0020] The target dataset of foreign objects is input into a pre-set model for iterative optimization and training to obtain the training results.
[0021] When the training result is lower than the preset average accuracy threshold, modify the preset model parameters until the training result is equal to or greater than the preset average accuracy threshold, then end the iteration and confirm that the preset model is a foreign object recognition model.
[0022] Secondly, the present invention provides a waste foreign object identification device, the device comprising:
[0023] The first image acquisition module is used to acquire images of the target garbage.
[0024] The first image recognition module is used to identify target foreign objects in the target garbage image;
[0025] The annotation module is used to annotate the target waste and foreign objects in order to build a dataset of the target waste and foreign objects;
[0026] The training module uses the target garbage and foreign object dataset to iteratively optimize and train the preset model. When the preset model reaches the preset standard, it is confirmed that the preset model is a foreign object recognition model.
[0027] The second image acquisition module is used to acquire images of the garbage to be detected;
[0028] The second image recognition module is used to input the garbage image to be detected into the foreign object recognition model and output the recognition result.
[0029] Thirdly, an electronic device is provided that carries a resource scheduling system, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0030] Memory, used to store computer programs;
[0031] When a processor executes a program stored in memory, it implements the garbage and foreign object identification method of any embodiment of the first aspect.
[0032] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the foreign object identification method as described in any embodiment of the first aspect.
[0033] The technical solutions provided in the embodiments of the present invention have the following advantages compared with the prior art:
[0034] This invention provides a method for identifying foreign objects in waste. The method involves acquiring a target waste image and identifying target foreign objects within it; labeling the target foreign objects to establish a target waste foreign object dataset; iteratively optimizing and training a preset model using this dataset; and confirming the preset model as a foreign object identification model when it reaches a preset standard; acquiring a waste image to be detected and inputting it into the foreign object identification model to output the identification result. This method can better extract target features in complex environments where targets are occluded, further improving the accuracy and speed of target identification. It solves the problem of low precision in mechanical sorting. Furthermore, in harsh working environments, intelligent identification replaces manual identification, achieving unmanned or minimally manned sorting of kitchen waste, thus addressing the problems of labor shortages and poor working conditions for workers. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of a waste foreign object identification method provided in an embodiment of the present invention;
[0036] Figure 2 This is a schematic diagram of the on-site layout of the waste and foreign object identification method provided in an embodiment of the present invention;
[0037] Figure 3 This is a schematic diagram of a preset model provided in an embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram of the pre-defined model training method.
[0039] Figure 5 This is a schematic diagram of the structure of the foreign object identification device provided in an embodiment of the present invention;
[0040] Figure 6 This is a schematic diagram of another foreign object identification device provided in an embodiment of the present invention;
[0041] Figure 7 This is a schematic diagram of an electronic device structure provided in an embodiment of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0044] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0045] The background technology mentions a patent with publication number CN112660671B that discloses a foreign object image recognition system and management system for kitchen waste. This system obtains foreign object images by performing local image matting on waste images, matches these images with pre-stored foreign object comparison images, and generates corresponding foreign object recognition result information based on the matching results. While this method can classify waste, it requires clear image boundaries, minimal occlusion, and distinct features for feature extraction and matching. Due to the complex oil-water-solid material characteristics and heterogeneity of kitchen waste, the targets to be identified are often obscured by oil stains, leftover food, etc., making it difficult to capture high-level semantic features and complex content through image matting, resulting in a low recognition rate for obscured targets. Deep learning, on the other hand, primarily uses data-driven feature extraction. Learning from a large number of samples can yield deep, dataset-specific feature representations. The extracted abstract features are more robust, have better generalization ability, and can be end-to-end. Therefore, this invention applies deep learning-based target detection technology to the scenario of foreign matter identification in kitchen waste, providing a method, device, electronic equipment, and storage medium for identifying foreign matter in kitchen waste. Specifically, it applies intelligent technology to the kitchen waste sorting stage, detecting and identifying foreign matter in kitchen waste and providing location information, improving the accuracy and speed of target identification, and achieving unmanned or minimally manned identification of foreign matter in kitchen waste. The following uses the application of kitchen waste foreign matter identification by an environmental protection company as an example to illustrate the method, device, electronic equipment, and storage medium for identifying foreign matter in kitchen waste. Foreign matter in kitchen waste mainly includes stainless steel knives, spoons, forks, plastic bottles, plastic bags, beer bottle caps, etc. In this embodiment, plastic bottles are used as the target for identification; the identification method for other foreign matter is the same.
[0046] The following details the methods for identifying foreign objects in waste. (See below for more information.) Figure 1 As shown, Figure 1 This is a schematic flowchart of a waste and foreign object identification method provided by an embodiment of the present invention. Figure 1 As shown, the specific steps of the waste and foreign object identification method include:
[0047] Step 110: Obtain the target garbage image and identify the target garbage foreign objects in the target garbage image.
[0048] For ease of understanding, this invention provides a schematic diagram of the on-site layout of the waste and foreign object identification method, as shown in the figure below. Figure 2As shown, in a food waste treatment plant of an environmental protection company, the food waste sorting conveyor belt is set up as both an identification area and a sorting area. Multiple industrial cameras are installed in the identification area, fixed directly above the conveyor belt. These cameras capture images of the food waste moving at a low, uniform speed on the conveyor belt. The shooting frequency of the industrial cameras is set according to the conveyor belt speed and the field of view, for example, to 25fps. Images from different angles are processed, and images containing plastic bottles are selected. For example, a total of 2000 images are acquired, with the ratio of images containing obscured plastic bottles to images not containing obscured plastic bottles being 9:1.
[0049] It should be noted that, Figure 2 The conveyor belt speed set in the example is 0.14 m / s, the width of the conveyor belt is 700 mm, and the length is 5300 mm. This is only for illustrative purposes to illustrate the embodiment of the present invention and is not a limitation. The parameters can be set according to actual needs.
[0050] Before step 120, in order to enhance the stability and generalization ability of the model and enable the model to effectively extract image features from images of food waste of various shapes, data augmentation is performed by methods such as random cropping, vertical flipping, horizontal flipping and random rotation at a certain angle, and finally a food waste image library containing 6,000 images is established.
[0051] Step 120: Label the target waste and foreign objects to establish a target waste and foreign object dataset.
[0052] In one example, a labeling tool is used to label the location coordinates, size, and category of the target waste object to create a target waste object dataset.
[0053] For example, the annotation tool roLabelImg is used to annotate the plastic bottles in each image of the food waste image database. The annotation information is stored in XML format, which includes the location coordinates, size and category of the plastic bottle. The annotated food waste images are divided into training, testing and validation sets in a ratio of 6:2:2. Finally, a plastic bottle dataset in VOC format is created.
[0054] Step 130: Using the target garbage and foreign object dataset, iteratively optimize and train the preset model. When the preset model reaches the preset standard, confirm that the preset model is a foreign object recognition model.
[0055] Before training, a training model needs to be built. The preset model in this invention uses the SSD network as the base network, replaces the VGG16 network in the SSD with a multi-branch deep convolutional neural network, and removes the global pooling layer and fully connected layer of the deep convolutional neural network, while retaining all the convolutional layers. That is, the preset model in this invention is an improved SSD network model.
[0056] Specifically, SSD was selected as the base network. The entire network mainly consists of a VGG backbone network, deep convolutional layers (ExtraLayers), multi-box layers for bounding box feature extraction, and a loss function (MultiBoxLoss). To reduce the number of parameters and achieve faster recognition speed, the VGG backbone network was replaced with a multi-branch deep convolutional neural network. The global pooling layers and fully connected layers of the deep convolutional neural network were removed, leaving only all convolutional layers. When used as the backbone network, the output feature maps are 38*38, 19*19, and 10*10 pixels in size. Combined with the output feature maps from the extra layers, the sizes are 5*5, 3*3, and 1*1 pixels. A total of six feature maps are extracted for feature extraction. For ease of understanding, the feature maps are explained as follows: the data after the original image is transformed by the convolutional layers is called a feature map. The feature map contains information from the original image and is used to locate and detect objects in the original image.
[0057] To filter out the information that needs to be retained and to focus more on the plastic bottle target, a channel attention mechanism was added. The six extracted feature maps were fed into the channel attention mechanism, and after average pooling, convolution, ReLU activation function, convolution and sigmoid function, new feature maps were obtained. Finally, they were fed into the improved SSD network model for detection.
[0058] Furthermore, to address the imbalance between positive and negative samples, a Focalloss loss function is introduced to replace the original MultiBoxLoss loss function, ultimately constructing an improved SSD network model, such as... Figure 3 As shown.
[0059] The training process of the preset model is described below. See details below. Figure 4 As shown, Figure 4 This is a schematic diagram of the pre-defined model training method, such as... Figure 4 As shown, the training process of the preset model includes:
[0060] Step 210: Input the target garbage and foreign object dataset into the preset model for iterative optimization training to obtain the training results.
[0061] Step 220: When the training result is lower than the preset average accuracy threshold, modify the preset model parameters until the training result is equal to or greater than the preset average accuracy threshold, then end the iteration and confirm that the preset model is a foreign object recognition model.
[0062] To further understand, the training process will be explained in detail below:
[0063] The PyTorch environment used for training the model was set up on a GPU server. After completion, the training set was input into the improved SSD network model for training. The model extracts features through a convolutional neural network, and then uses the final regression layer and classification layer to locate and identify plastic bottles in the image. Through the learning process on the training set, the improved SSD network model has the ability to identify both occluded and unoccluded plastic bottles in food waste.
[0064] The validation set is input into the improved SSD network model for validation. Based on the validation results, the various hyperparameters of the network model are fine-tuned for optimization, and finally the improved SSD network model with the best performance is obtained. Finally, the generalization effect of the final model is tested using the test set.
[0065] Step 140: Obtain the image of the garbage to be detected, input the image of the garbage to be detected into the foreign object recognition model, and output the recognition result.
[0066] The image of the kitchen waste to be detected is input into the trained improved SSD network model. The model extracts key feature information by extracting 6 feature maps and determines whether plastic bottles are present. If no plastic bottles are present, the model indicates that there are no plastic bottles. If plastic bottles are present, the model outputs the location and category information of the plastic bottles.
[0067] Specifically, the location of the plastic bottle in the image is marked with a rectangle, which is called the ground truth bounding box. Using the acquired six feature maps, rectangles of different sizes with varying aspect ratios are predefined at each location on the feature maps to match the bounding boxes of the real objects. Finally, non-maximum suppression is used to output the best predicted bounding box for each location, which represents the positional information.
[0068] This invention provides a method for identifying foreign objects in waste. The method involves acquiring a target waste image and identifying target foreign objects within it; labeling the target foreign objects to establish a target waste foreign object dataset; iteratively optimizing and training a preset model using this dataset; and confirming the preset model as a foreign object identification model when it reaches a preset standard; acquiring a waste image to be detected and inputting it into the foreign object identification model to output the identification result. This method can better extract target features in complex environments where targets are occluded, further improving the accuracy and speed of target identification. It solves the problem of low precision in mechanical sorting. Furthermore, in harsh working environments, intelligent identification replaces manual identification, achieving unmanned or minimally manned sorting of kitchen waste, thus addressing the problems of labor shortages and poor working conditions for workers.
[0069] The above are embodiments of the waste foreign object identification method provided by the present invention. Other embodiments of waste foreign object identification provided by the present invention will be described below. Please refer to the following for details.
[0070] Figure 5 The diagram below shows the structure of a waste foreign object identification device provided in an embodiment of the present invention. The device includes: a first image acquisition module 1, a first image recognition module 2, an annotation module 3, a training module 4, a second image acquisition module 5, and a second image recognition module 6.
[0071] The first image acquisition module 1 is used to acquire the target garbage image;
[0072] The first image recognition module 2 is used to identify target foreign objects in the target garbage image;
[0073] Labeling module 3 is used to label the target waste and foreign objects to create a target waste and foreign object dataset;
[0074] Training module 4 uses the target garbage and foreign object dataset to iteratively optimize and train the preset model. When the preset model reaches the preset standard, the preset model is confirmed as a foreign object recognition model.
[0075] The second image acquisition module 5 is used to acquire images of the garbage to be detected;
[0076] The second image recognition module 6 is used to input the garbage image to be detected into the foreign object recognition model and output the recognition result.
[0077] In one possible implementation, such as Figure 6 As shown, the device also includes a data augmentation module 7, which is used to augment the target waste foreign objects by random cropping, vertical flipping, horizontal flipping and random rotation of a certain angle before labeling the target waste foreign objects to establish a target waste foreign object dataset.
[0078] In one possible implementation, the annotation module 3 is specifically used to use annotation tools to annotate the location coordinates, size information, and category information of the target waste foreign object in order to establish a target waste foreign object dataset.
[0079] In one possible implementation, the preset model uses the SSD network as the base network, replaces the VGG16 network in the SSD with a multi-branch deep convolutional neural network, and removes the global pooling layer and fully connected layer of the deep convolutional neural network, retaining all the convolutional layers.
[0080] In one possible implementation, the pre-defined model also adds a channel attention mechanism.
[0081] In one possible implementation, the default loss function for the model is Focalloss.
[0082] In one possible implementation, training module 4 is specifically used to input the target garbage foreign object dataset into a preset model for iterative optimization training to obtain training results; when the training results are lower than a preset average accuracy threshold, the preset model parameters are modified until the training results are equal to or greater than the preset average accuracy threshold, at which point the iteration ends and the preset model is confirmed as a foreign object recognition model.
[0083] The functions performed by each component in the waste foreign object identification device provided in this embodiment have been described in detail in any of the above method embodiments, and therefore will not be repeated here.
[0084] This invention provides a waste foreign object identification device that acquires a target waste image and identifies target waste foreign objects within the image; labels the target waste foreign objects to establish a target waste foreign object dataset; uses the target waste foreign object dataset to iteratively optimize and train a preset model; when the preset model reaches a preset standard, it is confirmed as a foreign object identification model; acquires a waste image to be detected and inputs it into the foreign object identification model, outputting the identification result. This method can better extract target features in complex environments where targets are occluded, further improving the accuracy and speed of target identification, solving the problem of low precision in mechanical sorting. Furthermore, in harsh working environments, intelligent identification replaces manual identification, achieving unmanned or minimally manned operation in the food waste sorting stage, solving the problems of labor shortages and poor working conditions for workers.
[0085] like Figure 7As shown, this embodiment of the invention provides an electronic device that carries a resource scheduling system as mentioned in any of the above embodiments, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0086] Memory 113 is used to store computer programs;
[0087] In one embodiment of the present invention, when the processor 111 executes the program stored in the memory 113, it implements the garbage and foreign object identification method provided in any of the foregoing method embodiments.
[0088] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the foreign object identification method as provided in any of the foregoing method embodiments.
[0089] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0090] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0091] The above are merely specific embodiments of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A method for identifying foreign objects in waste, characterized in that, The method includes the following steps: Acquire an image of the target waste and identify the target waste foreign objects in the image; The target waste and foreign objects are labeled to establish a dataset of the target waste and foreign objects; Using the target foreign object dataset, the preset model is iteratively optimized and trained. When the preset model reaches the preset standard, it is confirmed as a foreign object recognition model. The preset model uses the SSD network as the base network. The SSD network consists of a VGG backbone network, deep convolutional layers, a bounding box feature extraction network, and a loss function. The VGG16 network in the SSD is replaced with a multi-branch deep convolutional neural network, and the global pooling layer and fully connected layer of the multi-branch deep convolutional neural network are removed, while all convolutional layers are retained. The preset model also adds a channel attention mechanism, and the loss function of the preset model is Focalloss. The system acquires an image of the garbage to be detected and inputs it into the foreign object recognition model, then outputs the recognition result.
2. The method according to claim 1, characterized in that, Before labeling the target waste and foreign objects to establish the target waste and foreign object dataset, the method further includes: The target waste material is augmented by randomly cropping, vertically flipping, horizontally flipping, and randomly rotating at a certain angle.
3. The method according to claim 1, characterized in that, The step of labeling the target waste and foreign objects to establish the target waste and foreign object dataset includes: Using annotation tools, the location coordinates, size, and category of the target waste object are annotated to establish a dataset of the target waste object.
4. The method according to claim 1, characterized in that, The step of iteratively optimizing and training a preset model using the target foreign object dataset, and confirming the preset model as a foreign object identification model when it reaches a preset standard, includes: The target garbage and foreign matter dataset is input into the preset model for iterative optimization and training to obtain training results; When the training result is lower than the preset average accuracy threshold, the preset model parameters are modified until the training result is equal to or greater than the preset average accuracy threshold, at which point the iteration ends and the preset model is confirmed as a foreign object recognition model.
5. A waste foreign object identification device, characterized in that, The device includes: The first image acquisition module is used to acquire images of the target garbage. The first image recognition module is used to identify target foreign objects in the target garbage image; The annotation module is used to annotate the target waste and foreign objects in order to establish the target waste and foreign object dataset; The training module uses the target foreign object dataset to iteratively optimize and train a preset model. When the preset model reaches a preset standard, it is confirmed that the preset model is a foreign object recognition model. The preset model uses the SSD network as the base network. The SSD network consists of a VGG backbone network, deep convolutional layers, a bounding box feature extraction network, and a loss function. The VGG16 network in the SSD is replaced with a multi-branch deep convolutional neural network, and the global pooling layer and fully connected layer of the multi-branch deep convolutional neural network are removed, while all convolutional layers are retained. The preset model also adds a channel attention mechanism, and the loss function of the preset model is Focalloss. The second image acquisition module is used to acquire images of the garbage to be detected; The second image recognition module is used to input the image of the garbage to be detected into the foreign object recognition model and output the recognition result.
6. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in a memory, implements a method for identifying foreign objects as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for identifying foreign objects as described in any one of claims 1-4.
Citation Information
Patent Citations
A foreign object image recognition system and management system for kitchen waste
CN112660671B
Target detection method and device based on attention mechanism deep learning network
CN110852383A
Kitchen garbage impurity identification method based on target detection technology
CN113807347A