Garbage classification system based on computer visionTechnical Field
The invention relates to the technical field of garbage treatment, in particular to a garbage classification system based on computer vision.
Background
With the improvement of the living standard and the increase of various consumptions of modern people, the urban garbage is increasingly generated, and the environmental condition is gradually worsened. In view of the situation, garbage classification is the most effective way to solve the increasing garbage, and is also a scientific management method for effectively disposing garbage, and how to realize the utilization of garbage resources to the maximum extent, reduce the amount of garbage disposal, and improve the living environment state through garbage classification management is an urgent problem to be solved.
Garbage classification is to put garbage into a classified manner at the source, and at present, the garbage is mainly classified into recoverable garbage, harmful garbage, dry garbage, wet garbage and the like. The recyclable garbage mainly comprises waste paper, plastics, glass, metal and the like, and is recyclable, so that the recyclable garbage is very necessary to be classified, recycled and reused.
Present current waste classification device is that there are a plurality of dustbin to constitute, and different types of rubbish is put to the dustbin of difference, all prints the sign of depositing corresponding type rubbish on the surface of every dustbin, but this kind of waste classification device needs user oneself to discern the type that rubbish corresponds, then puts in rubbish to the dustbin that corresponds, and the user sometimes can not be accurate judge the type that rubbish corresponds when putting in, leads to waste classification to put in what implement not very smooth.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a computer vision-based garbage classification system which can realize automatic detection and classification and delivery of garbage.
The technical scheme adopted by the invention for solving the technical problems is as follows: a computer vision based garbage classification system comprises
The identity recognition module is used for acquiring identity information of a current user;
the image acquisition module is used for carrying out image acquisition on the thrown garbage and uploading image acquisition data;
the image recognition module is used for receiving the image acquisition data, judging and analyzing the image acquisition data, classifying the thrown garbage according to the analysis result, and uploading the classified result;
the garbage recycling cabinet comprises a cabinet body, a conveyor belt, a mechanical arm and a plurality of recycling boxes arranged at intervals, wherein the cabinet body is provided with an input port butted with the conveyor belt, the conveyor belt is horizontally arranged in the cabinet body and is positioned above the recycling boxes, and the mechanical arm is used for inputting corresponding garbage into the corresponding recycling boxes according to a classification result;
the control module is in communication connection with the identity recognition module, the image recognition module and the mechanical arm respectively, and is set to control the mechanical arm to grab the garbage and put the garbage into the corresponding recycling bin according to the classification result obtained by the image recognition module and the position information corresponding to the garbage.
The control module stores the registration information of the user, and the registration information is as follows: the identity recognition module obtains user information of a current garbage thrower and then compares the user information with registration information stored in the control module, if the user information is judged to be a registered user, a throw-in port is opened, if the user information is judged to be a non-registered user, the current garbage thrower is prompted to register, and after the registration is successful, the user information of the current garbage thrower is stored in the control module and the throw-in port is opened. In the structure, the garbage recycling cabinet is only opened for trusted users, if the users are registered in advance, the control module stores the user information, once the authentication is passed, the input port can be directly opened, if the users are unregistered users, one or any combination information of user names, user addresses, face information, biological fingerprint information or telephone number information is reserved, and later identification is facilitated.
The image recognition module comprises a deep learning training and calculation unit, and the deep learning training and calculation unit is used for recognizing the material of the garbage according to the image acquisition data to obtain target garbage and position information corresponding to the target garbage.
The deep learning training and calculating unit carries out classified learning on the garbage pictures by imitating the mode of an artificial neural network so as to obtain high-accuracy judgment on garbage category data, and the deep learning training and calculating unit comprises the following specific steps:
step 1, collecting a large amount of garbage image data to form a garbage image data set;
step 2, the garbage image data set in the step S1 is sent into a deep convolutional neural network for model training, and a garbage classification neural network model is generated; in the training process of the garbage classification neural network model, after the garbage image classification model is trained for an epoch, carrying out model verification; after training, testing the garbage image classification model by using a test set, wherein the test set is used for testing the garbage classification capability learned by the deep learning model, and further optimizing and updating the model according to a test result;
step 3, acquiring image acquisition data of the garbage to be classified;
step 4, inputting image acquisition data of garbage to be classified into the garbage classification neural network model in thestep 2;
and 5, obtaining the category of the garbage to be classified according to the output result of the garbage classification neural network model.
In the step 1, a large amount of garbage image data sources are network photos and real life photos, and the garbage image data set is randomly expanded by adopting an image enhancement technology, wherein the image enhancement technology comprises random turning, random brightness and random cutting.
The garbage to be classified comprises recoverable garbage, kitchen garbage, harmful garbage and other garbage, and the four types of the recycling boxes respectively comprise the recoverable garbage, the kitchen garbage, the harmful garbage and the other garbage.
The image acquisition module comprises an image cutting unit and an image processing unit, wherein the image cutting unit is used for cutting the thrown rubbish into 512 pixel 512 picture, and the image processing unit is used for carrying out scale transformation and normalization on the cut picture and then sending the picture to the image identification module. The method has the advantage of accelerating the optimal speed of solving the gradient descent so as to obtain the garbage classification result more quickly.
Compared with the prior art, the invention has the advantages that: according to the garbage sorting device, the garbage to be thrown is identified, and the control module controls the mechanical arm to throw the garbage into the corresponding recycling box, so that the garbage can be correctly sorted, and the sorting efficiency and accuracy are improved; in addition, by means of a deep learning method, the domestic garbage can be classified accurately, and the situation that the user uses the application under the condition of indefinite garbage categories can be guaranteed to obtain the categories accurately and quickly.
Drawings
FIG. 1 is a block diagram of the system of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following drawings and examples, but the present invention is not limited thereto.
Example (b): as shown in the figure, a computer vision-based garbage classification system comprises
The identity recognition module 1 is used for acquiring identity information of a current user;
theimage acquisition module 2 is used for carrying out image acquisition on the thrown garbage and uploading image acquisition data;
the image recognition module 3 is used for receiving the image acquisition data, judging and analyzing the image acquisition data, classifying the thrown garbage according to the analysis result, and uploading the classified result;
the garbage recycling cabinet comprises a cabinet body, a conveyor belt, amechanical arm 5 and a plurality of recycling boxes arranged at intervals, wherein the cabinet body is provided with an input port butted with the conveyor belt, the conveyor belt is horizontally arranged in the cabinet body and is positioned above the recycling boxes, and themechanical arm 5 is used for inputting corresponding garbage into the corresponding recycling boxes according to a classification result;
and the control module 4 is in communication connection with the identity recognition module 1, the image recognition module 3 and themechanical arm 5 respectively, the control module 4 is set to obtain a classification result and position information corresponding to the garbage according to the image recognition module 3, and themechanical arm 5 is controlled to grab the garbage and put the garbage into a corresponding recycling bin.
The control module 4 stores the registration information of the user, and the registration information is as follows: the user identification module 1 obtains user information of a current garbage thrower and then compares the user information with registration information stored in the control module 4, if the user information is judged to be a registered user, a throw-in port is opened, if the user information is judged to be a non-registered user, the current garbage thrower is prompted to register, and after the registration is successful, the user information of the current garbage thrower is stored in the control module 4 and the throw-in port is opened. In the structure, the garbage recycling cabinet is only opened for a trusted user, if the user is registered in advance, the control module 4 stores the user information, once the user passes the authentication, the input port can be directly opened, and if the user is a non-registered user, one or any combination information of the user name, the user address, the face information, the biological fingerprint information or the telephone number information is reserved, so that the later identification is facilitated.
The image recognition module 3 comprises a deep learning training and calculation unit, and the deep learning training and calculation unit is used for recognizing the material of the garbage according to the image acquisition data to obtain the target garbage and the position information corresponding to the target garbage.
The deep learning training and calculating unit carries out classified learning on the garbage pictures by imitating the mode of an artificial neural network so as to obtain high-accuracy judgment on garbage category data, and the method specifically comprises the following steps:
step 1, collecting a large amount of garbage image data to form a garbage image data set;
step 2, the garbage image data set in the step S1 is sent into a deep convolutional neural network for model training, and a garbage classification neural network model is generated; in the training process of the garbage classification neural network model, after the garbage image classification model is trained for an epoch, carrying out model verification; after training, testing the garbage image classification model by using a test set, wherein the test set is used for testing the garbage classification capability learned by the deep learning model, and further optimizing and updating the model according to a test result;
step 3, acquiring image acquisition data of the garbage to be classified;
step 4, inputting image acquisition data of garbage to be classified into the garbage classification neural network model in thestep 2;
and 5, obtaining the category of the garbage to be classified according to the output result of the garbage classification neural network model.
In the step 1, a large amount of garbage image data sources are network photos and real life photos, the garbage image data set is randomly expanded by adopting an image enhancement technology, and the image enhancement technology comprises random turning, random brightness and random cutting.
The categories of the garbage to be classified comprise recoverable garbage, kitchen garbage, harmful garbage and other garbage, and the four categories of the recycling bin respectively comprise recoverable garbage, kitchen garbage, harmful garbage and other garbage.
Theimage acquisition module 2 comprises an image clipping unit and an image processing unit, wherein the image clipping unit is used for clipping the thrown rubbish into 512 pixel 512 image, and the image processing unit is used for carrying out scale transformation and normalization on the clipped image and then sending the same to the image identification module 3. The method has the advantage of accelerating the optimal speed of solving the gradient descent so as to obtain the garbage classification result more quickly.
It should be noted that the above-mentioned embodiments are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereby, and the present invention may be modified in materials and structures, or replaced with technical equivalents, in the constructions of the above-mentioned various components. Therefore, structural equivalents made by using the description and drawings of the present invention or by directly or indirectly applying to other related arts are also encompassed within the scope of the present invention.