A recognition method and system for beverage bottle classification recycling

By training instance segmentation and machine learning models, the contours of beverage bottles are obtained and the average value of features is extracted. This solves the problems of difficulty in manual classification and inaccurate identification of beverage bottles with similar colors in beverage bottle recycling, and achieves efficient and accurate beverage bottle classification.

CN114821159BActive Publication Date: 2026-05-05XIAMEN LUHAI ENVIRONMENT PROTECTION CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN LUHAI ENVIRONMENT PROTECTION CO LTD
Filing Date
2022-04-07
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In the current beverage bottle recycling process, manual sorting is labor-intensive, and deep learning-based methods are ineffective in classifying beverage bottles of similar colors, especially in complex backgrounds and under changing lighting conditions.

Method used

An instance segmentation model was trained using transfer learning. The model was used to obtain the outline of the beverage bottle and extract the average feature value of the pixels within the outline. This was then combined with a machine learning model for classification, thus solving the problem of accurate classification of beverage bottles.

Benefits of technology

It enables accurate sorting of beverage bottles under complex backgrounds and changing lighting conditions, reducing labor costs and improving the efficiency and accuracy of sorting and recycling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821159B_ABST
    Figure CN114821159B_ABST
Patent Text Reader

Abstract

This invention provides a method for identifying beverage bottles for recycling and sorting. The method includes acquiring original images of beverage bottles, performing preprocessing, annotation, and data augmentation on the original images sequentially, dividing the processed original images into training and testing sets, and then using the training and testing sets to fine-tune the parameters of an instance segmentation model to obtain a trained instance segmentation model. The trained instance segmentation model is then used to predict the outline of each beverage bottle in the original images. Based on the outlines of each beverage bottle, the original images of each bottle are then processed to obtain feature images of each bottle. The average value of each feature image is extracted, and this average value is used as input features to train a machine learning model, resulting in a trained machine learning model. This method enables accurate classification and recycling of beverage bottles, solving the problem of easy confusion between bottles of similar colors during the recycling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of beverage bottle sorting and recycling technology, and in particular to an identification method and system for beverage bottle sorting and recycling. Background Technology

[0002] Beverage bottles are among the most widely used plastic products in daily life. Most beverage bottles are made of PET (Polyester Resin). Recycling and reusing discarded beverage bottles can effectively reduce environmental pollution and resource waste, promoting resource recycling. Currently, the recycling process requires sorting beverage bottles by color to facilitate the generation of different colored plastics and maximize recycling efficiency.

[0003] Traditional beverage bottle recycling requires manual sorting of bottles from mixed household waste. This process is labor-intensive and involves harsh working conditions, hindering large-scale recycling of waste beverage bottles. While automated sorting equipment based on color images of beverage bottles exists, using deep learning to identify them, this method requires a large amount of manually labeled training data and suffers from low detection accuracy, particularly for bottles with similar colors (such as transparent and light blue). Furthermore, for bottles that have lost their labels, color recognition requires threshold segmentation to extract the bottle's outline for localization. In actual sorting operations, factors such as complex backgrounds and varying lighting conditions can prevent threshold segmentation from effectively extracting the bottle's outline, thus affecting the accuracy of color recognition.

[0004] Therefore, how to accurately classify and recycle beverage bottles has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] This invention provides a method for identifying beverage bottles for recycling and sorting, comprising the following steps: S100: acquiring original images of the beverage bottles; S200: preprocessing the acquired original images; S300: labeling the preprocessed original images; S400: performing data augmentation on the labeled original images; S500: dividing the data-augmented original images into training and testing sets, loading an instance segmentation model based on transfer learning, and then fine-tuning the stage parameters of the instance segmentation model using the training and testing sets. Training is performed, and then the instance segmentation model is evaluated using the mean accuracy as an indicator to obtain a trained instance segmentation model; S600: The trained instance segmentation model is used to predict the original image to obtain the outline of each beverage bottle, and then the original image of each beverage bottle is processed by masking according to the outline of each beverage bottle to obtain the feature image of each beverage bottle, and the feature image is stored; S700: The average value of each feature on each feature image is extracted, and the average value is used as the input feature to train the machine learning model; S800: The machine learning model is evaluated to obtain a trained machine learning model.

[0006] In one embodiment, after completing step S800, the following step is further included: S900: exporting the trained instance segmentation model and the trained machine learning model, and then deploying the trained instance segmentation model and the trained machine learning model.

[0007] In one embodiment, in step S100, the original image of the label-removed beverage bottle is acquired using an industrial camera.

[0008] In one embodiment, in step S200, the preprocessing includes image cropping and image scaling.

[0009] In one embodiment, in step S300, the annotation process is semantic annotation process, and the annotation format is COCO format.

[0010] In one embodiment, in step S400, the data augmentation process includes image flipping and image copying.

[0011] In one embodiment, in step S500, the ratio of the number of training sets to the number of test sets is 7:3, and the loaded instance segmentation model adopts the Mask R-CNN architecture.

[0012] In one embodiment, in step S700, the average values ​​of the three colors red, green and blue on each feature image are first extracted, then the format of the feature image is converted to HSV format, and then the average values ​​of the three values ​​of hue, saturation and brightness are calculated respectively. The average values ​​of the six values ​​of red, green, blue, hue, saturation and brightness are used as input features to train the machine learning model.

[0013] In one embodiment, in step S800, the machine learning model is evaluated using recovery rate and purity as indicators.

[0014] This invention also provides an identification system for the sorting and recycling of beverage bottles, comprising: a data acquisition unit for acquiring original images of beverage bottles; a preprocessing unit for preprocessing the acquired original images; a labeling unit for labeling the acquired original images; a data augmentation unit for performing data augmentation on the labeled original images; a segmentation unit for dividing the data-augmented original images into training and testing sets; a loading unit for loading an instance segmentation model, then using the training and testing sets to fine-tune the parameters of the instance segmentation model, and then evaluating the instance segmentation model using the mean precision as an indicator to obtain a trained instance segmentation model; a feature extraction unit for using the trained instance segmentation model to predict the original images, obtaining the contour of each beverage bottle, then performing image matting on the original images of each beverage bottle based on the contour of each beverage bottle to obtain feature images of each beverage bottle, and storing the feature images; a training unit for extracting the average value of each feature on each feature image, and using the average value as input features to train a machine learning model; and an evaluation unit for evaluating the machine learning model to obtain a trained machine learning model.

[0015] One advantage of this invention is that it provides a method and system for identifying beverage bottles for recycling. First, a trained instance segmentation model is obtained. Then, the outline of the beverage bottle is acquired using the trained instance segmentation model. The average value of each feature of the pixels within the outline is extracted as input features. A trained machine learning model is then obtained using the input features. Finally, the beverage bottle recycling operation can be completed using both the trained instance segmentation model and the trained machine learning model. This effectively reduces labor costs and enables accurate classification of beverage bottles under complex backgrounds and changing lighting conditions. It solves the problems of low detection accuracy in beverage bottle recycling and the easy confusion between similarly colored beverage bottles during the recycling process.

[0016] Other features and beneficial effects of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects of the invention and other beneficial effects may be realized and obtained by means of the structures particularly pointed out in the description, claims, etc. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Unless otherwise specified, the positional relationships in the drawings described below are based on the direction in which the components are drawn in the figures.

[0018] Figure 1 This is a flowchart illustrating an identification method for sorting and recycling beverage bottles according to an embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of the original image provided in an embodiment of the present invention;

[0020] Figure 3 It is the outline of the beverage bottle extracted by the instance segmentation model;

[0021] Figure 4 It is an image of a single beverage bottle used to train a machine learning model. Detailed Implementation

[0022] 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. The technical features designed in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0023] In the description of this invention, it should be understood that the terms "center," "lateral," "upper," "lower," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the system or component referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more. Additionally, the term "comprising" and any variations thereof mean "at least comprising."

[0024] Please see Figures 1 to 4 , Figure 1 This is a schematic flowchart of an identification method for sorting and recycling beverage bottles according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the original image provided in an embodiment of the present invention. Figure 3 It is the beverage bottle outline extracted by the instance segmentation model. Figure 4 This is a single beverage bottle image used to train a machine learning model. To achieve at least one or more of the aforementioned advantages, an embodiment of the present invention provides an identification method for beverage bottle sorting and recycling. As shown in the figure, the identification method for beverage bottle sorting and recycling includes the following steps:

[0025] S100: Capture the raw image of the beverage bottle;

[0026] S200: Preprocess the acquired raw images;

[0027] S300: Annotate the preprocessed original image;

[0028] S400: Perform data augmentation processing on the labeled original image;

[0029] S500: Divide the original image after data augmentation into training set and test set, load the instance segmentation model based on transfer learning, then use the training set and test set to train the instance segmentation model for fine-tuning stage parameters, and then evaluate the instance segmentation model with the mean accuracy as the indicator to obtain the trained instance segmentation model.

[0030] S600: Use the trained instance segmentation model to predict the original image, obtain the outline of each beverage bottle, and then perform image matting on the original image of each beverage bottle according to the outline of each beverage bottle to obtain the feature image of each beverage bottle and store the feature image.

[0031] S700: Extracts the average value of each feature on each feature image and uses the average value as the input feature to train the machine learning model;

[0032] S800: Evaluate the machine learning model to obtain a well-trained machine learning model.

[0033] As further explained in the figure, after completing step S800, the following steps may also be included:

[0034] S900: Export the trained instance segmentation model and the trained machine learning model, and then deploy the trained instance segmentation model and the trained machine learning model.

[0035] In step S100, a beverage bottle label remover is used to remove labels from the beverage bottles, peeling off the outer packaging labels and designs. The label-removed bottles are then fed onto a conveyor belt, which transports them to an industrial camera. The industrial camera captures the original images of the bottles. The industrial camera can be a linear color camera or an area color camera, etc. The acquired image data can be in RGB three-channel format, and the image format can be PNG. In one embodiment, to improve sorting efficiency, a single image can contain multiple beverage bottle targets. During loading, the bottles can be loaded in batches according to their color, with each color bottle stored in the same folder. This facilitates labeling the original images, ensuring that all original images in a folder are of the same color, meaning all original images in a folder have the same type of label.

[0036] In step S200, the acquired raw image can be preprocessed using a program written based on OpenCV. OpenCV is a cross-platform computer vision and machine learning software library released under the Apache 2.0 license (open source), which can run on Linux, Windows, Android, and Mac OS operating systems. Preprocessing may include image cropping and scaling, etc., to facilitate subsequent use of the raw image and minimize deviations.

[0037] In step S300, the original images are manually annotated using image annotation software. The annotation process is semantic annotation, indicating the classification attribute of the original image. The image annotation software is LabelMe, the annotation format is COCO (Common Objects in Context), and the generated annotation file is in JSON format. In one embodiment, only a small number of original images need to be manually annotated, such as 50 original images, which can effectively train the subsequent instance segmentation model and save on labor costs.

[0038] In step S400, data augmentation processing may include operations such as image flipping and image copying to increase the number of samples in the labeled original image.

[0039] In step S500, the ratio of training set to test set can be 7:3. The loaded instance segmentation model can adopt the Mask R-CNN architecture, and then use the pre-trained weights from the ImageNet dataset as initial training parameters for fine-tuning parameter training. After training, the instance segmentation model with the highest mean average precision (mAP) is selected as the final instance segmentation model used, i.e., the trained instance segmentation model. Fine-tuning parameter training refers to a training method that fixes the weights of the feature extraction layer and trains only the fully connected layers, which can obtain a more accurate instance segmentation model.

[0040] In step S600, the trained instance segmentation model is used to predict the original images in all folders collected in step S100, obtaining the outline of each beverage bottle. Based on the outline, each beverage bottle is then cut out to obtain its feature image, which is then stored in the computer. When storing the feature image data of a single beverage bottle, the size of the outer rectangle can be calculated based on the bottle's outline. The rectangular area is then cropped from the original image, and the values ​​of all pixels outside the outline are set to 0. Beverage bottles of each color are stored in the same folder for easy labeling. In other words, the cropped image contains the beverage bottle image within the outline and the background color of the conveyor belt outside the outline. By setting all pixel values ​​outside the outline to 0, the background color of the conveyor belt can be processed into pure black, making it easier to identify the beverage bottle image within the outline.

[0041] In step S700, the average values ​​of the red, green, and blue color channels are first extracted from each feature image. Then, the feature image format is converted to HSV format, and the average values ​​of the hue, saturation, and brightness channels are calculated. Finally, the average values ​​of the above six channels are used as input features to train the machine learning model. In one embodiment, only pixels within the contour are calculated during extraction, ignoring pixels outside the contour. It should be noted that the contour of the beverage bottle is an irregular image (e.g., ...). Figure 3 As shown in the figure, the image obtained by masking in step S600 is a regular square image. At this time, the image still contains the beverage bottle and the image outside the outline of the beverage bottle, but the image outside the outline is black, so the influence of the image outside the outline can be ignored when extracting features. Please refer to Table 1, which shows some examples of input features for beverage bottles of different colors. Table 1 is only a reference example and is not intended to limit the present invention.

[0042] Table 1. Examples of input features for beverage bottles of different colors

[0043]

[0044] In step S800, the machine learning model is evaluated using recovery rate and purity as indicators. Recovery rate = number of correctly classified bottles of that type / total number of bottles of that type; purity = number of correctly classified bottles of that type / total number of objects identified as belonging to that type. During evaluation, individual bottles in each folder are assigned the same label by the program, eliminating the need for manual labeling. When saving the model, the machine learning model with the highest recovery rate and purity values ​​is selected as the trained machine learning model, or the machine learning model with the best overall attributes is selected as the trained machine learning model. Please refer to Table 2, which shows the recovery rate and purity of the trained machine learning model for recycling and sorting beverage bottles of different colors. Blue beverage bottles include light blue beverage bottles. As shown in the table, the recovery rate and purity of all types of beverage bottles reach over 96%, demonstrating that transparent and light blue beverage bottles can also be accurately classified, effectively solving the problem of easy confusion and identification of beverage bottles of similar colors during the recycling process.

[0045] Table 2. Recovery rate and purity of beverage bottles of different colors

[0046] Beverage bottle color Recovery rate purity transparent 97.3% 96.4% blue 97.1% 98.5% green 99.0% 98.5%

[0047] In step S900, the exported trained instance segmentation model and trained machine learning model can be used for online detection and recognition. The trained models can be deployed to various systems, such as Windows systems. Considering that calling the instance segmentation model requires significant computation, it can be deployed on a GPU version. Since the machine learning model does not require extensive computation, it can be deployed on a CPU version.

[0048] The present invention also provides an identification system for the sorting and recycling of beverage bottles, which may include a data acquisition unit, a preprocessing unit, a labeling unit, a data augmentation unit, a partitioning unit, a loading unit, a feature extraction unit, a training unit, and an evaluation unit.

[0049] The acquisition unit acquires raw images of beverage bottles. The preprocessing unit preprocesses the acquired raw images. The annotation unit annotates the acquired raw images. The data augmentation unit augments the annotated raw images. The partitioning unit divides the augmented raw images into training and testing sets. The loading unit loads the instance segmentation model, then trains it using the training and testing sets to fine-tune its parameters. The model is then evaluated using the mean precision as an indicator to obtain a trained instance segmentation model. The feature extraction unit uses the trained instance segmentation model to predict the outline of each beverage bottle in the raw images. Based on the outlines, it performs image matting on the raw images of each beverage bottle to obtain feature images, which are then stored. The training unit extracts the average value of each feature from the feature images and uses this average value as input to train the machine learning model. The evaluation unit evaluates the machine learning model to obtain a trained machine learning model.

[0050] Furthermore, the identification system for beverage bottle sorting and recycling may also include an export unit for exporting a trained instance segmentation model and a trained machine learning model. For example... Figure 4 As shown, the individual beverage bottle images used to train the machine learning model are all square images, which is beneficial for training the machine learning model.

[0051] In summary, this invention provides a method and system for identifying and classifying beverage bottles for recycling. First, a trained instance segmentation model is obtained, and then the outline of the beverage bottle is acquired using this model. Compared to the traditional method of obtaining the outline through threshold segmentation, the beverage bottle outline obtained by the instance segmentation model in this invention is more effective. Next, the average value of each feature of the pixels within the outline is extracted as input features, and then a trained machine learning model is obtained using these input features. Finally, the beverage bottle classification and recycling operation can be completed using both the trained instance segmentation model and the trained machine learning model. This effectively reduces labor costs and enables accurate classification of beverage bottles even under complex backgrounds and varying lighting conditions. It solves the problems of low detection accuracy in beverage bottle recycling and the easy confusion between similarly colored beverage bottles during the recycling process.

[0052] Furthermore, those skilled in the art should understand that although many problems exist in the prior art, each embodiment or technical solution of the present invention can be improved in only one or a few aspects, without necessarily solving all the technical problems listed in the prior art or the background art simultaneously. Those skilled in the art should understand that any content not mentioned in a claim should not be construed as a limitation on that claim.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying beverage bottles for sorting and recycling, characterized in that: The identification method includes the following steps: S100: Acquire the original image of the beverage bottle; S200: Preprocess the acquired raw image; S300: Perform annotation processing on the preprocessed original image; S400: Perform data augmentation processing on the annotated original image; S500: Divide the original image after data augmentation into a training set and a test set, load the instance segmentation model based on transfer learning, and then use the training set and the test set to train the instance segmentation model for fine-tuning stage parameters. Then, evaluate the instance segmentation model with the mean of average accuracy as an indicator to obtain the trained instance segmentation model. S600: Use the trained instance segmentation model to predict the original image, obtain the outline of each beverage bottle, and then perform image matting on the original image of each beverage bottle according to the outline of each beverage bottle to obtain the feature image of each beverage bottle, and store the feature image. S700: Extract the average value of each feature on each feature image, and use the average value as the input feature to train a machine learning model; S800: Evaluate the machine learning model to obtain a trained machine learning model; In step S700, the average values ​​of red, green and blue are extracted from each feature image. Then, the feature image is converted to HSV format. The average values ​​of hue, saturation and brightness are calculated. The average values ​​of red, green and blue, hue, saturation and brightness are used as input features to train the machine learning model. In step S500, the ratio of the number of training sets to the number of test sets is 7:

3. The loaded instance segmentation model adopts the Mask R-CNN architecture, and then uses the pre-trained weights of the ImageNet dataset as the initial training parameters for fine-tuning stage parameter training. After training, the instance segmentation model with the highest average accuracy is selected as the final instance segmentation model. The fine-tuning stage parameter training refers to obtaining the instance segmentation model by fixing the weights of the feature extraction layer and training only the fully connected layers.

2. The identification method for beverage bottle sorting and recycling according to claim 1, characterized in that: After completing step S800, the following steps are also included: S900: Export the trained instance segmentation model and the trained machine learning model, and then deploy the trained instance segmentation model and the trained machine learning model.

3. The identification method for beverage bottle sorting and recycling according to claim 1, characterized in that: In step S100, the original image of the label-removed beverage bottle is acquired using an industrial camera.

4. The identification method for sorting and recycling beverage bottles according to claim 1, characterized in that: In step S200, the preprocessing includes image cropping and image scaling.

5. The identification method for beverage bottle sorting and recycling according to claim 1, characterized in that: In step S300, the annotation process is semantic annotation process, and the annotation format is COCO format.

6. The identification method for beverage bottle sorting and recycling according to claim 1, characterized in that: In step S400, the data augmentation process includes image flipping and image copying.

7. The identification method for beverage bottle sorting and recycling according to claim 1, characterized in that: In step S800, the machine learning model is evaluated using recovery rate and purity as indicators.

Citation Information

Patent Citations

  • Color recognition method, device and equipment and storage medium

    CN112489143A

  • Beverage bottle recovery visual detection method based on transfer learning

    CN113111792A