A method and system for classifying kitchen waste based on machine vision
By analyzing the waste target attributes and correlations in multi-frame visual data during waste disposal, the problem of unstable waste sorting was solved, and more stable and reliable kitchen waste sorting was achieved.
Patent Information
- Application Number
- CN202611218156.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-11-20
AI Technical Summary
Existing machine vision-based waste sorting methods are prone to misclassification when waste is in continuous motion, its posture changes, or the relationship between the waste and the target is unstable.
By acquiring multi-frame visual data during the disposal of kitchen waste, the attribute information and correlation of waste targets are analyzed to construct objects to be judged, and classification judgment is performed after the judgment features reach the preset state, thereby reducing the impact of instantaneous visual fluctuations.
It improves the stability and reliability of kitchen waste sorting, reduces the impact of waste posture changes and target occlusion on sorting judgment, and enhances adaptability in complex scenarios.
Smart Images

Figure CN123142197A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of waste sorting technology, and in particular to a method and system for classifying and determining kitchen waste based on machine vision. Background Technology
[0002] With the continuous advancement of household waste sorting, machine vision-based waste sorting equipment is gradually being applied to smart trash cans, waste sorting terminals, and waste recycling equipment. Existing waste sorting equipment typically acquires images of waste through image acquisition devices, extracts the visual features corresponding to the waste targets using object detection, image recognition, or deep learning models, and then determines the category of the waste according to preset classification rules or classification models, thereby achieving automatic waste sorting.
[0003] However, in actual waste disposal, waste objects are usually in continuous motion, affected by factors such as free fall, tumbling, collision, and stacking. The appearance, spatial position, and combination relationships of the same waste object may continuously change at different collection times. For example, in the initial stages of waste disposal, there may be partial obstruction, packaging, or continuous adjustments in posture, causing significant fluctuations in the visual information of the waste object within a short period. Simultaneously, different waste objects may form relationships such as inclusion, attachment, containment, or combination, meaning that multiple waste objects together constitute a single waste object that requires holistic analysis, rather than simply being multiple independent waste objects.
[0004] Existing machine vision-based waste sorting methods typically rely on visual data acquired at a specific moment to sort waste. While these methods can identify waste targets and determine their categories, the visual information obtained at different moments may vary significantly when waste is in continuous motion, its posture is constantly changing, or the relationships between waste targets are not yet stable. This can easily lead to fluctuations in the sorting results, affecting the stability and reliability of the waste sorting outcomes.
[0005] Therefore, there is a need to provide a machine vision-based method for classifying and determining kitchen waste that can adapt to the continuous waste disposal process and improve the stability of waste sorting. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides a machine vision-based method and system for classifying and determining kitchen waste. By continuously analyzing the evolution of waste determination features during the continuous data collection process, and performing classification determination after the waste determination features reach a preset determination state, the stability and reliability of kitchen waste classification results are improved.
[0007] This invention provides a machine vision-based method for classifying and determining kitchen waste, the method comprising the following steps:
[0008] Acquire multiple frames of visual data arranged in the collection sequence during the food waste disposal process, and determine the target attribute information corresponding to the waste target and the target association relationship between different waste targets based on each frame of visual data.
[0009] Based on the target attribute information and the target association relationship, at least one garbage object to be judged is determined from the garbage targets, and the garbage judgment features corresponding to the garbage object to be judged at each collection time are determined respectively.
[0010] According to the collection sequence, the garbage judgment features corresponding to adjacent collection times are compared, and the evolution state of the judgment features corresponding to the garbage object to be judged is determined based on the comparison results.
[0011] Based on the evolution state of the determination feature, determine whether the garbage determination feature corresponding to the garbage object to be determined has reached the preset determination state, and determine the garbage determination feature that satisfies the preset determination state as the target garbage determination feature.
[0012] Based on the target waste identification characteristics and the preset kitchen waste identification rules, the kitchen waste classification identification result is determined.
[0013] Preferably, determining at least one object to be judged as garbage from the garbage targets based on the target attribute information and the target association includes:
[0014] Obtain the target attribute information corresponding to each garbage target and the target association relationship between each garbage target;
[0015] Based on the target association relationships between various waste targets, conduct association analysis on waste targets with association relationships to determine the corresponding target association set;
[0016] Based on the target attribute information corresponding to the garbage targets in each target association set, determine the garbage composition relationship corresponding to each target association set;
[0017] Based on the garbage composition relationship corresponding to each target association set, the corresponding target association set is determined as a garbage object to be judged; among them, a single garbage target without a target association relationship is determined as a garbage object to be judged.
[0018] Preferably, the determination of the waste identification features includes:
[0019] Obtain the target attribute information of the garbage targets contained in the garbage objects to be judged at each collection time, as well as the target association relationship between the garbage targets;
[0020] Based on the target association relationship, determine the main garbage target corresponding to the garbage object to be judged, and extract the main target attributes corresponding to the main garbage target;
[0021] Determine the target combination relationship corresponding to the garbage object to be judged based on the target association relationship;
[0022] Based on the main target attributes and the target combination relationship, garbage judgment features are generated for the corresponding collection time.
[0023] Preferably, the step of comparing the garbage identification features corresponding to adjacent collection times according to the collection sequence, and determining the evolution state of the identification features corresponding to the garbage object to be identified based on the comparison results, includes:
[0024] Obtain the garbage determination features of the garbage object to be determined at adjacent collection times;
[0025] Based on the main target attributes and target combination relationships corresponding to adjacent collection times, the garbage judgment features corresponding to each collection time are determined.
[0026] Compare the composition of garbage identification features at adjacent collection times to determine the changes in the composition of garbage identification features.
[0027] Based on the changes in the characteristics of the waste determination, the evolution state of the determination characteristics corresponding to the waste object to be determined is determined.
[0028] Preferably, the step of determining whether the garbage judgment feature corresponding to the garbage object to be judged has reached a preset judgment state based on the evolution state of the judgment feature, and determining the garbage judgment feature that has reached the preset judgment state as the target garbage judgment feature, includes:
[0029] Based on the waste identification characteristics corresponding to each collection time, the main target attributes are matched with the attribute identification conditions in the preset kitchen waste identification rules, and the target combination relationship is matched with the relationship identification conditions in the preset kitchen waste identification rules.
[0030] The preset kitchen waste determination rules that match both the attribute determination conditions and the relationship determination conditions are determined as the candidate determination rules for the corresponding collection time, thus obtaining the set of candidate determination rules for each collection time.
[0031] According to the collection sequence, compare the candidate judgment rule sets corresponding to adjacent collection times, and combine the judgment feature evolution state to determine the rule matching and maintenance state corresponding to the garbage judgment feature.
[0032] When the rule matching maintains the state indicating that the set of candidate judgment rules remains the same at a preset number of adjacent collection times, and the judgment feature evolution state indicating that the composition of the garbage judgment feature has not changed, it is determined that the garbage judgment feature corresponding to the garbage object to be judged has reached the preset judgment state, and the garbage judgment feature corresponding to reaching the preset judgment state is determined as the target garbage judgment feature.
[0033] Preferably, determining the kitchen waste classification result based on the target waste identification characteristics and the preset kitchen waste identification rules includes:
[0034] Based on the main target attribute in the target waste identification feature, the target waste identification feature is matched with the preset kitchen waste identification rule to determine at least one initial candidate classification result;
[0035] Based on the target combination relationship in the target waste determination features, rule constraint analysis is performed on each of the initial candidate classification results to determine the target candidate classification results;
[0036] If the target candidate classification result is unique, the target candidate classification result will be determined as the kitchen waste classification result.
[0037] This invention also provides a machine vision-based food waste sorting and determination system, applied to the aforementioned machine vision-based food waste sorting and determination method, the determination system comprising:
[0038] The visual information acquisition module is used to acquire multiple frames of visual data arranged in the collection sequence during the disposal of kitchen waste, and to determine the target attribute information corresponding to the waste target and the target association relationship between different waste targets based on each frame of visual data.
[0039] The object determination module is used to determine at least one garbage object to be judged from the garbage targets based on the target attribute information and the target association relationship, and to determine the garbage judgment features corresponding to the garbage object to be judged at each collection time.
[0040] The evolution analysis module is used to compare the garbage judgment features corresponding to adjacent collection times according to the collection sequence, and determine the evolution state of the judgment features corresponding to the garbage object to be judged based on the comparison results.
[0041] The feature determination module is used to determine whether the garbage judgment feature corresponding to the garbage object to be judged has reached the preset judgment state based on the evolution state of the judgment feature, and to determine the garbage judgment feature that satisfies the preset judgment state as the target garbage judgment feature.
[0042] The classification and determination module is used to determine the classification and determination result of kitchen waste based on the target waste determination characteristics and the preset kitchen waste determination rules.
[0043] Compared with related technologies, the machine vision-based method and system for classifying and determining kitchen waste provided by this invention has the following beneficial effects:
[0044] This invention acquires multiple frames of visual data arranged in the collection sequence during the disposal of kitchen waste, constructs waste objects to be judged, and continuously generates waste judgment features for the same waste object to be judged. This achieves unified analysis of waste objects during continuous collection, avoids the problem of waste objects not being able to correspond between different collection times, and improves the integrity of continuous visual analysis.
[0045] This invention determines the evolution state of waste identification features by comparing the waste identification features corresponding to adjacent collection times, and continuously analyzes the change process of waste identification features. This makes the waste identification process no longer dependent on visual information at a single collection time, but analyzes the changes of waste objects in a comprehensive manner during continuous collection. This reduces the impact of factors such as waste posture changes, target occlusion, and waste tumbling on classification and improves the stability of the waste classification and identification process.
[0046] This invention combines the evolution state of the judgment features with the retention status of the candidate judgment rules to jointly determine whether the waste judgment features have reached the preset judgment state, and only performs the final classification judgment on the waste judgment features that have reached the preset judgment state. This makes the classification judgment based on the visual state of the waste object tending to be stable, effectively reducing the rule mismatch caused by instantaneous visual fluctuations, and improving the reliability and accuracy of kitchen waste classification results.
[0047] This invention comprehensively considers the main target attributes and the target combination relationship between waste targets during the waste sorting process, and performs rule constraint analysis on the target waste judgment characteristics. This enables waste sorting to not only be judged based on the visual attributes of the waste targets themselves, but also to complete the classification decision by combining the structural relationship between waste targets, thereby improving the adaptability of kitchen waste sorting judgment in complex waste disposal scenarios. Attached Figure Description
[0048] Figure 1 A flowchart illustrating a machine vision-based method for classifying and determining kitchen waste, provided in an embodiment of the present invention;
[0049] Figure 2 A system architecture diagram of a machine vision-based kitchen waste sorting and determination system provided in an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram illustrating the evolution of the determination features of the garbage object to be determined over time, as provided in an embodiment of the present invention.
[0051] Figure 4 This is a schematic diagram of the convergence curve of the determination feature change provided in an embodiment of the present invention. Detailed Implementation
[0052] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only for illustrating the present invention and are not intended to limit the scope of protection of the present invention. Equivalent substitutions or modifications made by those skilled in the art based on the disclosure of the present invention without departing from the concept of the present invention should all fall within the scope of protection of the present invention.
[0053] Example 1
[0054] This embodiment provides a machine vision-based method for classifying and determining kitchen waste, applicable to waste sorting equipment, smart trash cans, waste sorting terminals, or other devices capable of acquiring visual data of the kitchen waste disposal process, which have image acquisition and visual analysis capabilities. The equipment continuously acquires multiple frames of visual data during the kitchen waste disposal process through an image acquisition device, and completes waste object analysis and kitchen waste classification based on the visual recognition results.
[0055] It should be noted that during the actual disposal of kitchen waste, due to the continuous movement, mutual obstruction, stacking, and changing disposal posture of the waste, the visual characteristics of the same waste object may change at different collection times. This makes waste classification based on single-frame visual data susceptible to instantaneous influences, leading to misjudgments or unstable classification results. Therefore, this embodiment does not directly complete waste classification based on single-frame visual recognition results. Instead, it continuously collects visual data at multiple collection times, combines the changes in the judgment characteristics of the waste object between consecutive collection times, continuously analyzes the waste judgment characteristics, and only performs kitchen waste classification judgment after the waste judgment characteristics reach a preset judgment state, thereby improving the stability and accuracy of waste classification results.
[0056] Among them, visual data is used to represent image data acquired by the image acquisition device at each acquisition moment; waste target is used to represent a single waste entity identified in the visual data; target attribute information is used to represent information that can characterize the waste target itself, such as category attribute, shape attribute, color attribute, texture attribute, and size attribute; target association relationship is used to represent the spatial position relationship, contact relationship, inclusion relationship, attachment relationship, or combination relationship between different waste targets; waste object to be judged is used to represent the waste object formed based on the target association relationship and judged as a whole; waste judgment feature is used to comprehensively characterize the main target attribute and target combination relationship of the waste object to be judged at the current acquisition moment; judgment feature evolution state is used to represent the change of waste judgment feature between consecutive acquisition moments; target waste judgment feature is used to represent the waste judgment feature used to perform the final waste classification judgment after reaching the preset judgment state.
[0057] In this embodiment, the kitchen waste classification and determination process includes stages such as waste target identification, construction of waste objects to be classified, generation of waste classification features, evolution analysis of classification features, determination of target waste classification features, and output of classification results. Notably, the waste classification features are not directly used for waste classification at a single data collection moment. Instead, they are combined with the evolution state of the classification features at consecutive data collection moments and the maintenance status of candidate classification rules to jointly determine whether the waste classification features have reached a preset classification state. Only when the waste classification features reach the preset classification state can the final classification determination be performed based on the preset kitchen waste classification rules. This reduces classification misjudgments caused by changes in waste posture, target occlusion, or changes in combination relationships during waste disposal, thereby improving the stability and reliability of kitchen waste classification and determination.
[0058] More specifically, the process of this determination method is as follows: Figure 1 As shown, the steps include the following.
[0059] S1. Acquire multiple frames of visual data arranged in the collection sequence during the disposal of kitchen waste, and determine the target attribute information corresponding to the waste target and the target association relationship between different waste targets based on each frame of visual data.
[0060] Among them, target attribute information is used to characterize the visual attributes of the spam target itself, and target association is used to characterize whether multiple spam targets belong to the same spam object, providing basic data for the construction of spam objects to be judged in the future.
[0061] Furthermore, based on target attribute information and target association relationships, at least one object to be judged as garbage is identified from the garbage targets, including the following steps:
[0062] S11. Obtain the target attribute information corresponding to each garbage target and the target association relationship between each garbage target.
[0063] In this embodiment, the image acquisition device continuously acquires visual data during the food waste disposal process at a preset acquisition frequency of 25fps, and uses the YOLOv8 target detection algorithm (input image size 640×640, confidence threshold 0.5) to identify the waste targets corresponding to each acquisition time, establishing a corresponding target record for each waste target. Each target record includes at least a target identifier, target attribute information, and target spatial information, wherein the target attribute information includes at least one or more of the following: waste category, shape features, color features, texture features, and size features, and the target spatial information includes at least the target center position, target boundary, and contour region.
[0064] Then, for any two garbage targets and Calculate the corresponding association determination value, which can be expressed as:
[0065] in, Indicates garbage target With waste target The correlation determination value between them; This indicates the proximity between two garbage targets, specifically defined as the ratio of the Euclidean distance between their centroids to the length of the image diagonal (normalized to). (interval) The smaller the value, the closer the location; It represents the degree of overlap between the outlines of two garbage targets, specifically defined as the ratio of the intersection area to the union area of the two target bounding boxes (IOU). It indicates the degree of contact between two garbage targets, specifically defined as the ratio of the shortest connection path length of the edge pixels of the two targets to the perimeter of the smaller target. The smaller the ratio, the closer the contact. , and These represent the weight coefficients of the corresponding factors.
[0066] When the association determination value is greater than the preset association threshold of 0.65, a target association relationship is established between the two spam targets; otherwise, it is considered that there is no target association relationship between the two spam targets. After completing the association relationship determination between all spam targets, the target association relationship corresponding to the current collection time is formed.
[0067] S12. Based on the target association relationships between various garbage targets, perform association analysis on the garbage targets that have association relationships, and determine the corresponding target association set.
[0068] In this embodiment, the target association relationships between all garbage targets are read, and garbage targets that have not yet completed association analysis are selected as initial nodes for association traversal. When a target association relationship exists between the current garbage target and other garbage targets, the corresponding garbage target is added to the current target association set.
[0069] For newly added garbage targets in the target association set, continue searching for other garbage targets that have target association relationships with them, and repeat the above process until no new garbage targets are added to the current target association set.
[0070] After completing the construction of the current target association set, select the junk targets that have not participated in the construction of any target association set and repeat the above process until all junk targets have completed the association analysis, thereby forming multiple independent target association sets. Each target association set corresponds to a group of junk targets with actual association relationships.
[0071] S13. Based on the target attribute information corresponding to the garbage targets in each target association set, determine the garbage composition relationship corresponding to each target association set.
[0072] In this embodiment, the target attribute information and target association relationship of all garbage targets in each target association set are read respectively, and the garbage composition relationship is determined according to the corresponding association type between the garbage targets.
[0073] When the target association relationship indicates that one spam target is located inside another spam target, it is determined that there is an inclusion relationship between the corresponding spam targets;
[0074] When the target association relationship indicates that one waste target is attached to the surface of another waste target, it is determined that there is an attachment composition relationship between the corresponding waste targets;
[0075] When the target association relationship indicates that one garbage target is used to hold another garbage target, it is determined that there is a holding composition relationship between the corresponding garbage targets;
[0076] When the target association relationship only indicates that multiple garbage targets together form a whole, it is determined that there is a composition relationship between the corresponding garbage targets.
[0077] When there are multiple association types in the same target association set, corresponding composition relationships are established respectively, and together they form the garbage composition relationship corresponding to the current target association set, so that the garbage composition relationship can fully reflect the composition structure when multiple garbage targets form a whole garbage object.
[0078] S14. Based on the garbage composition relationship corresponding to each target association set, the corresponding target association set is determined as a garbage object to be judged; among them, a single garbage target without a target association relationship is determined as a garbage object to be judged.
[0079] In this embodiment, the garbage composition relationship corresponding to each target association set is read sequentially. When the garbage composition relationship indicates that multiple garbage targets together constitute a whole garbage object, the entire target association set is determined as a garbage object to be judged, and a unique object identifier is assigned to the corresponding garbage object to be judged. At the same time, a mapping relationship is established between the garbage object to be judged and all garbage targets in the set.
[0080] For independent garbage targets that are not involved in any target association set, they are directly identified as garbage objects to be judged, and a corresponding object identifier is established.
[0081] Once the garbage objects to be judged are established, at each subsequent collection time, the object identifiers corresponding to each garbage object to be judged are continuously associated based on the target attribute information and target association relationship corresponding to the garbage target. This ensures that the same garbage object to be judged remains consistent at each consecutive collection time, providing a unified processing object for subsequent garbage judgment feature generation and judgment feature evolution analysis.
[0082] S2. Based on the target attribute information and the target association relationship, determine at least one garbage object to be judged from the garbage targets, and determine the garbage judgment features corresponding to the garbage object to be judged at each collection time.
[0083] Waste identification features are used to comprehensively reflect the main attributes and target combination state of the waste object to be identified at the corresponding collection time, providing a basis for subsequent analysis of the evolution of identification features.
[0084] Furthermore, the determination of the garbage identification features includes:
[0085] S21. Obtain the target attribute information of the garbage targets contained in the garbage objects to be judged at each collection time, as well as the target association relationship between the garbage targets.
[0086] In this embodiment, the system reads the garbage objects to be judged at each collection time in sequence according to the collection time sequence, and obtains all garbage targets that make up the garbage object to be judged according to the object identifier corresponding to the garbage object to be judged. At the same time, it reads the target attribute information corresponding to each garbage target and the target association relationship between garbage targets.
[0087] Among them, the same garbage object to be judged is associated with a unified object identifier at each consecutive collection time, so that the data corresponding to each collection time can be mapped to the same garbage object to be judged.
[0088] S22. Determine the main garbage target corresponding to the garbage object to be judged based on the target association relationship, and extract the main target attributes corresponding to the main garbage target.
[0089] In this embodiment, based on the target attribute information and target association relationships corresponding to each garbage target within the object to be judged, the subject certainty degree corresponding to each garbage target is calculated. The subject certainty degree can be expressed as:
[0090] in, Indicates the first The degree of certainty of the subject corresponding to each waste target; This indicates the completeness of the garbage target's attributes, reflecting the completeness of its visual information. Specifically, it is obtained by calculating the product of the target confidence score output by the target detection algorithm and the contour closure. The value range is... A larger value indicates that the target is less obscured and the features are clearer; This indicates the degree of contribution of a spam target to the target association relationship. It reflects the degree of association between a spam target and other spam targets to form a whole object. Specifically, it is calculated as the association judgment value of the target with all other targets in the set. The larger the sum, the more central the target is in terms of its physical structure. This indicates the size contribution of the waste target, reflecting the relative proportion of the waste target in the overall waste object. Specifically, it is the ratio of the bounding box area of the target to the total bounding box area of the entire waste object to be judged. , and These represent the weight coefficients of the corresponding factors. This weight combination has been experimentally verified to effectively distinguish between the main body and its appendages.
[0091] The subject certainty of each garbage target within the garbage object to be judged is calculated separately, and the garbage target with the highest subject certainty is determined as the subject garbage target. At the same time, the target attribute information of the corresponding garbage target is extracted as the subject target attribute, which is used to characterize the subject visual features of the garbage object to be judged at the current collection time.
[0092] S23. Determine the target combination relationship corresponding to the garbage object to be judged based on the target association relationship.
[0093] In this embodiment, based on the target association relationship between all garbage targets within the garbage object to be judged, the combination method corresponding to the formation of a whole object among the garbage targets is analyzed.
[0094] When the target association relationship indicates that there is an inclusion relationship between garbage targets, then the corresponding inclusion and combination relationship is established;
[0095] When the target association relationship indicates that there is an attachment relationship between garbage targets, then the corresponding attachment combination relationship is established;
[0096] When the target association relationship indicates that there is a carrying relationship between garbage targets, a corresponding holding and combination relationship is established;
[0097] When the target association relationship only indicates that multiple garbage targets together form a whole object, then a corresponding composition relationship is established.
[0098] When there are multiple target relationships in the same garbage object to be judged, corresponding combination relationships are established respectively, and the target combination relationship corresponding to the current garbage object to be judged is generated according to the relationship structure between garbage targets, so that the target combination relationship can fully reflect the combination state corresponding to the overall structure formed by the garbage targets inside the garbage object to be judged.
[0099] S24. Based on the main target attributes and the target combination relationship, generate garbage judgment features corresponding to the collection time.
[0100] In this embodiment, the main target attributes and target combination relationships corresponding to the current acquisition time are read, and corresponding garbage judgment features are generated according to preset feature organization rules. .
[0101] Among them, garbage identification features It is constructed as a multidimensional feature vector: .
[0102] Specifically, The vector of category labels for the main target attributes after One-Hot encoding; , , These are the 32-dimensional feature vectors obtained by PCA dimensionality reduction from the 128-dimensional shape feature vector, the 256-bin color histogram, and the LBP texture feature matrix, respectively. These are normalized dimension values; This is the encoding vector for the target combination relationship. This vector records the distribution of association types within the current object (such as the proportion of inclusion relationships, the proportion of attachment relationships, etc.) and the maximum association determination value.
[0103] By establishing this structured feature vector, the waste identification features can simultaneously quantify and characterize the main visual attributes and overall composition of the waste object to be identified. Subsequently, the generated waste identification features are associated and stored with the corresponding waste objects to be identified according to the collection time sequence, forming a waste identification feature sequence corresponding to each collection time.
[0104] S3. According to the collection sequence, compare the garbage judgment features corresponding to adjacent collection times, and determine the evolution state of the judgment features corresponding to the garbage object to be judged based on the comparison results.
[0105] The evolution state of the judgment feature is used to characterize the changes in the waste judgment feature between continuous collection times, providing a basis for subsequent judgment on whether the waste judgment feature has reached the stable judgment condition. In this embodiment, the preset collection frequency is 25fps, and the preset correlation threshold is 0.6. The following judgment thresholds are all obtained based on offline statistical calibration of 1000 sets of kitchen waste disposal samples, which can distinguish between normal fluctuations and substantial state changes in the natural waste disposal process.
[0106] Further, the step of comparing the garbage judgment features corresponding to adjacent collection times according to the collection sequence, and determining the evolution state of the judgment features corresponding to the garbage object to be judged based on the comparison results, includes:
[0107] S31. Obtain the garbage determination features of the garbage object to be determined at adjacent collection times.
[0108] In this embodiment, the system reads the garbage identification feature sequence of the garbage object to be identified according to the collection time sequence, and selects any two adjacent collection times. and ( (where is a positive integer, corresponding to the sequence number of the collection time, with a time interval of 40ms), respectively retrieve the garbage judgment features bound to the current garbage object to be judged at two different times: denoted as and .
[0109] Each garbage identification feature contains two core components: first, the main target attribute A, which includes the category label of the main garbage target, a 128-dimensional shape feature vector, a 256-bin color histogram, an LBP texture feature matrix, a normalized size value (ratio of the garbage target to the current field of view), and the certainty of the main target calculated by S22. Second, the target combination relationship R, which covers the four types of relationships and association judgment values among the waste targets within the waste object to be judged: inclusion, attachment, containment, and combination. .
[0110] Simultaneously verify the consistency of the object identifiers corresponding to the two features. If the object identifiers are inconsistent, it is determined that the garbage object to be judged has been switched, the current comparison process is terminated and the feature sequence is re-initialized; if they are consistent, proceed to the next processing stage to ensure that the feature changes of the same garbage object to be judged at different times are being compared.
[0111] S32. Determine the garbage judgment features corresponding to each collection time based on the main target attributes and target combination relationships corresponding to adjacent collection times.
[0112] In this embodiment, for and We perform structured analysis separately to clarify the specific components of the garbage determination features at the two time points:
[0113] Target attributes of the main body ( (moment) and ( (Time): Extract its attribute dimension list, including the category label of the main garbage target, shape feature vector, color histogram, texture feature matrix, and normalized size value. and subject certainty The value;
[0114] For target combination relationship ( (moment) and ( (Time): Extract all binary associations within it, and record each association as a six-tuple: {Associated Target ID1, Associated Target ID2, Association Type, Association Determination Value} Spatial position offset, contact area ratio;
[0115] At the same time, the total number N of garbage targets included in the current garbage object to be judged is counted.
[0116] The above analysis results are organized as follows: Time-of-time features constitute a vector , Time-of-time features constitute a vector This completes the quantitative representation of the features.
[0117] S33. Compare the garbage identification features corresponding to adjacent collection times to determine the changes in the garbage identification features.
[0118] In this embodiment, a dimensional comparison is performed. and This yields specific quantitative results of the changes:
[0119] Comparison of changes in main target attributes:
[0120] First, verify the consistency of the identity of the main garbage target: If and If the main garbage target IDs are different, and the cross-time matching is confirmed by the object identifier continuous association logic in S14 to not belong to the same physical target, then it is directly marked as "main target changed"; if the IDs are the same or confirmed to be the same physical target, then the change amount is further calculated:
[0121] Calculate the cosine similarity of shape feature vectors Bach distance of the color histogram Euclidean distance of texture features Size difference and the change in the subject's certainty ;
[0122] Set threshold: , , , (This threshold combination has been validated by samples and can distinguish feature fluctuations caused by momentary occlusion and changes in illumination from changes in true attributes.)
[0123] like > and and and If the change in the main attribute is not significant, the level of change is determined to be "no change"; if 1-2 of the above indicators exceed the threshold but do not exceed 1.5 times the threshold, the change is determined to be "slight change"; if 3 or more indicators exceed the threshold or exceed 1.5 times the threshold, the change is determined to be "significant change".
[0124] Comparison of changes in target combination relationships:
[0125] First, compare the total number of waste targets. :like Marked as "Change in composition quantity";
[0126] If the number is the same, then iterate through the entire system. For each relationship in the data, determine... Does a relationship exist between the two targets? If not, mark it as "relationship disappeared"; if it exists, compare the relationship type and relationship determination value. Differences in the percentage of contact area: If the types of association are different, or (This threshold can distinguish between fluctuations in the correlation intensity of natural shaking of waste and substantial structural changes), or if the change in the contact area ratio exceeds 20%, it is marked as a "change in correlation"; if There exists Unexcluded relationships are marked as "New Relationship".
[0127] Summary of Comprehensive Changes: By integrating the above two types of comparison results, we obtain... arrive The characteristics of garbage classification at any given time constitute the change results. The format is: {List of main attribute change levels, component quantity change indicators, and relationship change types}.
[0128] S34. Based on the changes in the composition of the waste judgment features, determine the evolution state of the judgment features corresponding to the waste object to be judged.
[0129] In this embodiment, based on Based on the results and the occlusion status of the garbage objects to be judged, the evolution state of the judgment features is divided into four categories, thus achieving a standardized definition of the state:
[0130] Stable state: if If the main attribute change level is "no change", and there is no change in the quantity of components, no change in the relationship, or only a minor adjustment of less than 10% in the contact area ratio, then the waste judgment characteristics of the current waste object to be judged are determined to be in a stable state. This means that the posture and combination relationship of the waste have not changed significantly during the disposal process, and can be used as a valid basis for subsequent judgment status.
[0131] Gradual change: if The main attribute change level is displayed as "minor change" and meets any of the following conditions: 1. No change in the number of components, no change in the association type, only the association judgment value. The variation ranges from 0.05 to 0.15; 2. Subject certainty However, if the objects are confirmed to belong to the same garbage object to be judged through object tracking, and the combination relationship has not changed substantially (such as incomplete extraction of main features due to momentary occlusion), then it is judged as a gradual change state, indicating that the garbage is in a transitional stage of natural falling and slight shaking, without any essential structural changes. In this state, historical features can still be used as a judgment reference.
[0132] Mutant state: if If any of the following occurs: change of main target, change of composition quantity, addition / disappearance of association relationship, or change of type, it is judged as a sudden state. This indicates that the waste has undergone significant state changes such as tumbling, splitting, or colliding and merging with other waste. In this state, the candidate judgment rule rematch process is triggered, and historical features are no longer used as the judgment basis.
[0133] Wave dynamics: If If the changes in three or more consecutive adjacent time periods exhibit an alternating pattern of "slight change - no change - slight change", without any abrupt changes, and the fluctuation amplitude of the subject's certainty is less than 0.08, it is judged as a wave dynamic. This usually corresponds to a scenario where the waste briefly stagnates and sways slightly at the edge of the disposal port, but does not undergo any essential structural changes. In this state, the average characteristic within the fluctuation period is taken as the judgment reference.
[0134] Finally, the evolution state corresponding to the current adjacent time step is compared with the data collection time. Bind and store the evolution state sequence of the garbage object to be judged: the stable state is directly used as the core basis for judging the stability of the feature, the gradual change state and the wave dynamic are used as auxiliary references, and the abrupt change state triggers the judgment feature reset logic.
[0135] S4. Based on the evolution state of the determination feature, determine whether the garbage determination feature corresponding to the garbage object to be determined has reached the preset determination state, and determine the garbage determination feature that has reached the preset determination state as the target garbage determination feature.
[0136] The target waste identification feature represents the waste identification feature that has met the stable identification conditions and can be used to perform the final waste classification identification.
[0137] Further, the step of determining whether the garbage judgment feature corresponding to the garbage object to be judged has reached a preset judgment state based on the evolution state of the judgment feature, and determining the garbage judgment feature that has reached the preset judgment state as the target garbage judgment feature, includes:
[0138] S41. Based on the waste judgment characteristics corresponding to each collection time, match the main target attribute with the attribute judgment conditions in the preset kitchen waste judgment rules, and match the target combination relationship with the relationship judgment conditions in the preset kitchen waste judgment rules.
[0139] In this embodiment, the garbage identification features corresponding to each collection time are read sequentially according to the collection time sequence. First, the current collection time is extracted. The main target attributes and target combination relationships in the waste identification features are matched one by one with the attribute identification conditions and relationship identification conditions in the preset kitchen waste identification rule library.
[0140] The attribute determination criteria cover typical category labels, RGB color range, LBP texture feature value range, shape complexity threshold, and normalized size range for kitchen waste. These thresholds are all obtained based on offline training and calibration of 2,000 sets of kitchen waste samples, which can effectively distinguish the visual feature differences between kitchen waste and non-kitchen waste. The relationship determination criteria cover the allowed and prohibited types of inclusion, attachment, holding, and combination relationships between different types of waste. For example, the inclusion relationship between metal tableware and food residue is prohibited, or the attachment relationship between fruit pits and fruit pulp is allowed, thereby eliminating the risk of misjudgment in the case of combined disposal.
[0141] S42. Determine the preset kitchen waste judgment rule that matches both the attribute judgment condition and the relationship judgment condition as the candidate judgment rule for the corresponding collection time, and obtain the candidate judgment rule set for each collection time.
[0142] In this embodiment, if the target attribute of the subject satisfies all attribute judgment conditions of a certain rule, and the target combination relationship satisfies all relationship judgment conditions of that rule, then the rule is marked as a candidate judgment rule for the current time. The set of candidate judgment rules corresponding to the current time is obtained by traversing the rule base. .
[0143] For the candidate judgment rule set, the rules are prioritized and the rules with the highest matching degree and belonging to the core category of kitchen waste are marked as core rules, and the other auxiliary matching rules are marked as non-core rules. This is to distinguish the importance of the rules in the subsequent comparison process and avoid the core judgment logic from jumping due to slight changes in edge features.
[0144] S43. According to the collection sequence, compare the candidate judgment rule sets corresponding to adjacent collection times, and combine the judgment feature evolution state to determine the rule matching and maintenance state corresponding to the garbage judgment feature.
[0145] In this embodiment, the candidate decision rules for the current moment are set according to the acquisition time sequence. The set of the previous moment The comparison is performed, and the rule matching maintenance state is determined by combining the decision feature evolution state output by S3.
[0146] If S3 determines the current evolutionary state to be a mutation state, it directly determines the rule matching maintenance state to be "interrupted," clears the historical matching records, and reinitializes the candidate rule set to ensure that the new state after the mutation can trigger a completely new determination process; if the evolutionary state is a stable state, and and If the core rules and all non-core rules are completely consistent, it is marked as "continuous matching";
[0147] If the evolutionary state is a gradual change or a wave dynamic, and and If the core rules are consistent and only the non-core rules differ, it is marked as "fluctuation matching," indicating that the garbage is in a natural fluctuation phase and has not affected the core attributes. If the core rules change, it is marked as "switch matching," indicating that the essential attributes of the garbage may have changed.
[0148] S44. When the rule matching maintenance state indicates that the candidate judgment rule set remains the same at a preset number of adjacent collection times, and the judgment feature evolution state indicates that the composition of the garbage judgment feature has not changed, it is determined that the garbage judgment feature corresponding to the garbage object to be judged has reached the preset judgment state, and the garbage judgment feature corresponding to reaching the preset judgment state is determined as the target garbage judgment feature.
[0149] In this embodiment, the system combines the rule-matching state and the evolution state of the judgment features to determine whether the waste judgment features have reached a preset judgment state. A preset threshold of 5 adjacent collection times is set. This threshold has been verified through actual testing to achieve an optimal balance between the stable waiting time for waste disposal and the ability to resist interference.
[0150] If the rule matching status is "continuous matching" and the continuous matching time reaches 5 frames, and S3 determines that the current state is stable or slightly fluctuating gradual state or wave dynamic, and no sudden state is triggered during the period, then the garbage judgment feature corresponding to the garbage object to be judged has reached the preset judgment state.
[0151] At this point, the current garbage identification feature is determined as the target garbage identification feature, and the corresponding candidate identification rule is locked as the final classification basis. Conversely, if a sudden change or rule switching match is detected during the accumulation process, the continuous matching count will be immediately reset, and the accumulation time will start again from the current moment until the above stable identification conditions are met. This avoids rule mismatch caused by factors such as instantaneous changes in garbage posture and brief occlusion at the source, and significantly improves the stability and reliability of the classification results.
[0152] S5. Determine the kitchen waste classification result based on the target waste identification characteristics and the preset kitchen waste identification rules.
[0153] Further, determining the kitchen waste classification result based on the target waste identification characteristics and the preset kitchen waste identification rules includes:
[0154] S51. Based on the main target attribute in the target waste judgment feature, perform attribute matching between the target waste judgment feature and the preset kitchen waste judgment rule to determine at least one initial candidate classification result.
[0155] In this embodiment, the target waste identification features determined in stage S4 are read, with a focus on extracting the main target attributes, including the category label of the main waste target, a 128-dimensional shape feature vector, a 256-bin color histogram, an LBP texture feature matrix, and normalized size values. Subsequently, these attributes are input into a preset kitchen waste identification rule base for full-scale matching retrieval: the matching degree between the main target attributes and the attribute identification conditions in each rule is calculated one by one. The matching degree calculation adopts a weighted fusion strategy, i.e. ,in to The weight coefficients are obtained based on SVM training, and Sim represents the similarity score for the corresponding dimension.
[0156] If the matching degree η of a rule is higher than the preset matching threshold of 0.85 (this threshold has been verified by backtesting with 3000 sets of samples and can effectively filter false alarms caused by blurred edge features), then the waste category corresponding to that rule is taken as an initial candidate classification result. Considering that kitchen waste often has similar appearances (such as sweet potatoes and potatoes, rotten vegetable leaves and wet wipes), the system allows the retention of the top three initial candidate classification results with the highest matching degree to form an initial candidate classification result set, providing a basis for subsequent refined screening and avoiding missed detections due to misjudgment caused by single-dimensional features.
[0157] S52. Based on the target combination relationship in the target waste judgment features, perform rule constraint analysis on each of the initial candidate classification results to determine the target candidate classification results;
[0158] In this embodiment, the target combination relationship in the target waste judgment feature is extracted, and the structural information is used to perform constraint pruning on the initial candidate classification result set obtained in S51.
[0159] Specifically, each candidate category in the initial candidate classification result set is traversed, and the relational constraints bound to that category in the rule base are retrieved. The constraints include mandatory and prohibited relationships: for example, if the candidate category is "fish bone", its mandatory relationship is defined as "must have an attachment / mixing relationship with meat residue or soup", and its prohibited relationship is defined as "prohibited from having an inclusion relationship with plastic packaging bags".
[0160] The system compares the current actual target combination relationship with these constraints: if the mandatory relationship corresponding to the candidate category is missing in the actual combination relationship, or if a forbidden relationship appears, the candidate classification result is eliminated; if both mandatory and forbidden relationships are satisfied, the result is retained. Furthermore, for the retained candidate results, the system calculates the combination relationship confidence score, which is the ratio of the actual association strength to the required strength of the rule, and selects the result or category with the highest confidence score as the target candidate classification result. By introducing structural constraints on the combination relationship, misjudgments caused by relying solely on appearance similarity are effectively eliminated; for example, it can accurately distinguish between "vegetable leaves in a plastic bag" (non-kitchen waste) and "exposed vegetable leaves" (kitchen waste).
[0161] S53. If the target candidate classification result is unique, the target candidate classification result shall be determined as the kitchen waste classification result.
[0162] In this embodiment, the uniqueness of the target candidate classification results after S52 screening is verified. If only one target candidate classification result remains after constraint analysis, the classification decision is determined to be converged. The system officially determines this result as the final kitchen waste classification result and pushes it to the display module for display. At the same time, the result is sent to the back-end control system to control the opening of the corresponding compartment door or the input of the points system.
[0163] If, after constraint analysis, there are still two or more target candidate classification results (e.g., the combination relationship cannot be fully resolved due to severe occlusion), the system will not force an output, but will instead determine the status as "awaiting manual review," trigger an alarm sound, and highlight the disputed area on the interactive interface to guide the user to perform secondary sorting of the waste or manual confirmation.
[0164] Simultaneously, the current evolution status of the judgment features and the judgment features of the target waste are uploaded as logs to the cloud server for subsequent model iteration and optimization. In addition, to ensure the finality of the classification decision, once S53 outputs the final judgment result, even if the waste is detected to have rolled or split (i.e., the evolution state changes to a sudden state) during subsequent collection, the system will not backtrack and modify the determined classification result until a new disposal action is detected and a new round of judgment process is started.
[0165] The following is combined Figure 3 This invention provides a method for classifying and determining kitchen waste based on machine vision. For example... Figure 3As shown, taking the example of a user placing a plastic bag containing banana peels into a waste sorting device, with a tissue attached to the outside of the bag, the waste sorting determination process of the present invention will be explained. In this embodiment, the image acquisition device continuously acquires visual data during the waste disposal process at a acquisition frequency of 25fps, and sequentially obtains visual data corresponding to six consecutive acquisition times T1 to T6. Each acquisition time corresponds to the visual information of the same waste object to be judged in different states.
[0166] At time T1, the system first performs target detection on the visual data, identifying three waste targets: banana peel G1, plastic bag G2, and paper towel G3. Then, based on the target attribute information and spatial relationships of each waste target, the system calculates the association values between them. Specifically, banana peel G1 is located inside plastic bag G2, thus establishing a target association relationship between banana peel G1 and plastic bag G2; paper towel G3 is attached to the outer surface of plastic bag G2, thus establishing a target association relationship between paper towel G3 and plastic bag G2. Based on these target association relationships, a target association set {G1, G2, G3} is formed. Furthermore, it is determined that banana peel and plastic bag have a containing relationship, and paper towel and plastic bag have an attaching relationship. Finally, this target association set is identified as a single waste object O1 to be judged, and a unique object identifier is created for it to maintain data association for the same waste object during subsequent continuous data collection.
[0167] At time T2, the system rereads all waste targets corresponding to the waste object O1 to be judged based on the object identifier, and generates waste judgment features corresponding to the current collection time by combining target attribute information and target association relationships. Since the plastic bag G2 has the largest size contribution and establishes target association relationships with both the banana peel G1 and the paper towel G3, the subject determination of the plastic bag G2 is the highest, and it is identified as the main waste target. The system further extracts the category attribute, color attribute, shape attribute, and size attribute corresponding to the plastic bag G2 as the main target attributes. At the same time, it generates target combination relationships by combining the holding relationship between the banana peel and the plastic bag and the attachment relationship between the paper towel and the plastic bag. The main target attributes and target combination relationships together constitute the waste judgment features corresponding to the current collection time.
[0168] As the trash continued to fall, at time T3, the plastic bag rotated slightly, causing a slight change in the shape characteristics of the main trash object. The banana peel remained inside the bag, and the tissue remained attached to the outside; the overall object composition remained unchanged. The system acquired the trash identification features at times T2 and T3, comparing the main object attributes and the object composition relationships to obtain the changes in the trash identification feature composition. Only the main object attributes changed slightly, while the object composition relationships remained consistent. Therefore, the system determined the current trash identification feature evolution state to be a gradual change, indicating that the trash object was still in natural motion, but the overall composition relationship had not changed substantially.
[0169] Visual data collection continued. At time T4, the trash object gradually stopped tumbling, and the plastic bag's posture stabilized. The system regenerated the corresponding trash identification features and compared them with the features acquired at time T3. The comparison results showed that the main target attributes remained consistent, the target combination relationships remained consistent, and the composition of the trash identification features did not change. Therefore, the system determined that the evolution state of the current trash identification features was a stable state. At this point, the trash object had basically completed its posture adjustment, and its visual features entered a stable phase.
[0170] Subsequently, at time T5, the system continues to acquire the waste identification features corresponding to the waste objects to be identified and repeats the feature composition comparison. Since the main target attributes and target combination relationships remain consistent, the evolution state of the identification features remains stable. Simultaneously, the system matches the waste identification features with the preset kitchen waste identification rules to obtain a corresponding set of candidate identification rules. Compared to the previous acquisition time, the set of candidate identification rules has not changed; therefore, the system determines that the rule matching is in a continuous matching state and continues to accumulate the number of continuous matches.
[0171] At time T6, the system again acquires the waste classification features corresponding to the current waste object to be classified and compares them with those at the previous time. Since the waste classification features remain stable, the candidate classification rule set remains consistent across multiple time points, and the evolution state of the classification features remains stable, the system determines that the current waste classification features have reached the preset classification state and identifies the waste classification features corresponding to time T6 as the target waste classification features. Subsequently, based on the main target attributes and target combination relationships in the target waste classification features, the system performs matching and rule constraint analysis with the preset kitchen waste classification rules, ultimately determining the kitchen waste classification result corresponding to the waste object to be classified and outputting the corresponding classification information, thus completing this waste classification process.
[0172] Furthermore, to more intuitively illustrate the process by which the waste identification features in this invention gradually converge over time and form stable classification conditions, the following will combine... Figure 4 Please provide an explanation.
[0173] like Figure 4 As shown, the horizontal axis represents the continuous collection time, and the vertical axis represents the degree of change of the judgment feature D. The degree of change of the judgment feature is used to characterize the comprehensive change range of the garbage judgment feature between adjacent collection times. The larger the value, the more obvious the change of the main target attribute and target combination relationship corresponding to the garbage object. The smaller the value, the more stable the garbage judgment feature gradually becomes.
[0174] In the initial stage after the garbage object enters the collection area, due to the continuous rolling, occlusion, and posture adjustment of the garbage, the degree of change of the judgment feature remains at a high level, and the garbage judgment feature is in a continuous evolution stage. At this time, the system continuously generates garbage judgment features and updates the evolution state of the judgment features, instead of directly performing garbage classification judgment.
[0175] As the garbage objects gradually stop tumbling, the target combination relationships between various garbage targets tend to stabilize, and the degree of change in the judgment features gradually decreases. When the degree of change in the judgment features decreases below the preset stable threshold, the garbage judgment features enter the convergence phase. At this time, the system continues to analyze the garbage judgment features corresponding to the continuous collection time and determines whether the set of candidate judgment rules remains consistent.
[0176] When the degree of change of the judgment feature remains below the preset stable threshold for multiple consecutive collection times, and the set of candidate judgment rules remains consistent, the system determines that the waste judgment feature has reached the preset judgment state, and identifies the corresponding waste judgment feature as the target waste judgment feature, and then performs waste classification judgment based on the target waste judgment feature.
[0177] Figure 4 The curves showing the degree of change of the judgment characteristics are only used to illustrate the evolution process of the judgment characteristics of waste from the changing stage to the stable stage. The changing trends and values are for illustrative purposes only and do not limit the specific calculation method or value range of the degree of change of the judgment characteristics.
[0178] Example 2
[0179] The following is combined Figure 2 The specific working process of a machine vision-based kitchen waste sorting and judgment system provided by the present invention will be described.
[0180] like Figure 2As shown, the machine vision-based kitchen waste classification and determination system in this embodiment uses a visual information acquisition module 100, an object determination module 200, an evolution analysis module 300, a feature determination module 400, and a classification and determination module 500 as core processing units. Each module is connected in sequence according to the data processing order, and data sharing and collaborative processing are realized through a data support layer, thereby completing the classification and determination of kitchen waste.
[0181] During system operation, the image acquisition device continuously acquires continuous visual data during the food waste disposal process and inputs the acquired visual data into the visual information acquisition module 100. The visual information acquisition module 100 first processes the continuous visual data, identifies the waste targets corresponding to each acquisition moment, generates corresponding target attribute information, and analyzes the spatial relationships between waste targets to establish corresponding target associations. Subsequently, the visual information acquisition module 100 sends the target attribute information and target associations to the object determination module 200.
[0182] After receiving the data output by the visual information acquisition module 100, the object determination module 200 constructs a target association set based on target attribute information and target association relationships, and further determines the garbage composition relationships. Garbage targets with association relationships are identified as garbage objects to be judged. Simultaneously, garbage judgment features corresponding to each acquisition time are generated based on the main target attributes and target combination relationships. The generated garbage judgment features are associated according to object identifiers and acquisition time sequences, and then sent to the evolutionary analysis module 300.
[0183] After receiving the waste identification features corresponding to consecutive acquisition times, the evolution analysis module 300 compares the waste identification features corresponding to adjacent acquisition times item by item to determine the changes in the composition of the waste identification features. Based on these changes, it analyzes the evolution of the waste identification features between consecutive acquisition times and determines the corresponding evolution state of the identification features. Simultaneously, the evolution analysis module 300 continuously maintains the time series information corresponding to the waste identification features and sends the evolution state of the identification features to the feature determination module 400.
[0184] The feature determination module 400 determines whether a waste identification feature has reached a preset identification state based on the evolution status of the identification features output by the evolution analysis module 300. During the determination process, the feature determination module 400 not only analyzes whether the waste identification feature has stabilized based on its corresponding evolution status, but also continuously verifies the waste identification feature by considering the maintenance of the corresponding candidate identification rule set during continuous data collection. When a waste identification feature meets the preset identification state, the corresponding waste identification feature is determined as the target waste identification feature and sent to the classification identification module 500.
[0185] The classification and determination module 500 performs rule matching and rule constraint analysis on the target waste's characteristics and preset kitchen waste classification rules to determine the target candidate classification results. When the target candidate classification result is unique, it outputs the kitchen waste classification result. Simultaneously, the classification and determination module 500 can also output confidence information and related determination information for the corresponding classification results, enabling subsequent control or information display by the waste sorting equipment.
[0186] In addition, such as Figure 2 As shown, each functional module establishes a data interaction relationship with the data support layer. The data support layer stores basic data such as a waste category library, a feature extraction model library, a judgment rule library, a threshold parameter library, and a system configuration library. Specifically, the waste category library provides basic attribute information corresponding to waste categories; the feature extraction model library supports waste target detection and target attribute information extraction; the judgment rule library stores judgment rules for kitchen waste classification; the threshold parameter library stores judgment parameters such as thresholds for the degree of change of judgment features and thresholds for continuous and stable quantities; and the system configuration library stores system operation configurations and module control parameters. During execution, each module can call upon corresponding data resources according to processing needs and return the processing results to the data support layer, thereby achieving unified data management and module collaboration during system operation.
[0187] In this embodiment, the data processing is completed step by step in the processing chain of "visual information acquisition → object determination → evolution analysis → feature determination → classification judgment". This enables the system to continuously analyze the evolution process of the garbage judgment features corresponding to the garbage objects during continuous collection, and to perform classification judgment only after the garbage judgment features reach the preset judgment state. This reduces the impact of garbage posture changes, occlusion changes and instantaneous recognition fluctuations on the classification results, and improves the stability and accuracy of kitchen waste classification judgment results.
Claims
1. A method for classifying and determining kitchen waste based on machine vision, characterized in that, The determination method includes the following steps: Acquire multiple frames of visual data arranged in the collection sequence during the food waste disposal process, and determine the target attribute information corresponding to the waste target and the target association relationship between different waste targets based on each frame of visual data. Based on the target attribute information and the target association relationship, at least one garbage object to be judged is determined from the garbage targets, and the garbage judgment features corresponding to the garbage object to be judged at each collection time are determined respectively. According to the collection sequence, the garbage judgment features corresponding to adjacent collection times are compared, and the evolution state of the judgment features corresponding to the garbage object to be judged is determined based on the comparison results. Based on the evolution state of the determination feature, determine whether the garbage determination feature corresponding to the garbage object to be determined has reached the preset determination state, and determine the garbage determination feature that satisfies the preset determination state as the target garbage determination feature. Based on the target waste identification characteristics and the preset kitchen waste identification rules, the kitchen waste classification identification result is determined.
2. The method for classifying and determining kitchen waste based on machine vision according to claim 1, characterized in that, The step of determining at least one object to be judged as garbage from the garbage targets based on the target attribute information and the target association relationship includes: Obtain the target attribute information corresponding to each garbage target and the target association relationship between each garbage target; Based on the target association relationships between various waste targets, conduct association analysis on waste targets with association relationships to determine the corresponding target association set; Based on the target attribute information corresponding to the garbage targets in each target association set, determine the garbage composition relationship corresponding to each target association set; Based on the garbage composition relationship corresponding to each target association set, the corresponding target association set is determined as a garbage object to be judged; among them, a single garbage target without a target association relationship is determined as a garbage object to be judged.
3. The method for classifying and determining kitchen waste based on machine vision according to claim 2, characterized in that, The determination of the waste identification characteristics includes: Obtain the target attribute information of the garbage targets contained in the garbage objects to be judged at each collection time, as well as the target association relationship between the garbage targets; Based on the target association relationship, determine the main garbage target corresponding to the garbage object to be judged, and extract the main target attributes corresponding to the main garbage target; Determine the target combination relationship corresponding to the garbage object to be judged based on the target association relationship; Based on the main target attributes and the target combination relationship, garbage judgment features are generated for the corresponding collection time.
4. The method for classifying and determining kitchen waste based on machine vision according to claim 3, characterized in that, The step of comparing the garbage identification features corresponding to adjacent collection times according to the collection sequence, and determining the evolution state of the identification features corresponding to the garbage object to be identified based on the comparison results, includes: Obtain the garbage determination features of the garbage object to be determined at adjacent collection times; Based on the main target attributes and target combination relationships corresponding to adjacent collection times, the garbage judgment features corresponding to each collection time are determined. Compare the composition of garbage identification features at adjacent collection times to determine the changes in the composition of garbage identification features. Based on the changes in the characteristics of the waste determination, the evolution state of the determination characteristics corresponding to the waste object to be determined is determined.
5. The method for classifying and determining kitchen waste based on machine vision according to claim 4, characterized in that, The step of determining whether the garbage judgment feature corresponding to the garbage object to be judged has reached a preset judgment state based on the evolution state of the judgment feature, and determining the garbage judgment feature that has reached the preset judgment state as the target garbage judgment feature, includes: Based on the waste identification characteristics corresponding to each collection time, the main target attributes are matched with the attribute identification conditions in the preset kitchen waste identification rules, and the target combination relationship is matched with the relationship identification conditions in the preset kitchen waste identification rules. The preset kitchen waste determination rules that match both the attribute determination conditions and the relationship determination conditions are determined as the candidate determination rules for the corresponding collection time, thus obtaining the set of candidate determination rules for each collection time. According to the collection sequence, compare the candidate judgment rule sets corresponding to adjacent collection times, and combine the judgment feature evolution state to determine the rule matching and maintenance state corresponding to the garbage judgment feature. When the rule matching maintains the state indicating that the set of candidate judgment rules remains the same at a preset number of adjacent collection times, and the judgment feature evolution state indicating that the composition of the garbage judgment feature has not changed, it is determined that the garbage judgment feature corresponding to the garbage object to be judged has reached the preset judgment state, and the garbage judgment feature corresponding to reaching the preset judgment state is determined as the target garbage judgment feature.
6. The method for classifying and determining kitchen waste based on machine vision according to claim 5, characterized in that, The step of determining the kitchen waste classification result based on the target waste identification characteristics and the preset kitchen waste identification rules includes: Based on the main target attribute in the target waste identification feature, the target waste identification feature is matched with the preset kitchen waste identification rule to determine at least one initial candidate classification result; Based on the target combination relationship in the target waste determination features, rule constraint analysis is performed on each of the initial candidate classification results to determine the target candidate classification results; If the target candidate classification result is unique, the target candidate classification result will be determined as the kitchen waste classification result.
7. A machine vision-based kitchen waste sorting and determination system, applied to the machine vision-based kitchen waste sorting and determination method as described in any one of claims 1 to 6, characterized in that, The determination system includes: The visual information acquisition module is used to acquire multiple frames of visual data arranged in the collection sequence during the disposal of kitchen waste, and to determine the target attribute information corresponding to the waste target and the target association relationship between different waste targets based on each frame of visual data. The object determination module is used to determine at least one garbage object to be judged from the garbage targets based on the target attribute information and the target association relationship, and to determine the garbage judgment features corresponding to the garbage object to be judged at each collection time. The evolution analysis module is used to compare the garbage judgment features corresponding to adjacent collection times according to the collection sequence, and determine the evolution state of the judgment features corresponding to the garbage object to be judged based on the comparison results. The feature determination module is used to determine whether the garbage judgment feature corresponding to the garbage object to be judged has reached the preset judgment state based on the evolution state of the judgment feature, and to determine the garbage judgment feature that satisfies the preset judgment state as the target garbage judgment feature. The classification and determination module is used to determine the classification and determination result of kitchen waste based on the target waste determination characteristics and the preset kitchen waste determination rules.
