Disclosure of Invention
The invention provides a garbage identification evolutionary learning method based on deep learning, which improves the current garbage identification technology, simultaneously updates and improves a trained garbage identification model in real time by taking data with poor identification effect as evolutionary power, so that the trained garbage identification model has instantaneity and accuracy which are not possessed by other garbage recovery devices, greatly reduces the workload of maintenance personnel, realizes accurate classification of a large amount of garbage, solves the problems of limited garbage identification quantity and insufficient accuracy of the current garbage identification device, and meanwhile, continuously performs autonomous updating and optimization in the working process.
The invention also provides a garbage identification evolution learning device based on deep learning.
The invention also aims to provide a garbage recognition evolution learning system based on deep learning.
It is a fourth object of the present invention to provide a storage medium.
The first purpose of the invention can be achieved by adopting the following technical scheme:
the garbage identification evolutionary learning method based on deep learning comprises the following steps:
acquiring image data of a garbage sample;
preprocessing image data of the garbage sample;
taking the preprocessed image data of the garbage sample as an input parameter of a neural network, comparing the input parameter with a trained garbage recognition model, and judging whether recognition is successful or not according to a comparison result;
feeding back corresponding information of the successfully identified garbage to the garbage classification throwing mechanism; wherein the corresponding information of the garbage comprises garbage types;
identifying the garbage sample image data failed in identification again through a ResNet algorithm;
marking the successfully identified garbage sample image data by the ResNet algorithm, feeding corresponding garbage information back to the garbage classification putting mechanism, accumulating the successfully identified marked garbage sample image data, and updating a garbage identification model;
and transmitting the image data of the garbage samples which fail to be identified by the ResNet algorithm to a user or a maintenance person for marking, feeding corresponding garbage information back to the garbage classification putting mechanism, accumulating the image data of the marked garbage samples which fail to be identified, and updating the garbage identification model.
Further, the preprocessed image data of the garbage sample are used as input parameters of a neural network, the input parameters are compared with a trained garbage recognition model, and whether recognition is successful or not is judged according to a comparison result, specifically:
and taking the preprocessed garbage sample image data as an input parameter of a neural network, determining the garbage recognition accuracy and the garbage type through a garbage recognition evaluation system set by a trained garbage recognition model, if the garbage recognition accuracy is greater than or equal to a set threshold, judging that the recognition is successful, and if the garbage recognition accuracy is smaller than the set threshold, judging that the recognition is failed.
Further, the preprocessing the image data of the garbage sample specifically includes: and carrying out mean value removing, normalization, PCA (principal component analysis) and whitening processing on the image data of the garbage sample.
The second purpose of the invention can be achieved by adopting the following technical scheme:
rubbish discernment evolution learning device based on degree of deep learning, the device includes:
the acquisition module is used for acquiring image data of the garbage sample;
the preprocessing module is used for preprocessing the image data of the garbage sample;
the first recognition module is used for comparing the preprocessed image data of the garbage sample, which is used as the input parameter of the neural network, with the trained garbage recognition model, and judging whether the recognition is successful or not according to the comparison result;
the feedback module is used for feeding corresponding information of the garbage back to the garbage classification throwing mechanism when the garbage is successfully identified; wherein the corresponding information of the garbage comprises garbage types;
the second identification module is used for identifying the garbage sample image data with failed identification again through a ResNet algorithm when the identification fails;
the first updating module is used for marking the successfully identified garbage sample image data by the ResNet algorithm, feeding corresponding garbage information back to the garbage classification throwing mechanism, accumulating the successfully identified marked garbage sample image data and updating the garbage identification model;
and the second updating module is used for transmitting the garbage sample image data which fails to be identified by the ResNet algorithm to a user or a maintenance person for marking, feeding corresponding garbage information back to the garbage classification throwing mechanism, accumulating the marked garbage sample image data which fails to be identified, and updating the garbage identification model.
Further, the first identification module specifically includes:
the method is used for determining the recognition accuracy and the garbage type of the garbage by taking the preprocessed garbage sample image data as input parameters of a neural network through a garbage recognition evaluation system set by a trained garbage recognition model, if the recognition accuracy of the garbage is larger than or equal to a set threshold, the recognition is judged to be successful, and if the recognition accuracy of the garbage is smaller than the set threshold, the recognition is judged to be failed.
The third purpose of the invention can be achieved by adopting the following technical scheme:
garbage identification evolution learning system based on deep learning, the system comprises:
the garbage classified throwing mechanism is used for collecting image data of garbage samples and performing classified throwing operation on garbage according to corresponding garbage information fed back by the information processor;
the information processor is used for acquiring the image data of the garbage sample, preprocessing the image data of the garbage sample, comparing the preprocessed image data of the garbage sample with the trained garbage recognition model by taking the preprocessed image data of the garbage sample as an input parameter of a neural network, and judging whether the recognition is successful or not according to a comparison result; feeding back corresponding information of the successfully identified garbage to the garbage classification throwing mechanism; transmitting the garbage sample image data failed to be identified to a server; receiving marked garbage sample image data which is sent by a server and successfully identified, feeding corresponding garbage information back to a garbage classification throwing mechanism, accumulating the marked garbage sample image data which is successfully identified, updating a garbage identification model, receiving marked garbage sample image data which is sent by the server and fails to be identified, feeding corresponding garbage information back to the garbage classification throwing mechanism, accumulating the marked garbage sample image data which is failed to be identified, and updating a garbage identification model; wherein the corresponding information of the garbage comprises garbage types;
the server is used for identifying the garbage sample image data which is failed to be identified again through a ResNet algorithm, marking the garbage sample image data which is successfully identified by the ResNet algorithm, and sending the marked garbage sample image data which is successfully identified to the information processor; and transmitting the garbage sample image data which fails to be identified by the ResNet algorithm to a user or a maintenance person for marking, and sending the marked garbage sample image data which fails to be identified to the information processor.
Further, the system further comprises a human-computer interaction device, the server transmits the garbage sample image data which is identified by the ResNet algorithm and fails to the user for marking through the human-computer interaction device, and if the user does not mark, the server transmits the garbage sample image data which fails to the maintenance personnel for marking.
Further, the garbage classification throwing mechanism comprises a camera, a classification disc, a garbage can, a controller and a plurality of funnel assemblies, wherein the classification disc is arranged at the central position of the garbage can, the classification disc is provided with a plurality of garbage placing parts, the garbage can is provided with a plurality of groups of garbage throwing parts, the funnel assemblies, the garbage placing parts and the garbage throwing parts are all in one-to-one correspondence, each group of garbage throwing parts comprises two garbage throwing parts, each funnel assembly is arranged above the corresponding group of garbage throwing parts and comprises two funnels with opposite directions, the camera is connected with the information processor, the garbage sample sorting device is used for collecting garbage sample image data on the garbage placing parts and transmitting the garbage sample image data to the information processor, and the controller is used for controlling horizontal rotation of the sorting plate and vertical rotation of each garbage placing part and controlling horizontal rotation and vertical rotation of each hopper.
Further, the garbage classification throwing mechanism further comprises a supporting rod, the supporting rod is fixed on the garbage can, and the camera is arranged on the supporting rod.
The fourth purpose of the invention can be achieved by adopting the following technical scheme:
and a storage medium storing a program which, when executed by the processor, implements the above-described garbage recognition evolutionary learning method.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention firstly judges whether the collected garbage sample image data is successfully identified through the trained garbage identification model, under the condition of identification failure, identifying the garbage sample image data which is identified unsuccessfully by a ResNet algorithm, marking the garbage sample image data which is identified successfully by the ResNet algorithm, accumulating the marked garbage sample image data which is identified successfully, updating a garbage identification model, and transmitting the garbage sample image data which fails to be identified by the ResNet algorithm to a user or a maintenance person for marking, accumulating the marked garbage sample image data which fails to be identified, updating the garbage identification model, forming closed-loop updating, the garbage recognition model is updated through the continuously circulating learning process, the evolution trend is reflected, the garbage recognition precision and breadth are greatly improved, and the problem that the recognizable garbage precision and quantity are insufficient due to the fact that training samples are limited in the prior art is solved.
2. The invention has strong real-time performance, can automatically update to a certain extent aiming at the situation that the modern society has numerous commodities, and the types, the appearances and the characteristics of the commodities are continuously changed along with the time, greatly reduces the workload of maintainers, and simultaneously has human-computer interaction which is also beneficial to the wide popularization of the garbage recognition technology.
3. The method has certain popularization, although the method aims at the application of evolutionary learning in the garbage recognition technology, the closed-loop updating system can be popularized to other fields through the modification of the working objects, and the wide popularization of the technology is achieved.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
Example 1:
machine learning is widely applied in the field of target recognition, but most of the data set construction depends on manpower, so that the trained model is always defective, and high-frequency maintenance work of maintenance personnel is required. Therefore, the present embodiment provides a garbage identification evolution learning system based on deep learning, and the system considers that in the field of garbage identification, the types of garbage are different day by day, and the data features that need to be extracted when a computer identifies a target are also variable, so an evolution learning mechanism is proposed, and a computer training model is updated and improved in real time by taking data with poor identification effect as evolution power to adapt to the variability of the identified garbage features, thereby greatly improving the accuracy and the breadth of identification on the basis of the prior art.
As shown in fig. 1 and fig. 2, the deep learning based garbage identification evolutionary learning system of this embodiment includes a garbage classification throwing mechanism 1, an information processor 2 and a server 3, where the information processor 2 is connected to the garbage classification throwing mechanism 1, and the information processor 2 is connected to the server 3 through a communication module 4.
The garbage classification throwing mechanism 1 is used for collecting image data of garbage samples and performing classification throwing operation on garbage according to corresponding garbage information fed back by the information processor.
As shown in fig. 1 to 6, the garbage sorting and feeding mechanism 1 includes a camera 101, a sorting tray 102, a garbage can 103, a controller 104 and four hopper assemblies 105, the sorting tray 102 is disposed at a central position of the garbage can 103, the sorting tray 102 has four garbage placing portions 1021, the garbage can 103 has four sets of garbage feeding portions 1031, the hopper assemblies 105, the garbage placing portions 1021 and the garbage feeding portions 1031 are all in one-to-one correspondence, each set of garbage feeding portions 1031 includes two garbage feeding portions 1031, generally eight garbage feeding portions 103 can feed eight types of garbage, but generally, the types of garbage are not so many, in this embodiment, four garbage feeding portions 103 are respectively used for feeding garbage of metal, plastic, glass and paper, the remaining four garbage feeding portions 103 are used for feeding other garbage, the other garbage refers to the garbage that the information processor 2 and the server 3 both identify failed garbage, acquire its corresponding information, just fall into other rubbish with it, carry out artifical classification after collecting a certain quantity, and alright discern according to the rubbish identification model after the renewal when throwing in rubbish of the same type once more, every funnel subassembly 105 sets up in a set of rubbish of correspondence and puts in portion top, and include two opposite direction's funnel 1051, camera 101 is connected with information processor 2, it adopts for the higher focusing camera of shooting precision (the definition of assurance image), be used for gathering rubbish sample image data on rubbish placing part 1021, and transmit for information processor 2, controller 104 is connected with information processor 2, can adopt STM series's singlechip, be used for the horizontal rotation of control classification dish 102 and the vertical rotation of every rubbish placing part 1021, and the horizontal rotation and the vertical rotation of controlling every funnel 1051.
Specifically, a slip ring 1022 and a first motor 1023 are arranged right below the sorting disc 102, the first motor 1023 can be a double-output-shaft stepping motor, is located below the slip ring 1022 and is connected with a first encoder 1025 through a first coupler 1024, and the first motor 1023 is further connected with the controller 104 through a driving circuit and is used for driving the sorting disc 102 to horizontally rotate according to instructions of the controller; one air cylinder 1026 is arranged below each garbage placing part 1021 of the sorting tray 102, and each air cylinder 1026 is connected with the corresponding garbage placing part 1021 through a connector, so that the corresponding garbage placing part 1021 is pushed to vertically rotate the corresponding garbage placing part 1021, that is, the garbage placing part 1021 can swing around the center of the sorting tray 102.
Specifically, one steering engine 1052 is arranged below each funnel 1051, each steering engine 1052 is fixed below the corresponding funnel 1051 through one steering engine pan-tilt 1053, for each funnel assembly 105, the two steering engine pan-tilts 1053 are respectively connected with a second motor 1054, the second motor 1054 can adopt a stepping motor, the stepping motor is connected with a second encoder 1056 through a second coupler 1055, the second motor 1054 is further connected with the controller 104 through a driving circuit, and is used for driving the two corresponding steering engine pan-tilts 1053 to rotate according to an instruction of the controller 104, so that the corresponding funnel assembly 105 and the two steering engines are horizontally rotated together, and meanwhile, each steering engine 1052 can drive the corresponding funnel 1051 to vertically rotate; when several consecutive garbage of the same type are thrown into the garbage placing part 1021 of the sorting tray 102, the time for waiting for the hopper assembly 105 to rotate back to catch the garbage placing part 1021 can be shortened.
In order to facilitate the camera 101 to collect the image data of the garbage samples on the garbage placing part 1021, the garbage classification putting mechanism further comprises a supporting rod 106, the supporting rod 106 is fixed on the garbage can 103, the camera 101 is arranged on the supporting rod 106, and specifically, the supporting rod 106 is made of an aluminum profile.
The working principle of the garbage classification throwing mechanism 1 of the embodiment is as follows: taking the example that the information processor 2 or the server 3 can successfully identify the type of the trash as an example, when people put the trash on one of the trash placing parts 1021 of the sorting tray 102, the camera 101 collects image data of the trash sample and transmits the image data to the information processor 2, when the controller 104 receives corresponding information of the trash fed back by the information processor 2, the controller 104 controls the first motor 1023 to drive the sorting tray 102 to horizontally rotate so that the trash placing part 1021 for placing the trash horizontally rotates to a group of trash placing parts 1031 positions where the corresponding type is located according to the corresponding information of the trash fed back by the information processor 2, the corresponding information of the trash includes the type of the trash, controls the second motor 1054 to drive the hopper assembly 105 above the group of trash placing parts 1031 to rotate, makes an outlet of one of the hoppers 1051 align with the trash placing part 1021 for placing the trash, and drives the trash placing part 1021 to vertically rotate through the air cylinder 1026, the garbage can enter the hopper 1051, the second motor 1054 is controlled to drive the hopper assembly 105 where the hopper 1051 is located to horizontally rotate, the hopper 1051 is horizontally rotated to the position of the garbage throwing part 1031 where the corresponding type is located, the steering engine 1052 is controlled to vertically rotate the hopper 1051 downwards, and the garbage is thrown into the garbage throwing part 1031 where the corresponding type is located.
The information processor 2 is an embedded system and is used for acquiring garbage sample image data, preprocessing the garbage sample image data, comparing the preprocessed garbage sample image data serving as input parameters of a neural network with a trained garbage recognition model, and judging whether recognition is successful or not according to a comparison result; the auxiliary working peripheral device 5 outputs corresponding information of the successfully identified garbage to a display, and feeds the corresponding information of the successfully identified garbage back to the garbage classification throwing mechanism 1, wherein the corresponding information of the garbage comprises the garbage type, and the garbage classification throwing mechanism 1 sorts and throws the garbage according to the corresponding information of the garbage; transmitting the image data of the garbage samples failed to be identified to the server 3 through the communication module 4, further executing further identification operation, receiving the image data of the marked garbage samples successfully identified sent by the server 3, feeding corresponding garbage information back to the garbage classification throwing mechanism 1, accumulating the image data of the marked garbage samples successfully identified, updating a garbage identification model, receiving the image data of the marked garbage samples failed to be identified sent by the server 3, feeding corresponding garbage information back to the garbage classification throwing mechanism 1, accumulating the image data of the marked garbage samples failed to be identified, and updating the garbage identification model; the corresponding information of the garbage comprises garbage types, the preprocessing comprises mean value removal, normalization, Principal Component Analysis (PCA) and whitening, the size of the preprocessed image is 300 x 300, and the image data of the garbage sample refers to RGB values corresponding to the image; the trained garbage recognition model is trained by a computer through an SSD (single shot multi-box detector) algorithm, the SSD algorithm structure is shown in FIG. 7, after a sufficient number of picture samples with proper sizes are manually arranged, RGB values of images, namely three-dimensional information, are used as input parameters of a computer neural network, and a proper model is formed after a certain training time; as shown in fig. 8, the preprocessed image data of the garbage sample is used as an input parameter of the neural network, and is compared with the trained garbage recognition model, and whether the recognition is successful is determined according to the comparison result, specifically: the preprocessed garbage sample image data is used as an input parameter of a neural network, the recognition accuracy (namely, the recognition accuracy) and the garbage type of the garbage are determined through a garbage recognition evaluation system set by a trained garbage recognition model, namely, the output result is the recognition accuracy and the garbage type of the garbage, if the recognition accuracy of the garbage is greater than or equal to a set threshold value, the recognition is judged to be successful, if the recognition accuracy of the garbage is smaller than the set threshold value, the recognition is judged to be failed, the set threshold value belongs to the garbage recognition evaluation system set by the trained garbage recognition model, the set threshold value is mainly aimed at the recognition result output after the garbage is recognized by an information processor, the influence parameters of the set threshold value comprise the recognition accuracy and the stability coefficient of the recognition result, and the stability coefficient comprises the number of the recognized types of the garbage and the area size of a positioning frame, the whole garbage identification evaluation system determines the next operation by comparing the relative size of the identification result and the set threshold value.
The communication module 4 can adopt a Bluetooth module, a Wi-Fi module or a wired communication device, for communication between the information processor 2 and the server 3, functions to transmit an image that the information processor 2 has failed to recognize to the server 3, meanwhile, the garbage data reprocessed in the server 3 is transmitted back to the information processor 2, specifically, the image data which is transmitted to the server 3 by the communication module 4 and fails to be identified comprises data with low identification accuracy and data with low identification rate (or completely unidentified), the data with low identification accuracy refers to the output identification result with a garbage type identification positioning frame, however, the output recognition accuracy is very low or the recognition is wrong, and the data with relatively low recognition accuracy (or completely unrecognizable) means that the recognition accuracy is lower than that of the former and is almost zero, and even the recognition result has no garbage type recognition positioning frame.
The auxiliary working peripheral device 5 comprises a power supply device and a signal output device, the power supply device provides energy for the whole working structure, the garbage classification throwing mechanism 1 is included, and the signal output device outputs corresponding information of garbage to a display screen.
The server 3 can adopt an enterprise server, considers that the whole garbage identification evolution learning system needs to process a large amount of garbage data, needs strong computing power, and also needs to be networked to build a training set for identifying the garbage sample image data which is failed to be identified again through a ResNet algorithm, marking the garbage sample image data which is successfully identified by the ResNet algorithm, and sending the marked garbage sample image data which is successfully identified to the information processor 2 through the communication module 4; and transmitting the garbage sample image data which fails to be identified by the ResNet algorithm to a user 7 or a maintenance person 8 for marking, and sending the marked garbage sample image data which fails to be identified to the information processor 2 through the communication module 4.
As shown in fig. 8, in this embodiment, two evolution learning manners, namely, correcting the current garbage recognition model by using another garbage recognition model and correcting the current garbage recognition model by using a human-computer interaction device (such as a touch all-in-one machine) 6, accumulating marked garbage sample image data (including original garbage sample image data and corresponding labels), integrating the marked garbage sample image data into a training set on the basis of marked sample data, performing deep learning image recognition training according to a specified threshold, and updating the garbage recognition model; wherein, the other garbage recognition models correct the current garbage recognition model by using an algorithm model with higher recognition rate, lower speed and no mark frame positioning output, the recognized data is used as the garbage sample image data with marks through a series of limits to update the original garbage recognition model, the classifier algorithm of ResNet is adopted to re-mark the garbage sample image data, specifically, three positioning frames with the same size and different proportions and three positioning frames with the same proportion and different sizes are drawn on each pixel point of the image, the positioning frame corresponding to each pixel point is used as the input parameter of ResNet, the output result is the recognition result of each frame, the optimal result is selected as the re-marked garbage sample image data, the marked garbage sample image data with successful recognition is sent to the information processor 2, the information processor 2 accumulates the marked garbage sample image data with successful recognition, integrating into a training set as an input parameter of a neural network of the information processor 2, performing deep learning image recognition training according to a specified threshold value, and updating a garbage recognition model; if the other garbage recognition models fail to recognize the garbage, the man-machine interaction device 6 is used for correcting the current garbage recognition model, the server 3 transmits data to the user 7 or the maintainer 8 through the man-machine interaction device 6 to manually mark the garbage data with lower recognition rate (or completely unrecognizable data), specifically, the man-machine interaction device 6 is used for transmitting the image data of the garbage samples with failed recognition of the other garbage recognition models to the user 7 for marking, if the user 7 does not mark the garbage samples, the server 3 transmits the image data of the garbage samples with failed recognition of the other garbage recognition models to the maintainer 8 for marking, then the image data of the marked garbage samples with failed recognition is sent to the information processor 2, and the information processor 2 is based on the image data of the marked garbage samples, and accumulating the image data of the marked garbage samples failed in recognition, integrating the image data into a training set, performing deep learning image recognition training according to a specified threshold value, and updating a garbage recognition model.
As shown in fig. 1 to 9, the working flow of the garbage identification evolutionary learning system of the present embodiment is as follows:
s1, when the garbage is thrown into the garbage classification throwing mechanism 1, the camera 101 of the garbage classification throwing mechanism 1 starts to collect the image data of the garbage sample, the image data of the garbage sample is preprocessed by the information processor 2, the preprocessing comprises mean value removing, normalization, PCA and whitening, the preprocessed image data is used as the input parameter of the neural network of the information processor 2, the recognition accuracy (namely the recognition accuracy) and the garbage type of the garbage are determined through a garbage recognition evaluation system set by a trained garbage recognition model, if the recognition accuracy of the garbage is larger than or equal to a set threshold value, the recognition is successful, the corresponding information of the successfully recognized garbage is output to a display through the auxiliary working peripheral device 5 and is fed back to the garbage throwing mechanism 1, and the garbage classification throwing mechanism 1 sorts and throws the garbage according to the corresponding information of the garbage, if the recognition accuracy of the garbage is smaller than the set threshold, it is determined that the recognition fails, and step S2 is executed.
S2, the information processor 2 transmits the garbage sample image data failed in recognition to the server 3 through the communication module 4, the data failed in recognition are divided into two types of data with low recognition rate and data with low recognition rate (or completely unrecognizable), the data are recognized again through a ResNet algorithm, if the recognition is successful, the server 3 marks the garbage sample image data successfully recognized by the ResNet algorithm and feeds corresponding garbage information back to the garbage classification putting mechanism 1, the marked garbage sample image data successfully recognized are accumulated, a garbage recognition model is updated, the step S4 is performed, and if the recognition is failed, the step S3 is performed.
S3, the garbage sample image data which are identified by the ResNet algorithm fail is the garbage sample image data which are identified by other models fail, the server 3 transmits the garbage sample image data to the user 7 through the human-computer interaction device 6 for marking, if the user 7 does not mark, the garbage sample image data which are identified by the ResNet algorithm are transmitted to the maintenance personnel 8 for marking, then the marked garbage sample image data which are identified by the ResNet algorithm fail are sent to the information processor 2, the information processor 2 feeds corresponding garbage information back to the garbage classification putting mechanism 1, the marked garbage sample image data which are identified by the ResNet algorithm fail are accumulated based on the marked garbage sample image data, the marked garbage sample image data are integrated into a training set, and deep learning image identification training is carried out according to a specified threshold value.
S4, the garbage classification putting mechanism 1 carries out classification operation according to corresponding garbage information fed back by the information processor 2, normal work of the system and updating of the garbage recognition model are parallel and do not affect each other, after the new garbage recognition model is trained, the system adopts the new garbage recognition model until new recognition error data appears, and the whole learning mechanism is in a closed loop updating state.
Example 2:
as shown in fig. 9, in this embodiment, data processing of the information processor in embodiment 1 is implemented by a server, that is, the server is directly connected to the camera and the controller, and this embodiment provides a garbage recognition evolutionary learning method based on deep learning, where the method is applied to the server and includes the following steps:
and S901, acquiring image data of the garbage sample.
S902, preprocessing the image data of the garbage sample, specifically: and carrying out mean value removing, normalization, PCA (principal component analysis) and whitening processing on the image data of the garbage sample.
S903, taking the preprocessed garbage sample image data as an input parameter of a neural network, comparing the preprocessed garbage sample image data with a trained garbage recognition model, and judging whether recognition is successful according to a comparison result, wherein the method specifically comprises the following steps:
and taking the preprocessed garbage sample image data as an input parameter of a neural network, determining the garbage recognition accuracy and the garbage type through a garbage recognition evaluation system set by a trained garbage recognition model, if the garbage recognition accuracy is greater than or equal to a set threshold, judging that the recognition is successful, and if the garbage recognition accuracy is smaller than the set threshold, judging that the recognition is failed.
S904, feeding back corresponding information of the successfully identified garbage to the garbage classification throwing mechanism; wherein the corresponding information of the garbage comprises garbage types.
And S905, identifying the garbage sample image data failed in identification again through a ResNet algorithm.
S906, marking the successfully identified garbage sample image data by the ResNet algorithm, feeding corresponding garbage information back to the garbage classification throwing mechanism, accumulating the successfully identified marked garbage sample image data, and updating a garbage identification model;
and S907, transmitting the image data of the garbage samples which are identified by the ResNet algorithm and fail to a user or a maintenance person for marking, feeding corresponding garbage information back to the garbage classification throwing mechanism, accumulating the image data of the marked garbage samples which are identified fail, and updating a garbage identification model.
The server comprises a processor, a memory and a network interface which are connected through a system bus; the processor is used for providing calculation and control capabilities, the memory comprises a nonvolatile storage medium and an internal memory, the nonvolatile storage medium stores an operating system, a computer program and a database, the internal memory provides an environment for the operating system and the computer program in the nonvolatile storage medium to run, and when the computer program is executed by the third processor, the garbage recognition evolutionary learning method is realized.
Those skilled in the art will appreciate that all or part of the steps in the method for implementing the above embodiments may be implemented by a program instructing associated hardware, and the corresponding program may be stored in a computer-readable storage medium.
Example 3:
as shown in fig. 10, the present embodiment provides a garbage identification evolution learning apparatus based on deep learning, the apparatus includes an obtaining module 1001, a preprocessing module 1002, a first identifying module 1003, a feedback module 1004, a second identifying module 1005, a first updating module 1006, and a second updating module 1007, and specific functions of each module are as follows:
the obtaining module 1001 is configured to obtain image data of a garbage sample.
The preprocessing module 1002 is configured to preprocess image data of a garbage sample, and specifically includes: the method is used for carrying out mean value removing, normalization, PCA (principal component analysis) and whitening processing on the image data of the garbage sample.
The first identification module 1003 is configured to compare the preprocessed image data of the garbage sample, which is used as an input parameter of the neural network, with a trained garbage identification model, and determine whether the identification is successful according to a comparison result, where the determination specifically is:
the method is used for determining the recognition accuracy and the garbage type of the garbage by taking the preprocessed garbage sample image data as input parameters of a neural network through a garbage recognition evaluation system set by a trained garbage recognition model, if the recognition accuracy of the garbage is larger than or equal to a set threshold, the recognition is judged to be successful, and if the recognition accuracy of the garbage is smaller than the set threshold, the recognition is judged to be failed.
The feedback module 1004 is configured to feed back corresponding information of the successfully identified garbage to the garbage classification and delivery mechanism; wherein the corresponding information of the garbage comprises garbage types.
The second identifying module 1005 is configured to identify the garbage sample image data with failed identification again through the ResNet algorithm.
The first updating module 1006 is configured to mark the successfully identified garbage sample image data by the ResNet algorithm, feed corresponding garbage information back to the garbage classification and delivery mechanism, accumulate the successfully identified marked garbage sample image data, and update the garbage identification model.
The second updating module 1007 is configured to transmit the image data of the garbage sample that fails to be identified by the ResNet algorithm to a user or a maintenance worker for marking, feed corresponding garbage information back to the garbage classification delivery mechanism, accumulate the image data of the marked garbage sample that fails to be identified, and update the garbage identification model.
It should be noted that the system provided in this embodiment is only illustrated by the division of the functional modules, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure is divided into different functional modules to complete all or part of the functions described above.
Example 3:
the present embodiment provides a storage medium, which is a computer-readable storage medium, and stores a computer program, and when the computer program is executed by a processor, the method for performing garbage recognition evolutionary learning according to embodiment 2 above is implemented as follows:
acquiring image data of the garbage sample.
Preprocessing image data of the garbage sample, specifically comprising the following steps: and carrying out mean value removing, normalization, PCA (principal component analysis) and whitening processing on the image data of the garbage sample.
The preprocessed garbage sample image data is used as an input parameter of a neural network, the input parameter is compared with a trained garbage recognition model, and whether recognition is successful or not is judged according to a comparison result, wherein the method specifically comprises the following steps:
and taking the preprocessed garbage sample image data as an input parameter of a neural network, determining the garbage recognition accuracy and the garbage type through a garbage recognition evaluation system set by a trained garbage recognition model, if the garbage recognition accuracy is greater than or equal to a set threshold, judging that the recognition is successful, and if the garbage recognition accuracy is smaller than the set threshold, judging that the recognition is failed.
Feeding back corresponding information of the successfully identified garbage to the garbage classification throwing mechanism; wherein the corresponding information of the garbage comprises garbage types.
And identifying the garbage sample image data with failed identification again through a ResNet algorithm.
Marking the successfully identified garbage sample image data by the ResNet algorithm, feeding corresponding garbage information back to the garbage classification putting mechanism, accumulating the successfully identified marked garbage sample image data, and updating a garbage identification model;
and transmitting the garbage sample image data which fails to be identified by the ResNet algorithm to a user or a maintenance person for marking, accumulating the marked garbage sample image data which fails to be identified, and updating the garbage identification model.
The storage medium in this embodiment may be a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), a usb disk, a removable hard disk, or other media.
In summary, the invention first judges whether the collected garbage sample image data is successfully identified through the trained garbage identification model, under the condition of identification failure, identifying the garbage sample image data which is identified unsuccessfully by a ResNet algorithm, marking the garbage sample image data which is identified successfully by the ResNet algorithm, accumulating the marked garbage sample image data which is identified successfully, updating a garbage identification model, and transmitting the garbage sample image data which fails to be identified by the ResNet algorithm to a user or a maintenance person for marking, accumulating the marked garbage sample image data which fails to be identified, updating the garbage identification model, forming closed-loop updating, the garbage recognition model is updated through the continuously circulating learning process, the evolution trend is reflected, the garbage recognition precision and breadth are greatly improved, and the problem that the recognizable garbage precision and quantity are insufficient due to the fact that training samples are limited in the prior art is solved.
The above description is only for the preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can substitute or change the technical solution and the inventive concept of the present invention within the scope of the present invention.