A training method and system applied to a garbage classification model
By performing partitioned feature extraction and weight assignment on garbage images, combined with location mapping registration and feature consistency loss, the problem of misidentification of complex backgrounds and polluted areas in garbage image recognition is solved, thereby improving the recognition accuracy and environmental adaptability of the garbage classification model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI GAOJIE ENVIRONMENTAL PROTECTION TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-21
AI Technical Summary
Existing garbage image recognition methods struggle to reliably extract effective features when faced with complex backgrounds and changing target poses, and are prone to misidentification by contaminated areas, leading to a decline in classification accuracy and generalization ability.
By performing foreground separation on the main garbage region, dividing it into circumferential and radial sub-regions, extracting color, texture, and edge features, forming a partitioned feature matrix, and determining stable and random pollution feature regions based on the frequency and fluctuation amplitude of the sub-regions in images of the same type of garbage, assigning different training weights to different feature regions, and iteratively updating the classification network by combining location mapping registration and feature consistency loss values.
It improves the adaptability of the waste sorting model to complex backgrounds and changes in target posture, enhances its resistance to pollution interference and generalization ability, and improves the accuracy and robustness of identifying similar types of waste.
Smart Images

Figure CN122435341A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a training method and system for a garbage classification model. Background Technology
[0002] Waste sorting is a crucial foundation for the resource utilization and volume reduction of urban solid waste. Currently, image recognition technology is widely used in intelligent recycling equipment, automated sorting lines, and unattended disposal terminals to automatically determine waste categories, thereby improving sorting efficiency and reducing manual sorting costs. Existing waste image recognition methods typically use convolutional neural networks or deep learning models to directly extract features and classify waste from collected images, showing some effectiveness in recognizing regularly shaped targets.
[0003] However, real-world waste images are highly complex. On one hand, different types of waste often undergo folding, compression, damage, occlusion, and posture changes during disposal. In particular, the appearance of targets such as plastic bags, packaging films, and cardboard boxes varies significantly, and the image features of the same type of waste show marked dispersion under different states, making it difficult for the model to reliably extract effective recognition features. On the other hand, waste surfaces often have oil stains, water stains, label fragments, food residue, and mixed foreign matter adhering to them. These randomly contaminated areas are easily misidentified by the model as category features, thereby reducing classification accuracy and the model's generalization ability. Summary of the Invention
[0004] Therefore, it is necessary to provide a training method and system for waste sorting models to solve at least one of the aforementioned technical problems.
[0005] To achieve the above objectives, a training method for a waste sorting model is provided, the method comprising the following steps: Step S1: Collect garbage images and establish a labeled sample set; perform foreground separation on each garbage image to obtain the main garbage region; Step S2: Divide the main waste area into multiple circumferential and radial sub-regions, extract the color features, texture features, and edge damage features of each sub-region, and form a partition feature matrix; Step S3: Determine the category-stable feature regions based on the frequency of occurrence of each sub-region in images of the same type of waste, and determine the random contamination feature regions based on the feature fluctuation amplitude of each sub-region; Step S4: Input the partition feature matrix into the preset classification network, assign the first training weight to the category stable feature region, and assign the second training weight, which is lower than the first training weight, to the randomly contaminated feature region to obtain the weighted training feature map; Step S5: Perform position mapping and registration on the weighted training feature map, and calculate the feature consistency loss value; Step S6: Iteratively update the preset classification network parameters based on the classification loss value and feature consistency loss value until the set convergence condition is met, and then output the garbage classification model.
[0006] The present invention also provides a training system for a waste sorting model, for executing the training method for a waste sorting model as described above, the training system for a waste sorting model comprising: The preprocessing module is used to acquire garbage images and establish a labeled sample set; it performs foreground separation on each garbage image to obtain the main garbage region; The feature extraction module is used to divide the main area of waste into multiple circumferential and radial sub-regions, extract the color features, texture features and edge damage features of each sub-region, and form a partition feature matrix. The feature filtering module is used to determine the category-stable feature regions based on the frequency of occurrence of each sub-region in images of the same type of garbage, and to determine the random pollution feature regions based on the feature fluctuation amplitude of each sub-region. The weighting module is used to input the partition feature matrix into a preset classification network, assign a first training weight to the category-stable feature region, and assign a second training weight lower than the first training weight to the randomly polluted feature region, so as to obtain a weighted training feature map. The mapping and registration module is used to perform position mapping and registration on the weighted training feature maps and calculate the feature consistency loss value; The model training module is used to iteratively update the preset classification network parameters based on the classification loss value and the feature consistency loss value until the set convergence condition is met, and then output the garbage classification model.
[0007] The beneficial effects of this invention lie in the fact that by first separating the foreground of the waste body and dividing it into circumferential and radial sub-regions, overall image recognition can be transformed into local structure recognition, improving the model's adaptability to complex backgrounds and changes in target posture. Furthermore, by statistically analyzing the recurrence patterns of each region in samples of the same category, stable feature regions are automatically extracted, allowing the model to focus on learning core recognition information representative of the category, such as bottle mouths, can rims, box corners, and fixed textures, thereby improving the recognition accuracy and classification consistency among waste of the same type. Simultaneously, by analyzing feature fluctuation trajectories, positional drift states, and area expansion and contraction changes, random contamination areas such as stains, water stains, residues, and attached foreign objects can be identified, and their weights are reduced during training to prevent the model from mislearning random noise as a classification criterion, significantly enhancing the model's resistance to pollution interference and its generalization ability. Especially for flexible waste such as plastic bags and packaging films, by combining the synchronous coupling analysis of area shrinkage trajectory and boundary wrinkling changes, dynamic deformation features such as compression lines and springy surfaces can be identified, enabling the model to learn deformable target features that are difficult to express with traditional static textures, improving the recognition accuracy for thin, curled, folded, and morphologically unstable waste. By combining location mapping registration and feature consistency loss constraints, the same key regions in different samples can maintain a unified expression in the feature space, reducing the recognition bias caused by differences in pose, shooting angle and local occlusion between samples. Ultimately, the output garbage classification model has higher recognition accuracy, stronger environmental adaptability, better robustness and more stable application effect in actual disposal scenarios. Attached Figure Description
[0008] Figure 1 This is a flowchart illustrating the steps of a training method applied to a waste sorting model. Figure 2 for Figure 1 A detailed flowchart illustrating the implementation steps of step S3. Figure 3 This is a schematic diagram of a preset classification network structure according to an embodiment; Figure 4 This is a schematic diagram of partition feature recognition in one embodiment; The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0009] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0010] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0011] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0012] To achieve the above objectives, please refer to Figures 1 to 4 A training method for a waste sorting model, the method comprising the following steps: Step S1: Collect garbage images and establish a labeled sample set; perform foreground separation on each garbage image to obtain the main garbage region; Step S2: Divide the main waste area into multiple circumferential and radial sub-regions, extract the color features, texture features, and edge damage features of each sub-region, and form a partition feature matrix; Step S3: Determine the category-stable feature regions based on the frequency of occurrence of each sub-region in images of the same type of waste, and determine the random contamination feature regions based on the feature fluctuation amplitude of each sub-region; Step S4: Input the partition feature matrix into the preset classification network, assign the first training weight to the category stable feature region, and assign the second training weight, which is lower than the first training weight, to the randomly contaminated feature region to obtain the weighted training feature map; Step S5: Perform position mapping and registration on the weighted training feature map, and calculate the feature consistency loss value; Step S6: Iteratively update the preset classification network parameters based on the classification loss value and feature consistency loss value until the set convergence condition is met, and then output the garbage classification model.
[0013] In one embodiment, step S1 involves collecting garbage images and establishing a labeled sample set, including images of household waste disposal scenes, conveyor belt sorting scenes, and static staged images; the garbage categories include recyclables, kitchen waste, hazardous waste, and other waste, and the sub-samples in each category are selected from at least one of plastic bottles, aluminum cans, cardboard boxes, fruit peels, batteries, light bulbs, and mixed contaminated waste.
[0014] It should be noted that in step S1, the waste image acquisition is completed collaboratively using an industrial camera and a mobile terminal camera module. The image resolution is controlled at 1920×1080 pixels, and the acquisition angles include top-down, side-view, and 45° tilted angles. At least 12 images are acquired for each waste object. The acquisition environment covers natural light, indoor white light, and low-light conditions to improve the scene generalization ability of the sample set. The labeled sample set is manually reviewed, and the waste category labels, main outlines, and occlusion levels are labeled one by one. The occlusion levels are divided into three levels: no occlusion, partial occlusion, and severe occlusion.
[0015] In another embodiment, before performing foreground separation on each garbage image in step S1, the original image is first subjected to brightness equalization, salt-and-pepper noise removal, and color normalization. Then, the preprocessed image is input into a preset foreground segmentation network to extract the initial mask of the garbage subject. Morphological closing operations are then used to fill edge holes, and connected component filtering is employed to remove discrete noise regions with an area less than 3% of the subject area, ultimately obtaining the complete garbage subject region. For multi-target images, the subjects are sorted from largest to smallest area, and the top two subjects are retained for subsequent training.
[0016] In one embodiment, in step S2, the main waste area is divided into 6 circumferential sub-regions and 8 radial sub-regions with the geometric center of the main body as the origin, forming a total of 48 local partition units. The circumferential sub-regions are divided according to the proportionally increasing radius, and the radial sub-regions are divided at equal angles of 360°. Color features, texture features, and edge damage features are extracted for each sub-region. The color features include the HSV color histogram and the comprehensive color difference value. The texture features include the gray-level co-occurrence matrix energy value, contrast, and entropy value. The edge damage features include the proportion of crack length, the rate of change of contour curvature, and the density of edge burrs. After normalization, each feature is spliced to form a partition feature matrix.
[0017] In one embodiment, step S3 involves statistically analyzing the frequency of occurrence of each sub-region in images of the same type of waste. When the effective display frequency of a sub-region reaches more than 80% of the total number of samples in that category, and the main feature deviation of that sub-region is less than a set fluctuation threshold, it is determined to be a stable feature region of the category. For example, the bottle mouth area of a plastic bottle, the ring cap area of an aluminum can, and the folded edge area of a cardboard box are usually identified as stable feature regions. If a sub-region is affected by stains, residual contents, or deformation and compression, resulting in a feature fluctuation amplitude that is more than 1.5 times the average fluctuation value, it is determined to be a random contamination feature region, which is used to reduce the interference effect during the training process.
[0018] In one embodiment, in step S4, the partition feature matrix is input into a preset classification network, which can be referred to as... Figure 3 The preset classification network is a convolutional neural network coupled with an attention module. Stable feature regions are assigned a first training weight of 0.85-1.00, randomly contaminated feature regions are assigned a second training weight of 0.20-0.50, and other ordinary regions are assigned an intermediate weight of 0.60. A weighted training feature map is generated by element-wise multiplying the weight mapping matrix with the original feature matrix, enabling the network to prioritize learning key structural regions that are representative of the category.
[0019] Optionally, the preset classification network in step S4 is pre-constructed before formal training. The preset classification network includes a feature extraction layer, a multi-scale convolutional layer, a region attention layer, a feature fusion layer, and a classification output layer. The network input receives the partition feature matrix formed in step S2, and the output corresponds to the waste category label. Each waste category includes at least one of recyclables, kitchen waste, hazardous waste, and other waste.
[0020] In this embodiment, it should be noted that the preset classification network is not a direct adoption of a general off-the-shelf model, but rather a specially designed network built based on the characteristics of garbage images, such as stain occlusion, random shape deformation, and obvious local damage. First, a standard feature input interface with an input size of 224×224 is established, and a three-channel input structure is set to carry color features, texture features, and edge damage features. Then, four sets of convolutional units are stacked sequentially after the input, each set including a convolutional layer, a batch normalization layer, and an activation layer, to progressively extract shallow contour features and deep semantic features.
[0021] The multi-scale convolutional layer adopts a parallel convolutional structure, including a 3×3 convolutional kernel branch, a 5×5 convolutional kernel branch, and a dilated convolutional branch. The 3×3 convolutional kernel is used to extract fine-grained edge information, the 5×5 convolutional kernel is used to extract overall shape information, and the dilated convolution is used to expand the receptive field to identify the contextual relationship of occluded areas. The output results of each branch are concatenated to form a multi-scale fusion feature map to improve the ability to identify garbage targets of different sizes.
[0022] In another embodiment, the region attention layer generates an initial attention mask based on the stable feature regions and random contamination feature regions obtained in step S3, enhancing the response of the channels corresponding to the stable feature regions and suppressing the response of the random contamination feature regions. Subsequently, the attention coefficient is dynamically corrected through an adaptive weight learning mechanism, so that the network automatically focuses on high-discrimination regions such as bottle caps, pull tabs, folds, and standard contours during training. The output of this region attention layer is then input into the feature fusion layer and fused with the shallow texture features through skip connections.
[0023] A global average pooling layer is applied after the feature fusion layer to compress the spatial dimension while retaining the response information of the main categories. The pooling result is input into a two-layer fully connected network, where the first fully connected layer has 512 neurons and the second fully connected layer has the same number of neurons as the garbage category. Finally, the probability values of each category are output through the Softmax function. To prevent overfitting, a Dropout layer with a deactivation rate of 0.4 is applied before the fully connected layer.
[0024] After the pre-defined classification network is pre-trained using a publicly available solid waste image dataset, it acquires basic object recognition capabilities. Then, the labeled sample set established in this application is used for transfer learning fine-tuning to shorten the training cycle and improve classification accuracy in complex waste scenarios. The Adam optimizer is used during the pre-training phase with an initial learning rate of 0.0005, which decays to 0.0001 during the fine-tuning phase.
[0025] In one embodiment, when performing position mapping and registration on the weighted training feature map in step S5, a unified coordinate frame is first established based on the bounding rectangle of the main body of the waste, and then the rotation angle and scale difference are corrected by affine transformation so that the key parts of the same type of waste are aligned in the feature space. Subsequently, the cosine similarity of the corresponding stable feature regions between different samples is calculated, and the feature consistency loss value is generated by combining Euclidean distance to constrain the degree of aggregation of the same type of samples in the deep feature space.
[0026] In one embodiment, in step S6, a total loss function is jointly constructed based on the classification loss value and the feature consistency loss value. This function is used to iteratively update the preset classification network parameters. The classification loss value uses the cross-entropy loss function, and the consistency loss value uses the contrast constraint loss function. The total loss function is expressed as: L = αLc + βLf, where Lc is the classification loss value, Lf is the feature consistency loss value, α is 0.7, and β is 0.3. The training batch size is set to 32, and the initial learning rate is set to 0.001. When the accuracy improvement on the validation set is less than 0.1% after 10 consecutive iterations, the set convergence condition is met, and the garbage classification model is output.
[0027] As an example of the present invention, reference is made to Figure 2 As shown, step S3 in this example includes: Step S31: Extract the partition feature matrix corresponding to the garbage images of the same category, and establish a one-to-one partition comparison set according to the circumferential sub-region position and the radial sub-region position; Step S32: Calculate the color feature similarity, texture feature similarity, and edge damage feature similarity of each corresponding sub-region in the partition comparison set to obtain the comprehensive repetition index of each sub-region; Step S33: Count the number of times the comprehensive repetition index of each sub-region in the same type of garbage image is continuously higher than the preset index threshold, and generate stable occurrence frequency data of sub-region based on the occurrence frequency; Step S34: Subregions with a stable occurrence frequency data higher than a preset frequency threshold are identified as candidate stable feature regions, and spatially adjacent candidate stable feature regions are connected and merged to form category stable feature regions; Step S35: Determine the random pollution characteristic area based on the characteristic fluctuation amplitude of each sub-region.
[0028] In one embodiment, reference may be made to Figure 4 Extracting the partition feature matrix corresponding to the images of the same type of waste, including selecting multiple images of the same waste category from the waste sample set that has been labeled, and reading the partition feature matrix formed by each image in step S2; the images of the same type of waste are selected from any sub-category among plastic bottles, aluminum cans, cardboard boxes, fruit peels, batteries and light tubes.
[0029] In this embodiment, it should be noted that, to ensure the comparability of partition positions between different images, step S31 first performs posture normalization processing on the main areas of the same type of waste, including principal axis direction correction, scale unification, and center point alignment; then, according to the preset circumferential and radial sub-region positions, a one-to-one corresponding partition comparison set is established, that is, the i-th ring and j-th radial sub-region of the first image is paired with the corresponding sub-regions at the same position in other images of the same type to form partition comparison units with consistent positions. In this way, local feature misalignment caused by differences in the placement angle of waste can be avoided.
[0030] When calculating the feature similarity of each corresponding sub-region in the partition comparison set, the color feature similarity is calculated using the intersection coefficient of the normalized histogram, the texture feature similarity is calculated using the cosine similarity of the gray-level co-occurrence matrix parameters, and the edge damage feature similarity is calculated using the contour curvature distribution matching degree. Then, weighted fusion is performed according to preset weights to obtain the comprehensive repetition index of each sub-region. The calculation formula is: R=αC+βT+γE, where R is the comprehensive repetition index, C is the color feature similarity, T is the texture feature similarity, E is the edge damage feature similarity, and α, β, and γ are 0.35, 0.40, and 0.25, respectively.
[0031] For each sub-region, the changes in its comprehensive repetition index across multiple rounds of comparisons of images of the same type of waste are statistically analyzed. When the comparison results of a sub-region are higher than a preset index threshold of 0.78 for three or more consecutive times, it is recorded as a stable occurrence event. The number of stable occurrence events in all samples is further accumulated and combined with the total number of samples in that category to generate stable occurrence frequency data for the sub-region. The stable occurrence frequency data is expressed as a percentage to reflect the reliability of the sub-region's continuous repetition in the same type of waste.
[0032] Subregions whose stable occurrence frequency data exceeds a preset frequency threshold of 75% are identified as candidate stable feature regions. Subsequently, based on the adjacency relationship of each candidate stable feature region in the circumferential and radial coordinates, connected component merging is performed, automatically splicing candidate regions with boundary contact or intervals not exceeding one subregion unit to form a continuous structure region. If the area of the merged connected region is less than 5% of the total area of all partitions, it is judged as a discrete noise region and is removed, ultimately forming the category-stable feature region.
[0033] In another embodiment, for plastic bottles, the threaded area at the bottle neck, the transition area at the bottle shoulder, and the support texture area at the bottom are typically identified as category-stable feature areas; for aluminum cans, the top pull tab area and the rounded support area at the bottom are typically identified as category-stable feature areas; and for cardboard boxes, the folded sealing area and the right-angled edge area are typically identified as category-stable feature areas. Thus, category-stable feature areas are mostly parts with fixed structures and consistent manufacturing processes.
[0034] When determining random contamination feature areas based on the characteristic fluctuation amplitude of each sub-region, first calculate the color variance, texture dispersion, and edge anomaly change rate of each sub-region in all images of the same category, and generate feature fluctuation amplitude parameters; when at least two fluctuation parameters of a sub-region are higher than 1.6 times the average fluctuation level of the category, it is determined that the sub-region is significantly affected by oil residue, liquid adhesion, extrusion deformation, or occlusion coverage, and is identified as a random contamination feature area.
[0035] Preferably, step S35 includes: The features of the same sub-region in multiple images are superimposed and expanded to confirm the feature change trajectory of the sub-region; Locate reciprocating oscillating segments along the characteristic change trajectory to identify local change regions that repeatedly appear and disappear in different images; For regions of local change, adjacent observation is performed to determine whether the surrounding sub-regions remain continuous and stable. If the surrounding sub-regions are stable while the local change region changes independently, it is extracted as a drift sub-region. By comparing the center position offset and coverage expansion of each drifting sub-region in multiple images, active sub-regions with shifting positions and changing areas are selected and identified as random contamination feature areas.
[0036] In one embodiment, step S35 is mainly used to identify unstable disturbance areas on the surface of waste caused by oil stains, water stains, residual liquid, label residue, or foreign obstructions. Although such areas may have obvious feature responses in a single image, they lack fixed positions and constant shapes in continuous samples of the same type of waste. If they are directly used in training, it is easy to cause model mislearning. Therefore, by using a multi-image dynamic comparison method, local areas with drift characteristics are extracted as random pollution feature areas.
[0037] When overlaying and expanding the features of the same sub-region across multiple images, the color vector, texture response value, and edge anomaly values of the sub-region in each image are first extracted and arranged in a time series according to the image acquisition order. Then, a three-dimensional feature stacking matrix is constructed, where the horizontal axis represents the sample number, the vertical axis represents the feature category, and the depth axis represents the response intensity. The feature change trajectory of the sub-region is obtained through continuous mapping. If the comprehensive color difference value, texture roughness, and edge abrupt change rate of a sub-region in different images exhibit non-monotonic fluctuations, it is determined to have an abnormal change trend.
[0038] In another embodiment, when searching for reciprocating oscillating segments along the feature change trajectory, the peak and valley values of the feature response in continuous samples are detected alternately. When a local feature exhibits a cyclical change pattern of "enhancement-weakening-re-enhancement" or "appearance-disappearance-reappearance" in adjacent images, and the number of cycles is not less than 2, the corresponding region is identified as a reciprocating change region. This reciprocating change region typically corresponds to local interference blocks formed by droplet residue, stain adhesion, or loose foreign matter obstruction.
[0039] In one embodiment, when observing the adjacent areas of a locally changed region, the stability parameters of the eight surrounding sub-regions are retrieved, centered on the sub-region containing the changed region, to determine whether the adjacent regions remain continuous and stable. If the comprehensive repetition index of the surrounding sub-regions remains higher than the stability threshold, while the characteristic response of the central locally changed region continues to fluctuate, it indicates that the change does not originate from differences in the overall structure of the waste body, but rather belongs to an isolated disturbance region. Therefore, this locally changed region is extracted as a drift sub-region. This method avoids misjudging real structural changes at the edge of the waste body as contaminated areas.
[0040] In another embodiment, when comparing the center position offset and coverage expansion / contraction of each drift sub-region across multiple images, the geometric center coordinates of the drift sub-region in each image are first calculated, and the displacement distance between adjacent images is obtained. Simultaneously, the rate of increase / decrease in the area of the pixels covered by the drift sub-region is statistically analyzed to form positional migration parameters and area expansion / contraction parameters. When the center position offset is greater than 20% of the side length of the sub-region and the coverage expansion / contraction is greater than 15% of the initial area, the drift sub-region is determined to have significant activity.
[0041] In one embodiment, after identifying the mobile sub-regions with shifting locations and varying areas as random contamination feature regions, these regions can be assigned lower training weights during subsequent classification network training stages to reduce their interference with the category determination results. For example, water stains on the surface of plastic bottles, oil diffusion areas on the sides of cardboard boxes, and residual liquid attachment areas on the tops of aluminum cans typically exhibit a non-fixed central location and fluctuating coverage area depending on the sample. After identification in this step, they can all be classified as random contamination feature regions.
[0042] Preferred methods for obtaining the reciprocating oscillation segment include: Extract the feature change trajectory of the same sub-region in multiple images; Continuous increase / decrease fluctuation analysis based on characteristic change trajectories; Based on the analysis of increases and decreases in fluctuations, identify the continuous change segments that change from enhancement to weakening and then back to enhancement; Spatial overlap analysis of continuously changing sections; Based on spatial overlap analysis, synchronously changing sections caused by the overall displacement of the waste body are eliminated; By integrating the characteristic reciprocating changes and continuous states in the remaining continuous change segments, the reciprocating oscillation segment is obtained.
[0043] In one embodiment, the reciprocating swing section is mainly used to identify dynamic disturbance features formed by local pollutants, residual liquids, or obstructing foreign objects on the surface of the waste. Such disturbances usually manifest as the periodic enhancement and weakening of the feature response of a certain sub-region in different images, while the inherent structural features of the waste body are relatively stable overall. Therefore, by extracting the reciprocating swing section, random pollution changes and changes in the actual structure of the waste body can be effectively distinguished.
[0044] In this embodiment, it should be noted that, firstly, the color feature value, texture feature value, and edge damage feature value of the target sub-region in the same type of waste image are retrieved and arranged according to the image acquisition order; the three types of features are weighted and fused into a comprehensive response value, and the feature change trajectory of the sub-region is formed with the image sequence number as the horizontal axis and the comprehensive response value as the vertical axis. To reduce noise interference, a moving average method can be used to smooth the feature change trajectory.
[0045] Subsequently, the response difference between adjacent images is calculated based on the characteristic change trajectory. A response difference greater than zero is considered enhancement, less than zero is considered reduction, and an absolute value less than a preset micro-motion threshold is considered stability. When the continuous change trend meets the pattern of "enhancement-reduction-re-enhancement" or "reduction-enhancement-re-reduction," the corresponding segment is identified as a continuously changing segment. Furthermore, it is required that the amplitude of two consecutive changes in the same direction is higher than the average fluctuation amplitude to avoid misidentification of minor noise.
[0046] Furthermore, spatial location overlap analysis is performed on continuously changing segments. The corresponding changing areas in each image are mapped to a unified coordinate system, and the overlap rate between changing areas is calculated. If multiple adjacent sub-regions change in the same direction simultaneously, and the direction of change is consistent with the overall displacement direction of the waste body, then it is determined that the segment is caused by the overall translation, rotation or shooting angle change of the waste body, and it is removed.
[0047] Finally, the number of repetitive changes and the number of frames for the remaining continuous change segments are statistically analyzed. When the same region repeatedly shows alternating enhancement and weakening changes in multiple images, and the number of times it lasts reaches a preset threshold, the continuous change segment is determined as a repetitive swing segment.
[0048] Preferably, the adjacent areas of the locally changing region are observed to determine whether their surrounding sub-regions remain continuous and stable. If the surrounding sub-regions are stable while the locally changing region changes independently, it is extracted as a drift sub-region, including: Extract adjacent sub-regions around the center of the locally changed region to construct a surrounding adjacent region; Extract color, texture, and edge features of the surrounding adjacent regions from multiple images to form an adjacency change trajectory; The change transmission relationship between adjacent sub-regions is detected based on the adjacent change trajectory. It is then identified whether there is a change chain that spreads continuously from the outside to the inside or from the inside to the outside. When no continuous change chain is formed around the adjacent region, it is determined that the surrounding sub-region remains continuous and stable. Extract the positional offset trajectory and area scaling trajectory of the local change region in multiple images to determine whether the local change region is moving or shrinking in isolation. When the surrounding sub-regions remain continuous and stable, and the locally changing regions exhibit individual movement or individual contraction, the locally changing regions are extracted as drift sub-regions.
[0049] In one embodiment, the sub-region where the local change region is located is first taken as the center, and a circle is expanded outward according to the circumferential and radial adjacency relationship, and the surrounding adjacent sub-regions are extracted as the surrounding adjacency region; when the local change region is located at the edge, the actual existing adjacent sub-regions are selected to form an incomplete surrounding adjacency region.
[0050] Subsequently, color, texture, and edge features of the surrounding adjacent regions are extracted from multiple images and arranged in the order of image acquisition to form an adjacency change trajectory. Then, the feature changes of each adjacent sub-region in adjacent images are calculated to determine whether the change is continuously transmitted along adjacent directions. If multiple adjacent sub-regions show changes in the same direction sequentially, forming a continuous diffusion chain from the outside in or from the inside out, it indicates that the change may originate from structural deformation, lighting changes, or overall posture changes. If a continuous diffusion chain of changes does not form around the adjacent regions, and the comprehensive repetition index of each adjacent sub-region remains above the stability threshold, then the surrounding sub-regions are determined to remain continuous and stable.
[0051] Furthermore, the geometric center coordinates of the local change region in multiple images are extracted to form a position offset trajectory, and the area of the corresponding covered pixels is statistically analyzed to form an area scaling trajectory. When the center position of the local change region shifts between different images, and the positions of the surrounding sub-regions remain basically unchanged, it is determined that it is in a state of independent movement. When the area of the local change region continuously increases or decreases, while the area of the surrounding sub-regions remains stable, it is determined that it is in a state of independent contraction.
[0052] Finally, when the surrounding sub-regions remain continuous and stable and the locally changing regions exhibit individual movement or individual contraction, the locally changing regions are extracted as drift sub-regions.
[0053] Preferably, extracting the positional offset trajectory and area scaling trajectory of the local change region in multiple images, and determining whether the local change region is in a state of independent movement or independent shrinkage, specifically involves: Extract the center coordinates and boundary range of the local variation region in multiple images; Generate position offset trajectories based on the changing order of coordinates of each center position; Generate area scaling trajectory based on the changing sequence of each boundary range; Compare the position offset trajectory with the position change trajectory of the surrounding adjacent sub-regions to confirm whether the local change area is moving independently, and compare the area expansion trajectory with the area change trajectory of the surrounding adjacent sub-regions to confirm whether the local change area is shrinking independently. By integrating individual movement states and individual contraction states, the independent change states of local change areas are identified.
[0054] In one embodiment, a local change region is located in multiple images of the same type of waste, and the geometric center coordinates and boundary range of the region in each image are extracted, wherein the boundary range is represented by an circumscribed rectangle or a pixel envelope contour; then the changes in the coordinates of each center position are recorded according to the image acquisition order to form a position offset trajectory, which is used to characterize the movement path of the local change region in different images.
[0055] The coverage area of locally changed regions is calculated based on the boundary ranges in each image, and these areas are arranged in the order of the images to form an area scaling trajectory, which is used to characterize the expansion, contraction, or intermittent change trend of the region. To improve stability, the area data can be smoothed to eliminate the fluctuations caused by single-frame recognition errors.
[0056] The positional offset trajectory is compared with the positional change trajectory of the surrounding adjacent sub-regions. When the displacement direction and displacement distance of the localized area are inconsistent with the overall change trend of the surrounding adjacent sub-regions, and the positions of the surrounding adjacent sub-regions remain basically stable, the localized area is determined to be in a state of independent movement. This state usually corresponds to the localized transfer of stains, water droplet residue, or attached foreign matter on the surface of the main body.
[0057] Simultaneously, the area expansion / contraction trajectory is compared with the area change trajectory of adjacent sub-regions. When the area of a localized area continuously increases or decreases, while the area change of adjacent sub-regions is below a preset fluctuation threshold, the localized area is determined to be in a state of isolated contraction. This state typically corresponds to the processes of liquid evaporation and diffusion, stain drying and shrinkage, or residue shedding.
[0058] By integrating the individual movement state and the individual contraction state, when a local change area satisfies either state or when the two states alternate, it is confirmed that the local change area has an independent change state.
[0059] Preferably, generating the area scaling trajectory based on the changing sequence of each boundary range further includes: Extract the number of turning points, edge curvature length, and indentation depth of the boundary contour of the local variation region to construct a boundary wrinkling feature group; Generate wrinkling-related trajectories based on the changing order of boundary wrinkling feature groups in multiple images; The area stretching trajectory and the wrinkling accompanying trajectory are compared synchronously to calculate the regional wrinkling coupling value. When the regional wrinkle coupling value continues to increase, it is confirmed that the local change area forms bag compression wrinkle characteristics; When the regional wrinkling coupling value weakens and the boundary tends to flatten, it is confirmed that the local change region forms the characteristics of a thin film elastic surface. Based on the compression texture of the bag and the resilience of the film, the localized areas of change were identified as dynamic identification areas for plastic bags and packaging films.
[0060] In one embodiment, considering the characteristics of plastic bags and packaging film waste that are prone to wrinkling, deformation, compression rebound, and irregular boundary fluctuations, the boundary wrinkling change information is further extracted based on the area expansion and contraction trajectory generated according to the boundary range, in order to improve the identification accuracy of thin and flexible waste. First, the boundary contour of the local change area is analyzed by curve analysis to extract the number of turning points, edge bending length, and indentation depth. The number of turning points is used to characterize the contour turning frequency, the edge bending length is used to characterize the degree of boundary wrinkling, and the indentation depth is used to characterize the inward contraction of the boundary. Based on this, a boundary wrinkling feature group is constructed.
[0061] Subsequently, the boundary wrinkling feature groups in each image are arranged according to the acquisition order to generate a wrinkling-accompanying trajectory; the area stretching trajectory and the wrinkling-accompanying trajectory are then compared synchronously to calculate the regional wrinkling coupling value. The regional wrinkling coupling value is used to characterize the linkage strength between area change and boundary wrinkling change. When the area of the local change region decreases while the number of turning points increases, the edge curvature length increases, and the indentation depth deepens, the coupling value increases.
[0062] Furthermore, when the regional wrinkling coupling value continues to increase in continuous images and the boundary shows a multi-fold line aggregation state, it is confirmed that the local change area forms bag compression wrinkle characteristics, indicating that the area corresponds to the wrinkling morphology of flexible materials such as plastic bags and soft packaging bags after being squeezed.
[0063] When the regional wrinkling coupling value gradually weakens and the boundary contour recovers from a tortuous state to a smooth state, it is confirmed that the local change area forms the film rebound surface feature, indicating that the area corresponds to the rebound and flattening process of film materials such as packaging film and food preservation film after the external force is removed.
[0064] Finally, based on the compression texture of the bag and the elastic surface of the film, the localized change area was identified as a dynamic identification area for plastic bags and packaging films, which will serve as an important criterion for identifying flexible plastic waste in subsequent classification training.
[0065] Preferably, the area stretching trajectory and the accompanying wrinkling trajectory are compared synchronously to calculate the regional wrinkling coupling value, including: Extract the area change at each time step in the area stretching trajectory; Extract the changes in the turning point, edge curvature, and indentation depth at each moment in the wrinkling-accompanying trajectory. Based on the acquisition time sequence of the garbage images, a one-to-one correspondence was performed between the area change and the change of the turning point, the change of the edge curvature, and the change of the indentation depth. Calculate the synchronous increase data of each wrinkle change during the area reduction stage; The linkage strength between area change and wrinkling change is calculated based on the synchronous increase data, and the regional wrinkling coupling value is obtained.
[0066] In one embodiment, the area difference between adjacent images of the local change region is extracted based on the area scaling trajectory to obtain the area change at each time point, and the area increase stage and the area decrease stage are marked to highlight the morphological changes of flexible waste during the compression and release process.
[0067] Meanwhile, based on the wrinkling-accompanying trajectory, the changes in the number of turning points, the changes in edge curvature, and the changes in indentation depth are extracted in the same time series. The changes in turning points are used to characterize the changes in contour complexity, the changes in edge curvature are used to characterize the changes in wrinkle density, and the changes in indentation depth are used to characterize the changes in structural compression.
[0068] Subsequently, based on the acquisition time sequence of the garbage images, the area change and the three types of shrinkage change were strictly time-aligned to establish a one-to-one synchronous mapping relationship, so that the area change and shrinkage change at the same time point are in the same analysis unit, thereby avoiding misjudgment caused by time sequence misalignment.
[0069] Furthermore, during the area reduction phase, a synchronous growth analysis is performed on each wrinkle change, that is, to count whether the number of turning points increases, the edge curvature intensifies, and the indentation depth deepens while the area decreases, and to calculate the degree of synchronous growth of their changes, thus forming synchronous growth data.
[0070] Finally, the linkage strength between area change and wrinkle change was calculated based on the synchronous increase data. When the area decrease and wrinkle enhancement show a highly consistent synchronous relationship, the linkage strength is high; when the two change trends are inconsistent, the linkage strength is low.
[0071] Preferably, the one-to-one matching of area change with turnaround point change, edge curvature change, and indentation depth change based on the acquisition time sequence of the garbage images includes: Based on the acquisition time sequence of each garbage image and arranged in the order of acquisition, the area change, turning point change, edge curvature change and indentation depth change corresponding to each acquisition time are extracted. Using the same acquisition time as the corresponding reference, the area change is synchronously linked with the turning point change, edge curvature change and indentation depth change to form a single frame corresponding data group. By concatenating the corresponding data groups of single frames from adjacent acquisition times in sequential order, a continuous corresponding sequence is formed in which area shrinkage and boundary wrinkling change synchronously.
[0072] In one embodiment, all images are strictly sorted by time according to the acquisition sequence of the garbage images to ensure that the subsequent feature alignment process uses the acquisition time as the sole basis and avoids mismatches caused by different image numbers or processing orders.
[0073] Subsequently, at each acquisition moment, the area change of the local change region is extracted synchronously from the corresponding image, and the change of the turning point, the change of the edge curvature, and the change of the indentation depth at the same moment are also extracted. Each wrinkle change is derived from the calculation results of the boundary wrinkle feature group of the same frame image.
[0074] Furthermore, using the same acquisition time as the corresponding benchmark, the area change is taken as the main change and synchronously linked with the change of the turning point, the change of the edge curvature, and the change of the indentation depth. That is, a four-dimensional feature correspondence is formed at the same time node, thereby constructing a single frame corresponding data group, so that each frame image corresponds to a unique area-wrinkling joint state description.
[0075] Based on this, the data groups corresponding to single frames at all adjacent acquisition times are sequentially concatenated in chronological order to form a continuous corresponding sequence, so that the area shrinkage process and the boundary wrinkling process form a continuous mapping relationship in the time dimension, thereby completely characterizing the dynamic evolution path of the local change area from the initial state to the compression or rebound state.
[0076] Of particular importance is the overlaying and expansion of features of the same sub-region across multiple images, including: Read the color features, texture features, and edge features of the same sub-region in multiple images, and arrange them in order according to the image acquisition time sequence; Using the sub-region in the first image as the reference sub-region, the corresponding sub-regions in the remaining images are aligned and superimposed one by one to form a sub-region feature overlay layer. Extract color depth migration paths, texture density variation paths, and edge undulation evolution paths by overlaying layers along sub-region features; The color depth migration path, texture density change path, and edge undulation evolution path are sequentially linked to form a continuous change chain of sub-regions. The characteristic change trajectory of the sub-region is determined by the continuous change chain of the sub-region.
[0077] In one embodiment, color features, texture features, and edge features of the same sub-region in multiple garbage images are read. The color features include comprehensive color value, brightness value, or color distribution parameters. The texture features include grain density, grayscale change rate, or surface roughness parameters. The edge features include contour curvature, boundary fluctuation value, or damage degree parameters. The features are arranged sequentially according to the image acquisition time sequence so that each feature data has a continuous time correspondence.
[0078] Subsequently, using the sub-region in the first image as the reference sub-region, the corresponding sub-regions in the remaining images are aligned according to the center coordinates, boundary contours, or main direction to eliminate positional errors caused by changes in the angle of garbage placement, slight rotation of the subject, or shooting offset. After completing the positional alignment, the corresponding sub-regions at each time point are superimposed one by one to form a sub-region feature superimposed layer, so that the changing state of the same area at different times is presented in a concentrated manner.
[0079] Furthermore, the color depth migration path, texture density variation path, and edge undulation evolution path are extracted along the feature overlay layer of the sub-region. Among them, the color depth migration path is used to characterize the process of stain deepening, liquid evaporation, or surface reflection change; the texture density variation path is used to characterize the process of wrinkle increase or decrease, particle adhesion, or surface smoothness change; and the edge undulation evolution path is used to characterize the process of contour bulging, shrinkage, damage expansion, or boundary rebound change.
[0080] Subsequently, the color depth migration path, texture density change path, and edge undulation evolution path are synchronously connected according to the image acquisition time sequence to form a continuous change chain of the sub-region, so that the multidimensional feature change process of the sub-region in multiple images is continuously expressed in a chain structure.
[0081] Finally, the characteristic change trajectory of the sub-region is confirmed based on the continuous change chain of the sub-region. When the continuous change chain tends to be stable as a whole, the sub-region is determined to be a stable structural region; when the continuous change chain exhibits periodic fluctuations, random drifts, or sudden increases or decreases, the sub-region is determined to have dynamic disturbance characteristics.
[0082] Of particular importance is that, based on the continuous change chain of the sub-region, the characteristic change trajectory of the sub-region is identified, including: The feature nodes at each time point in the continuous change chain of the sub-region are read sequentially, and the change direction, change magnitude and duration between adjacent feature nodes are extracted. Feature nodes that change continuously in the same direction are merged according to the direction of change to form stage change segments; Connect adjacent stages of change sequentially to form a complete evolutionary path; Extract abrupt turning points, sustained stable segments, and recurring fluctuation segments from the complete evolution path to generate trajectory identification data; By integrating complete evolution path and trajectory identification data, the characteristic change trajectory of this sub-region was confirmed.
[0083] In one embodiment, the feature nodes at each time point in the continuous change chain of the sub-region are read sequentially. Each feature node corresponds to the color state, texture state, and edge state at the time of garbage image acquisition. Then, the change direction, change amplitude, and duration between adjacent feature nodes are calculated. The change direction is used to characterize feature enhancement, weakening, or stabilization. The change amplitude is used to characterize the difference between adjacent nodes. The duration is used to characterize the number of image frames or acquisition cycles during which the change state continues.
[0084] Subsequently, feature nodes that change continuously in the same direction are merged according to their direction of change. That is, nodes that continuously increase are merged into growth segments, nodes that continuously decrease are merged into decay segments, and nodes that continuously remain stable are merged into stationary segments, thus forming stage change segments. In this way, discrete node changes can be transformed into continuous stage structures with clear trends.
[0085] Furthermore, adjacent change segments are connected end-to-end in chronological order, forming a complete evolution path from growth segments to decay segments to stationary segments. This path describes the continuous change process of the sub-region across the entire image time series. The complete evolution path reflects the entire process of a local region from its initial state to a fluctuating, stable, or recovering state.
[0086] Next, key trajectory structure information is extracted from the complete evolution path. When the change amplitude exceeds a preset threshold and the direction is rapidly reversed, it is identified as a sudden turning point; when the change amplitude is continuously below the stability threshold and remains at a preset duration, it is identified as a sustained stable segment; when growth segments and decay segments alternate in the path and the number of cycles reaches a set number, it is identified as a reciprocating fluctuation segment, and corresponding trajectory identification data is generated.
[0087] Finally, by integrating the complete evolution path and trajectory identification data, the characteristic change trajectory of the sub-region is confirmed. If the proportion of continuously stable segments in the trajectory is high, the sub-region is determined to be a stable structural region; if the proportion of reciprocating fluctuation segments or abrupt turning points is high, the sub-region is determined to have dynamic disturbance characteristics.
[0088] The present invention also provides a training system for a waste sorting model, for executing the training method for a waste sorting model as described above, the training system for a waste sorting model comprising: The preprocessing module is used to acquire garbage images and establish a labeled sample set; it performs foreground separation on each garbage image to obtain the main garbage region; The feature extraction module is used to divide the main area of waste into multiple circumferential and radial sub-regions, extract the color features, texture features and edge damage features of each sub-region, and form a partition feature matrix. The feature filtering module is used to determine the category-stable feature regions based on the frequency of occurrence of each sub-region in images of the same type of garbage, and to determine the random pollution feature regions based on the feature fluctuation amplitude of each sub-region. The weighting module is used to input the partition feature matrix into a preset classification network, assign a first training weight to the category-stable feature region, and assign a second training weight lower than the first training weight to the randomly polluted feature region, so as to obtain a weighted training feature map. The mapping and registration module is used to perform position mapping and registration on the weighted training feature maps and calculate the feature consistency loss value; The model training module is used to iteratively update the preset classification network parameters based on the classification loss value and the feature consistency loss value until the set convergence condition is met, and then output the garbage classification model.
[0089] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.
[0090] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A training method for a waste sorting model, characterized in that, Includes the following steps: Step S1: Collect garbage images and establish a labeled sample set; Foreground separation is performed on each garbage image to obtain the main garbage region; Step S2: Divide the main waste area into multiple circumferential and radial sub-regions, extract the color features, texture features, and edge damage features of each sub-region, and form a partition feature matrix; Step S3: Determine the category-stable feature regions based on the frequency of occurrence of each sub-region in images of the same type of waste, and determine the random contamination feature regions based on the feature fluctuation amplitude of each sub-region; Step S4: Input the partition feature matrix into the preset classification network, assign the first training weight to the category stable feature region, and assign the second training weight, which is lower than the first training weight, to the randomly contaminated feature region to obtain the weighted training feature map; Step S5: Perform position mapping and registration on the weighted training feature map, and calculate the feature consistency loss value; Step S6: Iteratively update the preset classification network parameters based on the classification loss value and feature consistency loss value until the set convergence condition is met, and then output the garbage classification model.
2. The training method for a waste sorting model according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Extract the partition feature matrix corresponding to the garbage images of the same category, and establish a one-to-one partition comparison set according to the circumferential sub-region position and the radial sub-region position; Step S32: Calculate the color feature similarity, texture feature similarity, and edge damage feature similarity of each corresponding sub-region in the partition comparison set to obtain the comprehensive repetition index of each sub-region; Step S33: Count the number of times the comprehensive repetition index of each sub-region in the same type of garbage image is continuously higher than the preset index threshold, and generate stable occurrence frequency data of sub-region based on the occurrence frequency; Step S34: Subregions with a stable occurrence frequency data higher than a preset frequency threshold are identified as candidate stable feature regions, and spatially adjacent candidate stable feature regions are connected and merged to form category stable feature regions; Step S35: Determine the random pollution characteristic area based on the characteristic fluctuation amplitude of each sub-region.
3. The training method for a waste sorting model according to claim 2, characterized in that, Step S35 includes: The features of the same sub-region in multiple images are superimposed and expanded to confirm the feature change trajectory of the sub-region; Locate reciprocating oscillating segments along the characteristic change trajectory to identify local change regions that repeatedly appear and disappear in different images; For regions of local change, adjacent observation is performed to determine whether the surrounding sub-regions remain continuous and stable. If the surrounding sub-regions are stable while the local change region changes independently, it is extracted as a drift sub-region. By comparing the center position offset and coverage expansion of each drifting sub-region in multiple images, active sub-regions with shifting positions and changing areas are selected and identified as random contamination feature areas.
4. The training method for a waste sorting model according to claim 3, characterized in that, Methods for obtaining the reciprocating oscillation segment include: Extract the feature change trajectory of the same sub-region in multiple images; Continuous increase / decrease fluctuation analysis based on characteristic change trajectories; Based on the analysis of increases and decreases in fluctuations, identify the continuous change segments that change from enhancement to weakening and then back to enhancement; Spatial overlap analysis of continuously changing sections; Based on spatial overlap analysis, synchronously changing sections caused by the overall displacement of the waste body are eliminated; By integrating the characteristic reciprocating changes and continuous states in the remaining continuous change segments, the reciprocating oscillation segment is obtained.
5. The training method for a waste sorting model according to claim 3, characterized in that, For regions of local change, adjacent observation is performed to determine whether their surrounding sub-regions remain continuous and stable. If the surrounding sub-regions are stable while the locally changing region changes independently, it is extracted as a drift sub-region, including: Extract adjacent sub-regions around the center of the locally changed region to construct a surrounding adjacent region; Extract color, texture, and edge features of the surrounding adjacent regions from multiple images to form an adjacency change trajectory; The change transmission relationship between adjacent sub-regions is detected based on the adjacent change trajectory. It is then identified whether there is a change chain that spreads continuously from the outside to the inside or from the inside to the outside. When no continuous change chain is formed around the adjacent region, it is determined that the surrounding sub-region remains continuous and stable. Extract the positional offset trajectory and area scaling trajectory of the local change region in multiple images to determine whether the local change region is moving or shrinking in isolation. When the surrounding sub-regions remain continuous and stable, and the locally changing regions exhibit individual movement or individual contraction, the locally changing regions are extracted as drift sub-regions.
6. The training method for a waste sorting model according to claim 5, characterized in that, Extracting the positional offset trajectory and area scaling trajectory of local change regions across multiple images, and determining whether the local change regions exhibit isolated movement or isolated shrinkage, specifically involves: Extract the center coordinates and boundary range of the local variation region in multiple images; Generate position offset trajectories based on the changing order of coordinates of each center position; Generate area scaling trajectory based on the changing sequence of each boundary range; Compare the position offset trajectory with the position change trajectory of the surrounding adjacent sub-regions to confirm whether the local change area is moving independently, and compare the area expansion trajectory with the area change trajectory of the surrounding adjacent sub-regions to confirm whether the local change area is shrinking independently. By integrating individual movement states and individual contraction states, the independent change states of local change areas are identified.
7. The training method for a waste sorting model according to claim 6, characterized in that, Generating the area scaling trajectory based on the changing sequence of each boundary range also includes: Extract the number of turning points, edge curvature length, and indentation depth of the boundary contour of the local variation region to construct a boundary wrinkling feature group; Generate wrinkling-related trajectories based on the changing order of boundary wrinkling feature groups in multiple images; The area stretching trajectory and the wrinkling accompanying trajectory are compared synchronously to calculate the regional wrinkling coupling value. When the regional wrinkle coupling value continues to increase, it is confirmed that the local change area forms bag compression wrinkle characteristics; When the regional wrinkling coupling value weakens and the boundary tends to flatten, it is confirmed that the local change region forms the characteristics of a thin film elastic surface. Based on the compression texture of the bag and the resilience of the film, the localized areas of change were identified as dynamic identification areas for plastic bags and packaging films.
8. The training method for a waste sorting model according to claim 7, characterized in that, The area stretching trajectory is synchronously compared with the wrinkling accompanying trajectory, and the regional wrinkling coupling value is calculated, including: Extract the area change at each time step in the area stretching trajectory; Extract the changes in the turning point, edge curvature, and indentation depth at each moment in the wrinkling-accompanying trajectory. Based on the acquisition time sequence of the garbage images, a one-to-one correspondence was performed between the area change and the change of the turning point, the change of the edge curvature, and the change of the indentation depth. Calculate the synchronous increase data of each wrinkle change during the area reduction stage; The linkage strength between area change and wrinkling change is calculated based on the synchronous increase data, and the regional wrinkling coupling value is obtained.
9. The training method for a waste sorting model according to claim 8, characterized in that, Based on the acquisition time sequence of the garbage images, a one-to-one matching process is performed between the area change and the change at the turning point, the change in edge curvature, and the change in indentation depth, including: Based on the acquisition time sequence of each garbage image and arranged in the order of acquisition, the area change, turning point change, edge curvature change and indentation depth change corresponding to each acquisition time are extracted. Using the same acquisition time as the corresponding reference, the area change is synchronously linked with the turning point change, edge curvature change and indentation depth change to form a single frame corresponding data group. By concatenating the corresponding data groups of single frames from adjacent acquisition times in sequential order, a continuous corresponding sequence is formed in which area shrinkage and boundary wrinkling change synchronously.
10. A training system for a waste sorting model, characterized in that, For performing the training method for a waste sorting model as described in claim 1, the training system for the waste sorting model includes: The preprocessing module is used to acquire garbage images and establish a labeled sample set; it performs foreground separation on each garbage image to obtain the main garbage region; The feature extraction module is used to divide the main area of waste into multiple circumferential and radial sub-regions, extract the color features, texture features and edge damage features of each sub-region, and form a partition feature matrix. The feature filtering module is used to determine the category-stable feature regions based on the frequency of occurrence of each sub-region in images of the same type of garbage, and to determine the random pollution feature regions based on the feature fluctuation amplitude of each sub-region. The weighting module is used to input the partition feature matrix into a preset classification network, assign a first training weight to the category-stable feature region, and assign a second training weight lower than the first training weight to the randomly contaminated feature region, so as to obtain a weighted training feature map. The mapping and registration module is used to perform position mapping and registration on the weighted training feature maps and calculate the feature consistency loss value. The model training module is used to iteratively update the preset classification network parameters based on the classification loss value and the feature consistency loss value until the set convergence condition is met, and then output the garbage classification model.