Garbage identification method and system based on convolutional nerves
Through the garbage recognition method based on convolutional nerves, the garbage spots are automatically identified using aerial images and VGG19 models, which solves the problem of low manual recognition efficiency and achieves efficient garbage recognition and processing.
Patent Information
- Application Number
- CN202411976429.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, garbage identification mainly relies on manual identification, which is time-consuming and labor-intensive and inefficient.
The garbage recognition method based on convolutional nerves is adopted to collect aerial images, classify, enhance and pre-process the image data set, and use the VGG19 model to extract image features to automatically identify suspected garbage points.
It realizes automated garbage identification, saves labor and time costs, and accurately arranges handling personnel.
Smart Images

Figure CN120375223A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to garbage recognition, in particular to a garbage recognition method and system based on convolutional neural network. Background Art
[0002] With the increasing efforts in environmental protection, people have become more aware of the importance of environmental protection. It is necessary to detect garbage in a timely manner and deal with it promptly. At present, it mainly relies on manual identification of whether there is garbage in a certain place, which is time-consuming and laborious. Summary of the Invention
[0003] This application provides a garbage recognition method and system based on convolutional neural network to solve the above problems.
[0004] The present invention provides the following technical solutions: A garbage recognition method based on convolutional neural network, including the following steps: S1. Collect aerial images of the area, and then classify the collected aerial images according to the administrative district level of the area to obtain the required image dataset; S2. Perform image enhancement and preprocessing on the image dataset, and the image enhancement and preprocessing include target background segmentation, image scaling, cropping and size normalization; S3. Input the preprocessed dataset into the VGG19 model to extract image features, so as to obtain images of suspected garbage points.
[0005] Further, the construction steps of the VGG19 model are as follows: The VGG19 model includes 16 convolutional layers, 5 pooling layers and 3 fully connected layers; the 16 convolutional layers are respectively conv1_1, conv1_2, conv2_1, conv2_2, conv3_1, conv3_2, conv3_3, conv3_4, conv4_1, conv4_2, conv4_3, conv4_4, conv5_1, conv5_2, conv5_3, conv5_4; the 5 pooling layers are respectively pool1 between conv1_2 and conv2_1, pool2 between conv2_2 and conv3_1, pool3 between conv3_4 and conv4_1, pool4 between conv4_4 and conv5_1, and pool5 after conv5_4; the 3 fully connected layers are fc6(4096), fc7(4096) and fc8(1000) in sequence after pool5; The convolutional layer and the fully connected layer have weight coefficients. The training parameter optimizer of the VGG19 model uses the SGDM gradient descent algorithm. The batch size MiniBatchSize is the first threshold, the maximum number of iterations MaxEpochs is the second threshold, the learning rate InitialLearnRate is the third threshold, the number of iterations ValidationFrequency between validation metric evaluations is the fourth threshold. The execution environment ExecutionEnvironment of the network is gpu, Verbose is set to false, and the plots Plots to be displayed during training are set to training - progress.
[0006] The first threshold is 20, the second threshold is 20, the third threshold is 0.0001, and the fourth threshold is 30. The above values can be selectively adjusted according to actual usage requirements; Furthermore, the above - mentioned VGG19 model is trained using a training data set pre - labeled with garbage situations; The VGG19 model is tested using a test data set. It can be used when the garbage recognition rate is higher than 90%. Otherwise, the data volume of the sample data set is increased and training continues until the garbage recognition rate is higher than 90%.
[0007] A garbage recognition system based on convolutional neural networks includes at least: An acquisition module, used to acquire aerial images of an area, and then classify the acquired aerial images according to the administrative district level of the area to obtain the required image data set; A processing module, used to perform image enhancement and pre - processing on the image data set. The image enhancement and pre - processing include target - background segmentation, image scaling, cropping, and size normalization; An inference module, used to input the pre - processed data set into the VGG19 model to extract image features, thereby obtaining images of suspected garbage points.
[0008] An electronic device includes: One or more processors; A memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0009] A computer - readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method as described above are implemented.
[0010] The beneficial effects of the present invention are as follows: (1) By the algorithm for automatically identifying garbage, labor costs and time costs are saved; (2) Through the obtained images of the suspected garbage locations, personnel can be accurately arranged for processing. Description of the Drawings
[0011] Figure 1 It is a flowchart of the method of the present invention; Figure 2 It is a module diagram of the system of the present invention; Among them, the acquisition module 1, the processing module 2, and the inference module 3. Detailed Embodiments
[0012] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following will, in combination with the drawings and preferred embodiments, describe in detail the specific embodiments, structures, features, and their effects of the present invention as follows.
[0013] This application intelligently identifies the images of suspected garbage points by collecting aerial images in combination with the VGG19 model, facilitating subsequent processing.
[0014] Embodiment 1 A garbage recognition method based on convolutional neural networks includes the following steps: S1. Collect aerial images of the area, and then classify the collected aerial images according to the administrative district level of the area to obtain the required image dataset; Because the collected data is the data taken by the drone flight, the flown images are relatively large, and the image resolution is 7952×5304. Therefore, first, the aerial images need to be segmented. According to the resolution of the images, the images are evenly divided into 9 equal parts. This can not only increase the number of the dataset but also facilitate the subsequent image preprocessing work more conveniently.
[0015] S2. Perform image enhancement and preprocessing on the image dataset. The image enhancement and preprocessing include target-background segmentation, image scaling, cropping, and size normalization; Perform image enhancement work on the image dataset to reduce the influence of image noise on subsequent work. In addition, in order to enable the images to be input into the convolutional neural network, first, the sizes of all images are adjusted, and all image sizes are normalized to 224×224 using matlab. In order to make the trained model have better generalization ability, a large number of training datasets are required to train the model. In the case where the number of the original image dataset is insufficient, the dataset can be expanded by methods such as image flipping, brightness adjustment, and color adjustment; S3. Input the preprocessed dataset into the VGG19 model to extract image features, thereby obtaining the images of suspected garbage points.
[0016] The construction steps of the VGG19 model are as follows: The VGG19 model includes 16 convolutional layers, 5 pooling layers and 3 fully connected layers; the 16 convolutional layers are conv1_1, conv1_2, conv2_1, conv2_2, conv3_1, conv3_2, conv3_3, conv3_4, conv4_1, conv4_2, conv4_3, conv4_4, conv5_1, conv5_2, conv5_3, conv5_4 respectively; the 5 pooling layers are pool1 between conv1_2 and conv2_1, pool2 between conv2_2 and conv3_1, pool3 between conv3_4 and conv4_1, pool4 between conv4_4 and conv5_1, and pool5 after conv5_4 respectively; the 3 fully connected layers are fc6(4096), fc7(4096) and fc8(1000) in sequence after pool5; The convolutional layers and fully connected layers have weight coefficients. The training parameter optimizer of the VGG19 model uses the SGDM gradient descent algorithm. The batch size MiniBatchSize is 20, the maximum number of iterations MaxEpochs is 20, the learning rate InitialLearnRate is 0.0001, the number of iterations between validation metric evaluations ValidationFrequency is 30, the execution environment ExecutionEnvironment of the network is gpu, Verbose is set to false, and the plots to be displayed during training Plots is set to training-progress.
[0017] The above VGG19 model is trained using a training data set pre-labeled with garbage situations; The VGG19 model is tested using a test data set. It can be used when the garbage recognition rate is higher than 90%, otherwise the data volume of the sample data set is increased and training is continued until the garbage recognition rate is higher than 90%.
[0018] A garbage recognition system based on convolutional neural network at least includes: An acquisition module, which is used to acquire aerial images of the area, and then classify the acquired aerial images according to the administrative district level of the area to obtain the required image data set; A processing module, which is used to perform image enhancement and preprocessing on the image data set. The image enhancement and preprocessing include target background segmentation, image scaling, cropping and size normalization; An inference module, configured to input the preprocessed data set into the VGG19 model to extract image features, thereby obtaining images of suspected garbage points.
[0019] In some embodiments, it further includes a result display module. According to the images of suspected garbage points, the data is uploaded to the background database, and then the data is automatically sent to the result display module, thereby showing all suspected garbage points in the area. Then, staff are dispatched to check and process the suspected garbage points, and after the processing, the processing results are fed back and displayed in the result display module. The result display module can be an APP client, a display, or a notification sent in the form of text messages or emails.
[0020] An electronic device includes: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0021] In the embodiments provided in the present application, it should be understood that the disclosed method and system can also be implemented in other ways. The method and system embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the method, system, method, and computer program product according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0022] In addition, in each embodiment of the present application, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0023] On the other hand, a computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the steps of the above method. When the computer program is executed by the processor, it implements the method according to any one of the above first aspects. If the above functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory 101 (ROM, Read-Only Memory), random access memory 101 (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0024] As described above, the above are only the preferred embodiments of the present invention, and do not impose any formal limitations on the present invention. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to equivalent embodiments by using the technical content disclosed above within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A garbage recognition method based on convolutional neural network, characterized in that, It includes the following steps: S1. Collect the aerial images of the area, and then classify the collected aerial images according to the administrative district level of the area to obtain the required image dataset; S2. Perform image enhancement and preprocessing on the image dataset. The image enhancement and preprocessing include target background segmentation, image scaling, cropping, and size normalization; S3. Input the preprocessed dataset into the VGG19 model to extract image features, so as to obtain the images of suspected garbage points.
2. The method according to claim 1, characterized in that, The construction steps of the VGG19 model are as follows: The VGG19 model includes 16 convolutional layers, 5 pooling layers, and 3 fully connected layers; the 16 convolutional layers are conv1_1, conv1_2, conv2_1, conv2_2, conv3_1, conv3_2, conv3_3, conv3_4, conv4_1, conv4_2, conv4_3, conv4_4, conv5_1, conv5_2, conv5_3, conv5_4 respectively; the 5 pooling layers are pool1 between conv1_2 and conv2_1, pool2 between conv2_2 and conv3_1, pool3 between conv3_4 and conv4_1, pool4 between conv4_4 and conv5_1, and pool5 after conv5_4 respectively; the 3 fully connected layers are fc6(4096), fc7(4096), and fc8(1000) in sequence after pool5; The convolutional layers and fully connected layers have weight coefficients. The training parameter optimizer of the VGG19 model adopts the SGDM gradient descent algorithm. The batch size MiniBatchSize is the first threshold, the maximum number of iterations MaxEpochs is the second threshold, the learning rate InitialLearnRate is the third threshold, the number of iterations between validation metric evaluations ValidationFrequency is the fourth threshold, the execution environment ExecutionEnvironment of the network is gpu, Verbose is set to false, and the plot Plots to be displayed during training is set to training-progress.
3. The method according to claim 2, wherein Use the training dataset with pre-annotated garbage conditions to train the above VGG19 model; Use the test dataset to test the VGG19 model. It can be used when the garbage recognition rate is higher than 90%. Otherwise, increase the data volume of the sample dataset and continue training until the garbage recognition rate is higher than 90%.
4. A garbage recognition system based on convolutional neural network, characterized in that, It includes at least: A collection module, which is used to collect the aerial images of the area, and then classify the collected aerial images according to the administrative district level of the area to obtain the required image dataset; A processing module, which is used to perform image enhancement and preprocessing on the image dataset. The image enhancement and preprocessing include target background segmentation, image scaling, cropping, and size normalization; The inference module is used to input the preprocessed data set into the VGG19 model to extract image features, thereby obtaining images of suspected garbage points.
5. An electronic device, characterized in that, It includes: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-3.
6. A computer-readable storage medium having computer instructions stored thereon, characterized in that, When the instruction is executed by the processor, it implements the steps of the method according to any one of claims 1-3.
Citation Information
Patent Citations
Coal mine overhead man-riding device violation detection and early warning method based on YOLOv3 model
CN112668535A
Coal mine personnel border crossing detection method
CN113449675A
Garbage can overflow degree determination method, device and equipment and garbage can
CN113450401A
Mine blasting safety monitoring and early warning system
CN114202886A
Mine personnel illegal action recognition system based on constructive federal learning
CN115147749A
Cited By
Deodorization method and system for a waste station
CN122789083A