Automatic classification and recycling method of indoor garbage
By using automated waste recycling devices and YOLO V8 model recognition technology, the problem of incorrect indoor waste sorting has been solved, achieving intelligent and automatic sorting and recycling, reducing the burden on residents and the workload of staff.
Patent Information
- Application Number
- CN202310615973.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-05-29
AI Technical Summary
The existing indoor waste sorting method is cumbersome, leading to residents sorting incorrectly, increasing psychological stress and the workload of secondary sorting, and the existing mixed waste bins also increase the burden on subsequent staff.
An automatic waste recycling device is adopted, including a rotating waste bin, a waste carrying device, a waste identification device, and control components. It achieves automatic waste sorting and recycling through sound source localization, camera recognition, and rotation adjustment components, and uses the YOLO V8 model to identify waste types.
It enables intelligent and automatic sorting and recycling of indoor waste, reducing the sorting burden on residents, standardizing waste disposal behavior, and improving waste treatment efficiency.
Smart Images

Figure CN116534461B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of waste recycling technology, and in particular to an automatic indoor waste sorting and recycling method. Background Technology
[0002] With China's rapid economic development and the increasingly serious waste problem, waste sorting has become imperative. Shanghai, as one of China's most economically developed cities, took the lead in implementing mandatory waste sorting on July 1, 2019. According to regulations, household waste in Shanghai is divided into four categories: recyclables, hazardous waste, wet waste, and dry waste. Due to the relatively complicated sorting methods, ordinary residents, without specific training in waste sorting, were caught off guard by the sudden new policy. The potential penalties for incorrect waste sorting also created significant psychological pressure for residents.
[0003] Furthermore, regardless of whether it is a residence or a business, the current practice is to put all the garbage in one garbage bin. This results in the garbage being mixed together, and some people will directly throw the mixed garbage into the public garbage collection point, which requires staff to sort it again. Some people will have to sort the garbage at the public garbage collection point, which causes a lot of inconvenience to people living indoors. Summary of the Invention
[0004] Based on this, the purpose of this invention is to propose an automatic indoor waste sorting and recycling method for use in indoor living, office and other places where people are active. This method can intelligently and proactively sort and recycle indoor waste without requiring manual sorting, which greatly facilitates the lives of people indoors.
[0005] According to the present invention, an automatic indoor waste sorting and recycling method is proposed. The method is implemented through an automatic waste recycling device, which includes a fixed support, a movable chassis disposed at the lower end of the fixed support, a sound source positioning device disposed on the fixed support, a rotating waste bin, a waste carrying device, a waste identification device, and control components, wherein:
[0006] The rotating trash can is provided with several partitions to divide the inner cavity of the rotating trash can into multiple recycling spaces, each recycling space corresponding to a type of waste, and the bottom of the rotating trash can is provided with a first rotation adjustment component;
[0007] The waste-carrying device includes a waste-carrying platform, a weighing sensor disposed inside the waste-carrying platform, and a second rotation adjustment component connected to the waste-carrying platform;
[0008] The waste identification device includes a camera and a dataset training and processing device electrically connected to the camera. The control device is electrically connected to the moving disk, the sound source localization device, the first rotation adjustment component, the weighing sensor, the second rotation adjustment component, the camera, and the dataset training and processing device.
[0009] The method includes:
[0010] When the sound source localization device receives a garbage collection instruction within a preset range, the controller generates a movement path according to the garbage collection instruction within a first preset time, and controls the mobile chassis to reach the destination of the sound source that issued the garbage collection instruction according to the movement path.
[0011] Upon reaching the destination of the sound source, the weighing sensor monitors the current weight of the waste carrying platform every second preset time interval, so that the control device can determine whether the current weight is greater than a preset weight threshold.
[0012] If the current weight is greater than a preset weight threshold, the controller controls the camera to turn on so that the camera can take pictures of the garbage placed on the garbage carrier platform and send the pictures to the dataset training processing device to identify the type of garbage and obtain the target type of garbage corresponding to the garbage placed on the garbage carrier platform.
[0013] The controller obtains the rotation direction and rotation angle of the rotating trash can according to preset rules and the target type of waste, so that the first rotation adjustment component rotates the recycling space corresponding to the target type of waste to a preset reference point according to the rotation direction and rotation angle;
[0014] When the recycling space corresponding to the target waste type rotates to a preset reference point, the controller controls the second rotation adjustment component to open within a third preset time period, so that the waste carrying platform rotates longitudinally by a first preset angle.
[0015] In summary, based on the aforementioned indoor automatic waste sorting and recycling method, the automatic waste recycling device is triggered by receiving a waste recycling command from the user. A movement path is then generated based on this command, allowing the device to intelligently move to the user's location. A weighing sensor continuously monitors the current weight of the waste carrier to determine if any waste has been placed on it. If the current weight exceeds a preset weight threshold, it is determined that waste has been placed on the carrier, and a camera is then used to photograph the waste. The dataset is used to train a processing device to identify the target waste type from the photographed image. Following preset rules, the waste is then placed in the recycling space corresponding to the target waste type, thus achieving automatic waste sorting and recycling. This greatly facilitates and standardizes indoor waste sorting for personnel.
[0016] In a preferred embodiment of the present invention, the step of the controller generating a movement path according to the waste collection instruction within a first preset time period and controlling the mobile chassis to reach the destination of the sound source that issued the waste collection instruction according to the movement path includes:
[0017] Obtain the overall map of the target room and the location information of all static obstacles in the target room, and construct a two-dimensional array structure map based on the overall map and the location information of all static obstacles;
[0018] The estimated location information of the sound source generated by the sound source localization device according to the garbage collection instruction is obtained, so as to generate the movement path according to the estimated location information of the sound source and the two-dimensional array structure map.
[0019] In a preferred embodiment of the present invention, the mobile chassis is provided with ranging sensors electrically connected to the control device, wherein the ranging sensors are one or both of laser ranging sensors and ultrasonic distance sensors. When the mobile chassis moves forward according to the moving path, the method further includes:
[0020] The distance between the automatic waste recycling device and the obstacle in front is obtained by the distance measuring sensor every fourth preset time interval, and it is determined whether the distance in the current period is less than a first preset distance threshold.
[0021] If the interval distance is less than the first preset distance threshold, the position information of the obstacle in front is obtained according to the current interval distance with the obstacle in front, and the movement path is updated according to the position information of the obstacle in front, so that the mobile chassis moves forward according to the updated movement path.
[0022] In a preferred embodiment of the present invention, the step of sending the captured image to the dataset training processing device for waste type identification to obtain the target waste type corresponding to the waste placed on the waste carrier platform includes:
[0023] Obtain the original garbage image dataset and perform data augmentation on the acquired images to obtain the data-augmented image dataset;
[0024] The augmented image dataset is preprocessed to obtain a preprocessed image dataset.
[0025] Build a YOLO V8 model, and train the built YOLO V8 model on the preprocessed image dataset to obtain a trained YOLO V8 model;
[0026] Input the garbage image to be identified into the trained YOLOV8 model to obtain the garbage type results output by the YOLO V8 model.
[0027] In a preferred embodiment of the present invention, the step of the control device obtaining the rotation direction and rotation angle of the rotating trash can according to a preset rule and the target waste type, so that the first rotation adjustment component rotates the recycling space corresponding to the target waste type to a preset reference point according to the rotation direction and rotation angle, includes:
[0028] Obtain the name of the current recycling space at the preset reference point, and according to the preset recycling space distribution map, obtain the number of recycling spaces between the current recycling space name and the target recycling space name in the clockwise and counterclockwise directions, respectively, and select the direction with the smallest number of recycling spaces as the target rotation direction.
[0029] The target rotation angle is calculated based on the amount of reclaimable space corresponding to the target rotation direction.
[0030] In a preferred embodiment of the present invention, the structure of the YOLO V8 model is as follows: starting from the input end of the YOLO V8 model, the YOLO V8 model sequentially includes an input layer, a first convolutional module, a second convolutional module, a first C2F module, a third convolutional module, a second C2F module, a fourth convolutional module, a third C2F module, a fifth convolutional module, a fourth C2F module, an SPPF module, a first upsampling layer, a fifth C2F module, a second upsampling layer, a sixth C2F module, a sixth convolutional module, a seventh C2F module, a seventh convolutional module, an eighth C2F module, a first Detect module, a second Detect module, and a third Detect module;
[0031] The input image is sequentially fed into the first and second convolutional modules for convolution processing. The feature map processed by the second convolutional module is then fed into the first C2F module. The feature map processed by the first C2F module is then fed into the third convolutional module. The feature map processed by the third convolutional module is then fed into the second C2F module. The output of the second C2F module includes branches 1.1 and 1.2, where branch 1.2 feeds the feature map into the fourth convolutional module. The feature map processed by the fourth convolutional module is then fed into the third C2F module. The output of the third C2F module includes... Branches 2.1 and 2.2 are used. Branch 2.2 inputs the feature map into the fifth convolutional module. The feature map processed by the fifth convolutional module is input into the fourth C2F module. The feature map processed by the fourth C2F module is input into the SPPF module. The output of the SPPF module includes branches 3.1 and 3.2. Branch 3.2 inputs the feature map into the second upsampling layer for amplification. The feature map output from the second upsampling layer is concatenated with the feature map output from branch 2.1. The concatenated feature map is then input into the fifth C2F module. The fifth C2F... The module's output includes branches 4.1 and 4.2. Branch 4.2 inputs the feature map into the first upsampling layer for amplification. The feature map processed by the first upsampling layer is concatenated with the feature map output by branch 1.1. The concatenated feature map is input into the sixth C2F module. The output of the sixth C2F module includes branches 5.1 and 5.2. Branch 5.1 inputs the feature map into the first Detect module, and branch 5.2 inputs the feature map into the sixth convolution module for convolution processing. The feature map processed by the sixth convolution module is concatenated with the feature map output by branch 4.1. The concatenated feature map is input into the seventh C2F module. The output of the seventh C2F module includes branches 6.1 and 6.2. Branch 6.1 inputs the feature map into the second Detect module, and branch 6.2 inputs the feature map into the seventh convolution module for convolution processing. The feature map processed by the seventh convolution module is concatenated with the feature map output by branch 3.1. The concatenated feature map is input into the eighth C2F module. The feature map processed by the eighth C2F module is input into the third Detect module.
[0032] In a preferred embodiment of the present invention, the structure of each C2F module in the YOLO V8 model is as follows:
[0033] Starting from the input of the C2F module, the C2F module sequentially includes an eighth convolutional module, a split module, n Bottleneck modules, and a ninth convolutional module. The split module is used to divide the feature map with the first number of channels output by the eighth convolutional module into two sets of feature maps with a second preset number of channels. One set of feature maps with a second preset number of channels is sequentially input into the n Bottleneck modules. Each Bottleneck module outputs two sets of feature maps with a second preset number of channels. The other set of feature maps with a second preset number of channels output by the split module is concatenated with the feature maps with a second preset number of channels output by each Bottleneck module and then input into the ninth convolutional module.
[0034] In a preferred embodiment of the present invention, data enhancement of the acquired image includes flipping, scaling, and color gamut changes on the junk image.
[0035] In a preferred embodiment of the present invention, the Bottleneck module sequentially includes a tenth convolutional module and an eleventh convolutional module; when the Shortcut setting of the Bottleneck module is false, the input feature map is sequentially input to the tenth convolutional module and the eleventh convolutional module; when the Shortcut setting of the Bottleneck module is false, the input feature map is first sequentially input to the tenth convolutional module and the eleventh convolutional module, and then concatenated with the feature map output by the eleventh convolutional module on the channel.
[0036] In a preferred embodiment of the present invention, the SPPF module sequentially includes a twelfth convolutional module, a first max pooling layer, a second max pooling layer, a third max pooling layer, and a thirteenth convolutional module, wherein the feature maps output by the twelfth convolutional module, the first max pooling layer, the second max pooling layer, and the third max pooling layer are concatenated on the channel.
[0037] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by means of embodiments of the invention. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the automatic waste recycling device proposed in this invention;
[0039] Figure 2 This is a flowchart of the automatic indoor waste sorting and recycling method in the first embodiment of the present invention;
[0040] Figure 3 A flowchart of the automatic indoor waste sorting and recycling method in the second embodiment of the present invention;
[0041] Figure 4This is a diagram of the YOLO V8 network structure according to the second embodiment of the present invention;
[0042] Figure 5 This is a network structure diagram of the C2F module according to the second embodiment of the present invention;
[0043] Figure 6 A network structure diagram of the Bottleneck module according to the second embodiment of the present invention;
[0044] Figure 7 SPPF module network structure diagram of the second embodiment of the present invention;
[0045] Figure 8 Network structure diagram of the Detect module in the second embodiment of the present invention;
[0046] Figure 9 The network structure diagram of the convolutional module in the second embodiment of the present invention;
[0047] Figure 10 A preset recycling space distribution diagram of the second embodiment of the present invention.
[0048] Symbol description: Fixed bracket 10, movable chassis 20, sound source positioning device 30, rotating trash can 40, partition 401, first rotation adjustment component 402, trash carrying platform 501, second rotation adjustment component 502, camera 601, dataset training and processing device 602.
[0049] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0050] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0052] Please see Figure 1The diagram shows the structure of the automatic waste recycling device of the present invention. The device includes a fixed support 10, a movable chassis 20 located at the lower end of the fixed support 10, a sound source positioning device 30 mounted on the fixed support 10, a rotating waste bin 40, a waste carrying device, a waste identification device, and control components.
[0053] The rotating trash can 40 is provided with several partitions 401 to divide the inner cavity of the rotating trash can 40 into multiple recycling spaces. Each recycling space corresponds to a type of waste. The bottom of the rotating trash can 40 is provided with a first rotation adjustment component 402, which is used to adjust the rotation angle of the rotating trash can 40. That is, each recycling space is used to collect one type of waste. In this embodiment, the number of recycling spaces can be customized. That is, people indoors can choose according to the types of waste they encounter daily. In addition, in some optional embodiments of the present invention, the number of recycling spaces can also be set with reference to the number of waste types in the national classification standard.
[0054] The waste carrying device includes a waste carrying platform 501, a weighing sensor disposed inside the waste carrying platform 501, and a second rotation adjustment component 502 connected to the waste carrying platform 501. It should be noted that the waste carrying platform 501 is used to place waste, and the weighing sensor is used to sense whether the waste carrying platform 501 has waste on it.
[0055] The waste identification device includes a camera 601 and a dataset training processing device 602 electrically connected to the camera 601. The control device is electrically connected to the moving disk, the sound source positioning device 30, the first rotation adjustment component 402, the weighing sensor, the second rotation adjustment component 502, the camera 601, and the dataset training processing device 602. It should be noted that the dataset training processor stores a model for identifying the type of waste corresponding to the waste in the image. The camera 601 is used to take pictures of the waste placed on the waste carrying platform 501. The second rotation adjustment component 502 is used to adjust the rotation angle of the waste carrying platform 501 so that the waste placed on the waste carrying platform 501 falls into the corresponding recycling space.
[0056] Please see Figure 2 The diagram shows a flowchart of an automatic indoor waste sorting and recycling method according to a first embodiment of the present invention. The method includes steps S01 to S05, wherein:
[0057] Step S01: When the sound source localization device receives a garbage collection instruction within a preset range, the controller generates a movement path according to the garbage collection instruction within a first preset time, and controls the mobile chassis to reach the destination of the sound source that issued the garbage collection instruction according to the movement path.
[0058] It should be noted that in this step, the waste recycling instruction is a voice command issued by the user. The sound source localization device detects the voice command and determines that the user currently has a need for waste sorting and recycling. It then generates a movement path to the user within a specified time and can reach the sound source destination in a timely manner based on the movement path.
[0059] Step S02: After reaching the destination of the sound source, the weighing sensor monitors the current weight of the garbage carrying platform every second preset time interval, so that the control device can determine whether the current weight is greater than the preset weight threshold.
[0060] Step S03: If the current weight is greater than the preset weight threshold, the controller controls the camera to turn on so that the camera takes pictures of the garbage placed on the garbage carrier platform and sends the pictures to the dataset training processing device to identify the type of garbage and obtain the target type of garbage corresponding to the garbage placed on the garbage carrier platform.
[0061] Understandably, when the automatic waste recycling device reaches the destination of the sound source, the user needs to place the waste on the waste carrying platform. The purpose of the weighing sensor is to determine whether there is waste on the waste carrying platform. If the current weight on the waste carrying platform is greater than the preset weight threshold, it means that there is waste on the waste carrying platform. At this time, the controller will control the camera to take a picture and then identify the picture.
[0062] Step S04: The controller obtains the rotation direction and rotation angle of the rotating trash can according to the preset rules and the target waste type, so that the first rotation adjustment component rotates the recycling space corresponding to the target waste type to the preset reference point according to the rotation direction and rotation angle;
[0063] It should be noted that once the target type of waste is obtained, the recycling space where the waste needs to be put in can be locked. This allows the rotation direction and angle to be obtained according to the preset control rules and the locked recycling space. The locked recycling space is then rotated to a preset reference point. This preset reference point always corresponds to the drop-in port after the waste carrying platform is tilted, ensuring that the waste on the waste carrying platform will only fall into the recycling space at the preset reference point.
[0064] Step S05: When the recycling space corresponding to the target waste type rotates to a preset reference point, the controller controls the second rotation adjustment component to open within a third preset time period, so that the waste carrying platform rotates longitudinally by a first preset angle.
[0065] The purpose of controlling the rotation at the first preset angle is to tilt the waste carrier platform, so that the waste placed on the waste carrier platform falls into the recycling space at the preset reference point, thereby completing the waste sorting and recycling work.
[0066] Please see Figure 3 The diagram shows a flowchart of an automatic indoor waste sorting and recycling method according to a second embodiment of the present invention. The method includes steps S101 to S107, wherein:
[0067] Step S101: Obtain the overall map of the target room and the location information of all static obstacles in the target room, and construct a two-dimensional array structure map based on the overall map and the location information of all static obstacles;
[0068] Step S102: Obtain the estimated location information of the sound source generated by the sound source localization device according to the garbage collection instruction, so as to generate the movement path according to the estimated location information of the sound source and the two-dimensional array structure map;
[0069] It should be noted that the method in this embodiment is only for indoor waste recycling. Considering that there may be many obstacles in the indoor space, it is necessary to obtain the location information of all static obstacles in the target room (the working area of the automatic waste recycling device) in advance, so as to construct a two-dimensional data structure diagram. This allows the controller to know which locations in the overall diagram contain static obstacles, and thus effectively avoid static obstacles when generating the movement path.
[0070] In addition, since there may be some dynamic obstacles in the target space during actual use, the mobile chassis is equipped with distance measuring sensors that are electrically connected to the control device. The distance measuring sensors are one or both of laser distance measuring sensors and ultrasonic distance sensors. In order to avoid dynamic obstacles, the control device first obtains the distance between the automatic garbage recycling device and the obstacle in front by the distance measuring sensor every fourth preset time interval, and determines whether the distance of the current cycle is less than a first preset distance threshold.
[0071] If the interval distance is less than the first preset distance threshold, the position information of the obstacle in front is obtained according to the current interval distance with the obstacle in front, and the movement path is updated according to the position information of the obstacle in front, so that the moving chassis can move forward according to the updated movement path, thereby ensuring that the automatic garbage recycling device can move forward according to the continuously updated movement path when it moves, so as to reach the sound source destination.
[0072] Step S103: After reaching the destination of the sound source, the weighing sensor monitors the current weight of the garbage carrier every second preset time interval, so that the control device can determine whether the current weight is greater than the preset weight threshold.
[0073] Step S104: If the current weight is greater than a preset weight threshold, the controller controls the camera to turn on so that the camera takes pictures of the garbage placed on the garbage carrier platform and sends the pictures to the dataset training processing device to identify the type of garbage and obtain the target type of garbage corresponding to the garbage placed on the garbage carrier platform.
[0074] It should be noted that the dataset training processing device stores the trained YOLO V8 model. To obtain the trained YOLO V8 model, the original garbage image dataset is first acquired, and the acquired images are data augmented to obtain the data-augmented image dataset. Then, the data-augmented image dataset is preprocessed to obtain the preprocessed image dataset. A YOLO V8 model is constructed, and the constructed YOLO V8 model is trained on the preprocessed image dataset to obtain the trained YOLO V8 model. The garbage image to be identified is input into the trained YOLO V8 model to obtain the garbage type result output by the YOLO V8 model.
[0075] Please see Figure 4 The structure of the YOLO V8 model is as follows: starting from the input end of the YOLO V8 model, the YOLO V8 model sequentially includes an input layer, a first convolutional module, a second convolutional module, a first C2F module, a third convolutional module, a second C2F module, a fourth convolutional module, a third C2F module, a fifth convolutional module, a fourth C2F module, an SPPF module, a first upsampling layer, a fifth C2F module, a second upsampling layer, a sixth C2F module, a sixth convolutional module, a seventh C2F module, a seventh convolutional module, an eighth C2F module, a first detection module, a second detection module, and a third detection module;
[0076] The input image is sequentially fed into the first and second convolutional modules for convolution processing. The feature map processed by the second convolutional module is then fed into the first C2F module. The feature map processed by the first C2F module is then fed into the third convolutional module. The feature map processed by the third convolutional module is then fed into the second C2F module. The output of the second C2F module includes branches 1.1 and 1.2, where branch 1.2 feeds the feature map into the fourth convolutional module. The feature map processed by the fourth convolutional module is then fed into the third C2F module. The output of the third C2F module includes... Branches 2.1 and 2.2 are used. Branch 2.2 inputs the feature map into the fifth convolutional module. The feature map processed by the fifth convolutional module is input into the fourth C2F module. The feature map processed by the fourth C2F module is input into the SPPF module. The output of the SPPF module includes branches 3.1 and 3.2. Branch 3.2 inputs the feature map into the second upsampling layer for amplification. The feature map output from the second upsampling layer is concatenated with the feature map output from branch 2.1. The concatenated feature map is then input into the fifth C2F module. The fifth C2F... The module's output includes branches 4.1 and 4.2. Branch 4.2 inputs the feature map into the first upsampling layer for amplification. The feature map processed by the first upsampling layer is concatenated with the feature map output by branch 1.1. The concatenated feature map is input into the sixth C2F module. The output of the sixth C2F module includes branches 5.1 and 5.2. Branch 5.1 inputs the feature map into the first Detect module, and branch 5.2 inputs the feature map into the sixth convolution module for convolution processing. The feature map processed by the sixth convolution module is concatenated with the feature map output by branch 4.1. The concatenated feature map is input into the seventh C2F module. The output of the seventh C2F module includes branches 6.1 and 6.2. Branch 6.1 inputs the feature map into the second Detect module, and branch 6.2 inputs the feature map into the seventh convolution module for convolution processing. The feature map processed by the seventh convolution module is concatenated with the feature map output by branch 3.1. The concatenated feature map is input into the eighth C2F module. The feature map processed by the eighth C2F module is input into the third Detect module.
[0077] Optional, please refer to Figure 5 The structure of each C2F module in the YOLO V8 model is as follows:
[0078] Starting from the input of the C2F module, the C2F module sequentially includes an eighth convolutional module, a split module, n Bottleneck modules, and a ninth convolutional module. The split module is used to divide the feature map with the first number of channels output by the eighth convolutional module into two sets of feature maps with a second preset number of channels. One set of feature maps with a second preset number of channels is sequentially input into the n Bottleneck modules. Each Bottleneck module outputs two sets of feature maps with a second preset number of channels. The other set of feature maps with a second preset number of channels output by the split module is concatenated with the feature maps with a second preset number of channels output by each Bottleneck module and then input into the ninth convolutional module.
[0079] Optional, please refer to Figure 6 The Bottleneck module includes a tenth convolutional module and an eleventh convolutional module. When the Shortcut setting of the Bottleneck module is false, the input feature map is sequentially input into the tenth and eleventh convolutional modules. When the Shortcut setting of the Bottleneck module is false, the input feature map is first sequentially input into the tenth and eleventh convolutional modules, and then concatenated with the feature map output by the eleventh convolutional module on the channel.
[0080] Optional, please refer to Figure 7 The SPPF module sequentially includes a twelfth convolutional module, a first max pooling layer, a second max pooling layer, a third max pooling layer, and a thirteenth convolutional module. The feature maps output by the twelfth convolutional module, the first max pooling layer, the second max pooling layer, and the third max pooling layer are concatenated on the channel.
[0081] Optional, please refer to Figure 8 The first Detect module has a stride of 8, the second Detect module has a stride of 16, and the third Detect module has a stride of 32. The structures of the first Detect module, the second Detect module, and the third Detect module all include two channels. One channel includes a fourteenth convolutional module, a fifteenth convolutional module, a convolutional layer, and a regression loss function in sequence. The other channel includes a sixteenth convolutional module, a seventeenth convolutional module, a convolutional layer, and a classification loss function in sequence.
[0082] Optional, please refer to Figure 9 The structure of each convolutional module in the YOLO V8 model is as follows:
[0083] Starting from the input of the convolutional module, the convolutional module sequentially includes a convolutional layer, a batch normalization layer, and a SiLU activation function.
[0084] Table 1 Performance Test Results of YOLO V5 Model
[0085]
[0086] Table 2. Randomly Selected Garbage Detection Results from the YOLO V8 Model
[0087]
[0088] Table 3. YOLO V8's data on various types of waste detection
[0089]
[0090]
[0091] The specific working process of this embodiment is as follows: First, the YOLO V8 model input port is an image in the format of 640*640*3. After the first 3*3 convolution (K--number of filters s---stride P---padding size), the output image is in the format of 320*320*64*w, where w controls the network width. The internal structure of the convolution module is a 2D image convolution operation and a BN (normalization) operation (to speed up image convergence). Finally, the output after the convolution operation is obtained through the SiLU activation function, and then the output image is output in the format of 160*160*128*w through a 3*3 convolution kernel.
[0092] After using the first C2F module designed with Yolov8, the output format is 160*160*128*w. The first C2F module further subdivides the input image format into H*W*c_in, passing a 1*1 convolution kernel with C=c_out to output H*W*c_out. The Split module then segments the image into H*W*0.5c_out and another H*W*0.5c_out. This module introduces the concept of residual blocks, which are imported into the Bottleneck module. The results obtained by setting shortcut values for multiple Bottlenecks are then concatenated using the Concat module in the subsequent output decision. If we assume there are n Bottlenecks introduced at the front end, the output after concatenation (summation) by the Concat module is H*W*0.5(n+2)c_out. Finally, a 1*1 convolution kernel is used to output H*W*c_out.
[0093] After the first C2F module, there is a 3*3 convolution kernel. The output of this convolution kernel is 80*80*256*w. This image is then input into the second C2F module, and the output is an 80*80*256*W format image.
[0094] The second C2F module includes two branches: branch 1.2 points to SPPF and branch 1.1 points to the first Detect module, with a stride of 8.
[0095] Branch 1.2 passes the image in 80*80*256*w format to a 3*3 convolution kernel, outputting a 40*40*512*w format image file, which is then passed to the third C2F module. The third C2F module outputs two branches: one pointing to SPPF branch 2.2, and the other with a stride of 16 pointing to the second Detect module. Both branches output images in 40*40*512*w format. Branch 2.2 then passes the image to a 3*3 convolution kernel, outputting a 20*20*512*w*r format image, which is then passed to the fourth C2F module. The output image in 20*20*512*w*r format is then passed to the final SPPF module.
[0096] In the SPPF module, the data is first passed through a 1x1 convolutional kernel, then through three 2x2 max pooling layers. The outputs of the 1x1 convolutional kernel and the three 2x2 max pooling layers are branched out, and these branches are concatenated at the final concat module. Finally, a 1x1 convolutional kernel is passed through the SPPF module to obtain its final output. This output is 20*20*512*w*r with a stride of 32, and it branches out two ways.
[0097] Branch 3.1 points to the third Detect. Branch 3.2 obtains an image file with an output of 40*40*512*w*r through upsampling and enters the concat module of the previous branch 2.2 for concatenation. The resulting image is 40*40*512*w*(1+r). It then passes through the fifth C2F module, where the shortcut value is set to false (if shortcut is true, it will be concatenated with the original image input after passing through a 1*1 convolution kernel and a 3*3 convolution kernel; if shortcut is false, it will not be concatenated after passing through a 1*1 convolution kernel and a 3*3 convolution kernel, and the result will be output directly). The output is 40*40*512*w. The output of the fifth C2F module includes two branches: branch 4.2 points to upsampling, and branch 4.1 points to the downward concatenation part.
[0098] The upsampling method yields an output of 80*80*256*w, which, along with branch 1.1, enters the concat module for concatenation. The resulting image, in 80*80*512*w format, passes through the sixth C2F module with its shortcut set to false. The final output is 80*80*256*w, and this output branch 5.1 points to the first Detect module.
[0099] The Detect module employs an anchorless design, dividing the input into two branches that pass through two 3x3 convolutional kernels and one 1x1 convolutional kernel. In the 1x1 convolutional kernel, the upper branch c = 4 * reg_max (number of channels) and the lower branch c = nc (number of categories) output the corresponding upper branch BBOX.LOSS and lower branch Cls.Loss, thus yielding the final loss function value.
[0100] Branch 5.2 passes through a 3*3 convolution kernel and, along with branch 4.1, enters the concat module for concatenation, outputting a 40*40*512*w format image. This result is then passed to the seventh C2F module, again yielding a 40*40*512*w format image. Branch 6.1 points to the second Detect module, while branch 6.2 continues through a 3*3 convolution kernel, producing a 20*20*512*w format image. This image, along with branch 3.1, enters the concat module for concatenation, resulting in a 20*20*512*w*(1+r) format image. Finally, this 20*20*512*w format image is passed through the eighth C2F module and sent to the third Detect module.
[0101] The three detector modules (first, second, and third) from top to bottom correspond to large target detection, medium target detection, and small target detection in image processing, respectively. Their corresponding strides are stride=8, stride=16, and stride=32. In this embodiment, Reg_max defaults to 16.
[0102] In this context, n=3*d for the first C2F module, n=6*d for the second C2F module, n=6*d for the third C2F module, n=3*d for the fourth C2F module, n=3*d for the fifth C2F module, n=3*d for the sixth C2F module, n=3*d for the seventh C2F module, and n=3*d for the eighth C2F module, where d is the depth of the control network.
[0103] In summary, this invention employs data augmentation, increasing data diversity by performing operations such as image flipping, scaling, and color gamut changes, significantly improving the detection of small targets. Furthermore, compared to the previous YOLO v5 which used adaptive anchor box calculation based on anchor box ratios, the current YOLO v8 abandons the previous Anchor Base approach and uses the Anchor Free concept. Therefore, YOLO v8 is an anchorless model, meaning that it can directly predict the center of the object instead of relying on known anchor box offsets. The Anchor Free approach reduces the number of predicted boxes and accelerates Non-Maximum Suppression (NMS). The Input is connected to the Backbone network, which uses two consecutive 3x3 convolutions compared to YOLO v8, directly reducing the resolution by a factor of 4. Simultaneously, the C3 module in YOLO v8 is replaced with a C2F module, enriching the model's gradient flow through more branch layers. Compared to the SPP module, the SPPF module changes the simple parallel max pooling to a serial + parallel approach. It replaces the single large pooling kernel in the SPP module with multiple cascaded small pooling kernels, thus improving running speed while retaining the original functionality—fusing feature maps from different receptive fields and enriching the expressive power of feature maps. The Backbone is connected to the Neck & Head, and the Head (detection head) in the Neck & Head has been decoupled from its original coupled head. Compared to YOLO v8's AnchorBase, YOLO v8 uses Anchor Free. The PANet in the Neck & Head introduces a bottom-up path, making it easier for information from lower layers to be passed to higher layers, thus fully fusing features from different layers. The PaFPN structure is still used to construct YOLO's feature pyramid, enabling more comprehensive fusion of information at various scales.
[0104] Step S105: Obtain the current recycling space name at the preset reference point, and according to the preset recycling space distribution map, obtain the number of recycling spaces between the current recycling space name and the target recycling space name in the clockwise and counterclockwise directions, respectively, and select the direction with the smallest number of recycling spaces as the target rotation direction.
[0105] It should be noted that in order to quickly rotate the target recycling space to the preset reference point, the number of recycling spaces can be quickly determined based on the preset recycling space distribution map, and then the rotation angle of the target recycling space to the preset reference point can be calculated. In this embodiment, the controller will select the direction with the smallest rotation angle as the target rotation direction.
[0106] For examples, not limitations, please refer to Figure 10The diagram shows the preset recycling space distribution. When the detected waste is hazardous waste, and the preset reference point corresponds to other waste, the number of recycling spaces in the clockwise and counterclockwise directions is 0 and 2 respectively. Therefore, the controller will select the direction with the smallest interval of 0, that is, the target rotation direction is clockwise. At the same time, the rotation angle is equal to the number of interval recycling spaces plus one and then multiplied by the preset standard angle value. The preset standard angle value is obtained by dividing 360 degrees by the total number of divided recycling spaces.
[0107] Step S106: Calculate the target rotation angle based on the amount of recovery space corresponding to the target rotation direction;
[0108] Step S107: When the recycling space corresponding to the target waste type rotates to a preset reference point, the controller controls the second rotation adjustment component to open within a third preset time period, so that the waste carrying platform rotates longitudinally by a first preset angle.
[0109] In summary, based on the aforementioned indoor automatic waste sorting and recycling method, the automatic waste recycling device is triggered by receiving a waste recycling command from the user. A movement path is then generated based on this command, allowing the device to intelligently move to the user's location. A weighing sensor continuously monitors the current weight of the waste carrier to determine if any waste has been placed on it. If the current weight exceeds a preset weight threshold, it is determined that waste has been placed on the carrier, and a camera is then used to photograph the waste. The dataset is used to train a processing device to identify the target waste type from the photographed image. Following preset rules, the waste is then placed in the recycling space corresponding to the target waste type, thus achieving automatic waste sorting and recycling. This greatly facilitates and standardizes indoor waste sorting for personnel.
[0110] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0111] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for automatic indoor waste sorting and recycling, characterized in that, The method is implemented using an automatic waste recycling device, which includes a fixed support, a movable chassis located at the lower end of the fixed support, a sound source positioning device located on the fixed support, a rotating waste bin, a waste carrying device, a waste identification device, and control components, wherein: The rotating trash can is provided with several partitions to divide the inner cavity of the rotating trash can into multiple recycling spaces, each recycling space corresponding to a type of waste, and the bottom of the rotating trash can is provided with a first rotation adjustment component; The waste-carrying device includes a waste-carrying platform, a weighing sensor disposed inside the waste-carrying platform, and a second rotation adjustment component connected to the waste-carrying platform; The waste identification device includes a camera and a dataset training and processing device electrically connected to the camera. The control device is electrically connected to the mobile chassis, the sound source localization device, the first rotation adjustment component, the weighing sensor, the second rotation adjustment component, the camera, and the dataset training and processing device. The method includes: When the sound source localization device receives a garbage collection command within a preset range, the controller generates a movement path according to the garbage collection command within a first preset time period, and controls the mobile chassis to reach the destination of the sound source that issued the garbage collection command according to the movement path. The steps of the controller generating a movement path according to the garbage collection command within the first preset time period and controlling the mobile chassis to reach the destination of the sound source that issued the garbage collection command according to the movement path include: Obtain the overall map of the target room and the location information of all static obstacles in the target room, and construct a two-dimensional array structure map based on the overall map and the location information of all static obstacles; The sound source localization device obtains the estimated location information of the sound source generated according to the garbage collection instruction, and generates the movement path according to the estimated location information of the sound source and the two-dimensional array structure map; Upon reaching the destination of the sound source, the weighing sensor monitors the current weight of the waste carrying platform every second preset time interval, so that the control device can determine whether the current weight is greater than a preset weight threshold. If the current weight is greater than a preset weight threshold, the controller controls the camera to turn on so that the camera can take pictures of the garbage placed on the garbage carrier platform and send the pictures to the dataset training processing device to identify the type of garbage and obtain the target type of garbage corresponding to the garbage placed on the garbage carrier platform. The controller obtains the rotation direction and rotation angle of the rotating trash can according to preset rules and the target waste type, so that the first rotation adjustment component rotates the recycling space corresponding to the target waste type to a preset reference point according to the rotation direction and rotation angle. The step of the controller obtaining the rotation direction and rotation angle of the rotating trash can according to preset rules and the target waste type, so that the first rotation adjustment component rotates the recycling space corresponding to the target waste type to the preset reference point according to the rotation direction and rotation angle, includes: Obtain the name of the current recycling space at the preset reference point, and according to the preset recycling space distribution map, obtain the number of recycling spaces between the current recycling space name and the target recycling space name in the clockwise and counterclockwise directions, respectively, and select the direction with the smallest number of recycling spaces as the target rotation direction. The target rotation angle is calculated based on the number of recycling spaces corresponding to the target rotation direction. The specific process is as follows: when the identified waste is hazardous waste, and the preset reference point corresponds to other waste, the number of recycling spaces in the clockwise and counterclockwise directions is 0 and 2 respectively. Therefore, the controller will select the smallest direction, i.e., 0 spaces, which means the target rotation direction is clockwise. At the same time, the rotation angle is equal to the number of recycling spaces plus one and then multiplied by the preset standard angle value. The preset standard angle value is obtained by dividing 360 degrees by the total number of recycling spaces. When the recycling space corresponding to the target waste type rotates to a preset reference point, the controller controls the second rotation adjustment component to open within a third preset time period, so that the waste carrying platform rotates longitudinally by a first preset angle.
2. The automatic indoor waste sorting and recycling method according to claim 1, characterized in that, The mobile chassis is equipped with ranging sensors electrically connected to the control device. The ranging sensors are one or both of laser ranging sensors and ultrasonic distance sensors. When the mobile chassis moves forward according to the moving path, the method further includes: The distance between the automatic waste recycling device and the obstacle in front is obtained by the distance measuring sensor every fourth preset time interval, and it is determined whether the distance in the current period is less than a first preset distance threshold. If the interval distance is less than the first preset distance threshold, the position information of the obstacle in front is obtained according to the current interval distance with the obstacle in front, and the movement path is updated according to the position information of the obstacle in front, so that the mobile chassis moves forward according to the updated movement path.
3. The automatic indoor waste sorting and recycling method according to claim 1, characterized in that, The step of sending the captured images to the dataset training processing device for waste type identification, and obtaining the target waste type corresponding to the waste placed on the waste carrier platform, includes: Obtain the original garbage image dataset and perform data augmentation on the acquired images to obtain the data-augmented image dataset; The augmented image dataset is preprocessed to obtain a preprocessed image dataset. Build a YOLO V8 model, and train the built YOLO V8 model on the preprocessed image dataset to obtain a trained YOLO V8 model; Input the garbage image to be identified into the trained YOLO V8 model to obtain the garbage type results output by the YOLO V8 model.
4. The indoor waste automatic sorting and recycling method according to claim 3, characterized in that, The structure of the YOLO V8 model is as follows: starting from the input end of the YOLO V8 model, the YOLO V8 model sequentially includes an input layer, a first convolutional module, a second convolutional module, a first C2F module, a third convolutional module, a second C2F module, a fourth convolutional module, a third C2F module, a fifth convolutional module, a fourth C2F module, an SPPF module, a first upsampling layer, a fifth C2F module, a second upsampling layer, a sixth C2F module, a sixth convolutional module, a seventh C2F module, a seventh convolutional module, an eighth C2F module, a first detection module, a second detection module, and a third detection module; The input image is sequentially fed into the first and second convolutional modules for convolution processing. The feature map processed by the second convolutional module is then fed into the first C2F module. The feature map processed by the first C2F module is then fed into the third convolutional module. The feature map processed by the third convolutional module is then fed into the second C2F module. The output of the second C2F module includes branches 1.1 and 1.2, where branch 1.2 feeds the feature map into the fourth convolutional module. The feature map processed by the fourth convolutional module is then fed into the third C2F module. The output of the third C2F module includes... Branches 2.1 and 2.2 are used. Branch 2.2 inputs the feature map into the fifth convolutional module. The feature map processed by the fifth convolutional module is input into the fourth C2F module. The feature map processed by the fourth C2F module is input into the SPPF module. The output of the SPPF module includes branches 3.1 and 3.
2. Branch 3.2 inputs the feature map into the second upsampling layer for amplification. The feature map output from the second upsampling layer is concatenated with the feature map output from branch 2.
1. The concatenated feature map is then input into the fifth C2F module. The fifth C2F... The module's output includes branches 4.1 and 4.
2. Branch 4.2 inputs the feature map into the first upsampling layer for amplification. The feature map processed by the first upsampling layer is concatenated with the feature map output by branch 1.
1. The concatenated feature map is input into the sixth C2F module. The output of the sixth C2F module includes branches 5.1 and 5.
2. Branch 5.1 inputs the feature map into the first Detect module, and branch 5.2 inputs the feature map into the sixth convolution module for convolution processing. The feature map processed by the sixth convolution module is concatenated with the feature map output by branch 4.
1. The concatenated feature map is input into the seventh C2F module. The output of the seventh C2F module includes branches 6.1 and 6.
2. Branch 6.1 inputs the feature map into the second Detect module, and branch 6.2 inputs the feature map into the seventh convolution module for convolution processing. The feature map processed by the seventh convolution module is concatenated with the feature map output by branch 3.
1. The concatenated feature map is input into the eighth C2F module. The feature map processed by the eighth C2F module is input into the third Detect module.
5. The automatic indoor waste sorting and recycling method according to claim 4, characterized in that, The structure of each C2F module in the YOLO V8 model is as follows: Starting from the input of the C2F module, the C2F module sequentially includes an eighth convolutional module, a split module, n Bottleneck modules, and a ninth convolutional module. The split module is used to divide the feature map with the first number of channels output by the eighth convolutional module into two sets of feature maps with a second preset number of channels. One set of feature maps with a second preset number of channels is sequentially input into the n Bottleneck modules. Each Bottleneck module outputs two sets of feature maps with a second preset number of channels. The other set of feature maps with a second preset number of channels output by the split module is concatenated with the feature maps with a second preset number of channels output by each Bottleneck module and then input into the ninth convolutional module.
6. The indoor waste automatic sorting and recycling method according to claim 3, characterized in that, Data augmentation techniques for acquired images include flipping, scaling, and color gamut changes on junk images.
7. The method for automatic indoor waste sorting and recycling according to claim 5, characterized in that, The Bottleneck module includes a tenth convolutional module and an eleventh convolutional module. When the Shortcut setting of the Bottleneck module is false, the input feature map is sequentially input into the tenth and eleventh convolutional modules. When the Shortcut setting of the Bottleneck module is false, the input feature map is first sequentially input into the tenth and eleventh convolutional modules, and then concatenated with the feature map output by the eleventh convolutional module on the channel.
8. The automatic indoor waste sorting and recycling method according to claim 4, characterized in that, The SPPF module sequentially includes a twelfth convolutional module, a first max pooling layer, a second max pooling layer, a third max pooling layer, and a thirteenth convolutional module. The feature maps output by the twelfth convolutional module, the first max pooling layer, the second max pooling layer, and the third max pooling layer are concatenated on the channel.
Citation Information
Patent Citations
Household garbage classification detection method based on convolutional neural network
CN112884033A
Classification garbage can and control method thereof
CN113387073A
Household automatic intelligent classification garbage can
CN212830602U