Methods, devices, equipment and storage media for inspecting incoming goods

By dividing the product images in the inbound channel into regions and extracting features, the problem of unstable product features under complex backgrounds was solved, and the accurate identification of product variety, specifications and color attributes was achieved, thus improving the accuracy of inbound inspection.

CN122090175AInactive Publication Date: 2026-05-26SHENZHEN YUANQI MART INTERNET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN YUANQI MART INTERNET TECH CO LTD
Filing Date
2026-04-22
Publication Date
2026-05-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing product inbound inspection technologies are unstable in representing product features in complex background environments, leading to attribute recognition errors and failing to meet the accuracy requirements of practical applications.

Method used

By dividing the product images collected in the warehousing channel into regions, extracting the joint feature representation of spatial location and channel features, identifying the product variety, specifications and color attributes, and counting the quantity of products in the same batch.

Benefits of technology

Generating stable product feature representations in complex background environments improves the accuracy of multi-attribute recognition and ensures the accuracy and efficiency of inbound inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090175A_ABST
    Figure CN122090175A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and storage medium for detecting incoming goods. The method includes: dividing product images acquired through an inbound channel into regions to obtain an image set of candidate product regions; using a joint extraction technique of spatial location and channel features to generate feature representations reflecting differences in product appearance; simultaneously identifying the product's variety, specifications, and color attributes based on these feature representations; and finally, counting the quantity of products in the same batch to generate complete inbound detection information. This method, through the joint extraction of spatial location and channel features, can generate stable product feature representations in complex background environments, improving the accuracy of multi-attribute recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, equipment, and storage medium for detecting goods entering a warehouse. Background Technology

[0002] With the rapid development of e-commerce and the retail industry, incoming goods inspection has become a crucial aspect of enterprise inventory management. Traditional incoming goods inspection mainly relies on manual visual inspection, requiring operators to check the variety, specifications, color, and other attributes of each item and manually count the quantity. This manual inspection method is not only inefficient but also prone to omissions and errors, seriously affecting the accuracy of inventory management.

[0003] Existing computer vision-based product detection technologies are easily affected by factors such as changes in lighting, shadow occlusion, and background interference in complex background environments, resulting in unstable and unromantic product feature representations. When the background environment is complex and variable, the appearance features of the product can easily be confused with background features, making it difficult for the system to accurately identify the true attributes of the product. This leads to errors in the identification of attributes such as variety, specifications, and color, failing to meet the accuracy requirements of practical applications. Summary of the Invention

[0004] The main objective of this invention is to solve the technical problem of attribute recognition errors caused by the unstable characterization of commodity features in complex background environments in existing commodity warehousing inspection technologies; This invention provides a method for detecting goods entering the warehouse, the method comprising: The product images collected in the inbound channel are divided into regions to obtain an image set containing candidate product regions; Based on the image set, the spatial location and channel features of the candidate product regions are jointly extracted to obtain product feature representations that reflect differences in product appearance; Based on the product feature representation, the variety, specifications, and color attributes of the product are identified to obtain the corresponding product attribute identification results; Based on the product attribute identification results, the quantity of products in the same batch of goods entering the warehouse is counted to obtain the inspection information of the goods entering the warehouse.

[0005] The present invention also provides a commodity receiving inspection device, the commodity receiving inspection device comprising: The region segmentation module is used to segment the product images collected in the inbound channel into regions, and obtain an image set containing candidate product regions. The feature extraction module is used to jointly extract spatial location and channel features of candidate product regions based on the image set, so as to obtain product feature representations that reflect differences in product appearance. The attribute recognition module is used to identify the variety, specifications and color attributes of the product based on the product feature representation, and obtain the corresponding product attribute recognition results; The quantity statistics module is used to count the quantity of goods in the same batch of goods entering the warehouse based on the product attribute identification results, and to obtain the inspection information of the goods entering the warehouse.

[0006] The present invention also provides a commodity receiving inspection device, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the instructions in the memory to cause the commodity receiving inspection device to perform the steps of the commodity receiving inspection method described above.

[0007] The present invention also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the steps of the above-described goods warehousing detection method.

[0008] The aforementioned method, apparatus, equipment, and storage medium for inspecting incoming goods obtain a set of candidate product regions by dividing product images acquired through the receiving channel into regions; employing a joint extraction technique of spatial location and channel features to generate feature representations reflecting differences in product appearance; simultaneously identifying the product's variety, specifications, and color attributes based on these feature representations; and finally, counting the quantity of products in the same batch to generate complete incoming goods inspection information. This method, through the joint extraction of spatial location and channel features, can generate stable product feature representations in complex background environments, improving the accuracy of multi-attribute recognition.

[0009] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of the first embodiment of the commodity warehousing detection method in this invention; Figure 2 This is a schematic diagram of the second embodiment of the commodity warehousing detection method in this invention; Figure 3 This is a schematic diagram of one embodiment of the goods receiving detection device in this invention; Figure 4This is a schematic diagram of one embodiment of the commodity warehousing inspection equipment in this invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0014] To facilitate understanding of this embodiment, a detailed description of a commodity warehousing inspection method disclosed in this embodiment of the invention will be provided first. For example... Figure 1 As shown, this method includes the following steps: 101. Perform region segmentation processing on the product images collected in the inbound channel to obtain an image set containing candidate product regions; In this embodiment, the process of dividing the product images collected in the warehousing channel into regions to obtain an image set containing candidate product regions includes: performing geometric correction and color space conversion on the product images collected in the warehousing channel to obtain a corrected image; performing differential measurement on the color and luminance components of the same pixel coordinates based on the corrected image and a preset empty field reference image; performing local statistical threshold segmentation and morphological opening and closing operations on the foreground pixels based on the differential results to obtain a cleaned foreground mask; extracting connected components and performing minimum bounding rectangle fitting based on the cleaned foreground mask to obtain a candidate bounding box set; performing non-maximum suppression and bounding box regression thinning on the candidate bounding box set to obtain a deduplicated candidate bounding box set; and performing region cropping on the deduplicated candidate product bounding boxes based on the corrected image to obtain an image set containing candidate product regions.

[0015] Specifically, the imaging unit is fixed above the inlet channel, with a field of view covering the entrance section and both side boundaries. First, the acquired raw images are calibrated and geometrically corrected: intrinsic and distortion parameters are obtained using a calibration board to complete distortion correction; the homography relationship with the channel plane is estimated based on ground or conveyor belt markings, and perspective unfolding is performed on the image to ensure a linear correspondence between pixel coordinates and the channel direction. Then, color space conversion is performed to separate luminance and chrominance; white balance and gamma correction are applied to the luminance channel, and guided filtering or bilateral filtering is used to suppress high-frequency noise while preserving edges.

[0016] A preset empty field reference image is obtained by capturing multiple frames during periods of no goods passing through, registering them, and then fusing them pixel by pixel. During the online phase, it is slowly updated in a sliding manner in low-traffic areas, and local mean normalization is performed on the current frame and the reference image to reduce overall illumination drift. When performing differential measurement, both brightness deviation and chromaticity deviation at the same pixel coordinate are considered, and a channel-level weighted synthesis is used to obtain a pixel-by-pixel differential response image.

[0017] Based on the response map, local statistical thresholding is performed to generate an initial foreground mask. To remove shot noise and broken connection boundaries, morphological opening and closing operations are performed on the mask, and small holes are repaired through connectivity analysis. Subsequently, connected components are extracted, and geometric indices such as area, aspect ratio, and fill rate are calculated. Significantly unreasonable targets are then eliminated using channel prior thresholds. The minimum bounding rectangle is fitted to the retained connected components to form a set of candidate bounding boxes.

[0018] To avoid the same product being repeatedly framed, non-maximum suppression is performed on the candidate set. Representative bounding boxes are retained based on overlap and confidence criteria, and the retained boxes are refined through regression: local gradient scanning and edge response aggregation are performed along the four sides, and the boundary positions are fine-tuned to make the boxes fit the foreground contours better. When there are regular textures in the background, texture direction consistency constraints are introduced to prevent the refinement from being attracted and shifted by the background.

[0019] After obtaining the deduplicated candidate bounding box set, region cropping is performed on the corrected image to generate a candidate product region image set. During cropping, the content proportions are maintained, and short-side alignment and edge padding are used to avoid distortion; when the bounding box exceeds the frame, mirroring or constant padding is performed. To reduce jitter between adjacent frames, temporal smoothing can be applied to the center and scale of the same target to ensure temporal continuity of the region sequence.

[0020] To address common interferences during the warehousing process, this embodiment performs a light filtering step before outputting the cut: brightness truncation is applied to highly reflective areas, and small-area highlight spots are removed; for obvious ghosting, elongated trails are separated from the connected regions based on edge direction consistency to prevent the bounding boxes from being elongated. If congestion causes multiple items to be closely packed together and the connected regions to be too large, local secondary fragmentation is triggered: gradient valleys and color dividing lines are searched within the connected regions, and a local segmentation method is used to divide them into several sub-regions; after refitting rectangles for the sub-regions, the process returns to the non-maximum suppression workflow for unified judgment.

[0021] The final output set of candidate product area images also records the mapping information between the image and the original image, including the original bounding box coordinates, perspective unfolding relationship, cropping and edge-padding parameters, so that the same coordinate reference can be directly traced back when performing physical size conversion and entrance section crossing judgment in the subsequent attribute recognition and batch counting stages.

[0022] 102. Based on the image set, perform joint extraction of spatial location and channel features of candidate product regions to obtain product feature representations that reflect differences in product appearance; In this embodiment, the candidate product region image set obtained in step 101 is used as input. First, scale normalization and geometric alignment are performed on each region to ensure that subsequent features are based on a unified reference. Then, orientation-sensitive encoding is performed on the aligned regions: separable convolution and lightweight mapping along rows and columns are used to extract spatial cues such as horizontal texture, vertical edges and packaging orientation, and they are fused into a position signal feature map to indicate the structural distribution and salient parts within the region.

[0023] Building upon this foundation, a lightweight backbone in the LEG-Net style is employed to extract semantic features, and a Ghost module is introduced to derive multiple sets of additional features from the main branch features. After concatenating the main branch and derived features along the channel dimension, positional modulation is performed based on the positional signal feature map to ensure that responses related to the product outline and label are fully expressed while background and irrelevant textures are suppressed, resulting in a lightweight channel feature map. This stage combines normalization and nonlinear mapping to stabilize the numerical range and preserve the collaborative representation of low-to-mid-level details and high-level semantics.

[0024] Subsequently, the RGS-Net approach was used to perform multi-scale fusion of lightweight channel feature maps in the neck area: first, parallel spatial convolutional branches were established by grouping by channel, and grouped spatial convolutions (GSConv) and dilated convolutions with different receptive domains were combined to capture fine-grained textures and larger-scale shapes respectively; then, cross-layer connections were used to align and aggregate features at each level, forming a bidirectional fusion from top to bottom and bottom to top. After fusion, ECA channel attention was introduced to perform lightweight calibration of channel responses, and response maps were generated using local and global spatial statistics to highlight the main product area. Finally, the fusion results were mapped, compressed, and normalized to obtain product feature representations reflecting differences in product appearance. These representations are directly used by subsequent detection heads for category determination, bounding box regression, and attribute extraction.

[0025] 103. Identify the variety, specifications, and color attributes of the goods based on the described product feature characteristics to obtain the corresponding product attribute identification results; In this embodiment, the step of identifying the variety, specifications, and color attributes of a product based on the product feature representation to obtain the corresponding product attribute identification result includes: performing classification scoring calculation and bounding box regression inference on candidate product regions based on the product feature representation to obtain instance detection results containing category scores and bounding box parameters; performing category score determination processing based on the instance detection results to obtain variety determination results for each candidate product; performing physical size conversion on the bounding boxes based on the instance detection results and calibration parameters, and performing specification matching processing according to a preset specification threshold table; simultaneously performing color histogram statistics and primary color determination processing on the corresponding candidate product regions, and combining the variety determination results to obtain the product attribute identification result.

[0026] Specifically, step 103 takes the product feature representation output in step 102 as input and completes a forward inference by decoupling the detection head. The detection head adopts an Anchor-Free approach: the classification branch directly provides the category score for each candidate product, and the localization branch outputs the four-sided offset and scale parameters of the bounding box with the center point as a reference. The localization results are first restored to the candidate region coordinates, and then the original image coordinates are traced back according to the cropping and perspective mapping relationship recorded in step 101 to obtain a set of instance candidate products with category scores and position parameters. When the candidates are dense, DIoU-NMS is performed by category to suppress overlap and avoid the same product being described repeatedly by multiple boxes; channels where the target is closer can be switched to Soft-NMS to reduce the risk of false deletion. Both are commonly used post-processing techniques for detection.

[0027] After obtaining the instance detection results, variety determination is performed first. The score of the classification branch serves as the primary criterion, with two levels of thresholds: a primary threshold and a secondary threshold. If the score exceeds the primary threshold, the variety is directly confirmed. If the score is between the two thresholds, a rapid review is triggered, comparing the consistency of adjacent categories in appearance and size priors. The appearance prior is derived from key morphological features statistically analyzed in the training set; the size prior is calculated using the following specifications. Meeting either of these criteria results in a pass; otherwise, the category is marked "pending review" and submitted to subsequent business processes. This two-level determination strategy is a standard threshold decision and prior verification method, fully transparent, and feasible for engineering implementation.

[0028] Specification matching is performed based on calibration parameters to convert pixel scale to physical scale. Instance bounding boxes are mapped to the channel plane, and the physical lengths of the long and short sides are estimated separately. To suppress biases caused by occlusion or edge blurring, edge extraction employs Sobel gradient with non-maximum suppression for edge detection, and RANSAC linear fitting is used to robustly estimate edge positions on edge segments; the median value is taken as the edge length after multi-point measurement. Subsequently, samples are archived according to a pre-defined specification threshold table: first, the corresponding specification table is selected based on the variety, then interval matching is performed primarily based on the long side and secondarily on the short side; samples falling within the buffer zone of adjacent intervals are given their final specifications based on their aspect ratio and the common shape proportions of the variety, and are marked as "fallen edge". The above calibration, mapping, and threshold table matching are all industry-standard practices, disclosed to specific stages, meeting feasibility requirements.

[0029] Color recognition is performed within the instance bounding box. To reduce background intrusion, the bounding box is first scaled inward proportionally, and non-target pixels are removed using the foreground mask obtained in step 101. For residual highlight reflections, percentile truncation and morphological opening operations are used to suppress small-area highlights. Then, pixels are converted to HSV or Lab color spaces to separate lightness and chroma. A chroma histogram is plotted, and peak search is performed to obtain candidate primary colors. When packaging multiple colors, K-means (maximum two clusters) is used to aggregate color clusters in the chroma plane, and the primary and optional secondary colors are determined according to the cluster ratio. When saturation is too low, it is classified as a neutral color such as black, white, or gray based on lightness and saturation thresholds. Finally, the primary and secondary colors are mapped to a standard color name table to form a normalized color field. The above histogram and small-scale clustering are common statistical and clustering techniques that can reliably determine colors without adding additional models.

[0030] To eliminate potential inconsistencies between multiple attributes, this embodiment performs attribute fusion and verification at the instance level. Verification rules include: whether the variety and specification match in the same table; whether the specification and the aspect ratio of the bounding box are within the allowable range for that variety; and whether the primary color belongs to the optional color set for that variety. In cases of minor conflicts, the variety is kept unchanged first, and a second-best match is selected for either specification or color. In cases of significant conflicts, an "attribute anomaly" is marked, while the original measurement and matching score are retained for traceability. This rule set is a knowledge-based constraint verification, relying on pre-defined category specification tables and color name tables.

[0031] Considering common interferences at the warehousing site, several robust handling measures are provided without altering the process boundaries. When transparent packaging causes low chromaticity, a CLAHE local contrast limiting equalization is performed before chromaticity statistics are calculated. When ghosting causes an oversized frame, edge direction consistency constraints are introduced during the boundary refinement stage to limit abnormal extension along the movement direction. For slight occlusion, specification measurements are performed using multi-location sampling and summarizing the median value. All of the above processing is completed within the current frame, without relying on cross-frame information, thus avoiding coupling with subsequent counting steps.

[0032] Finally, this embodiment outputs the product attribute recognition results according to the example: including variety label, specification level, main color and optional secondary color, position parameters of the bounding box in the original image coordinate system, category score, and quality marks such as "falling edge, pending review, attribute abnormality".

[0033] 104. Based on the product attribute identification results, the quantity of products in the same batch of goods entering the warehouse is counted to obtain the product inspection information.

[0034] In this embodiment, the step of counting the number of goods in the same inbound batch based on the product attribute identification result to obtain inbound product detection information includes: performing cross-frame association matching and trajectory update processing on the product attribute identification result to obtain an instance trajectory set with timestamps and bounding box sequences; performing entrance section crossing determination and duplicate trajectory deduplication processing on the displacement sequence of the trajectory in the inbound direction based on the instance trajectory set and the calibration parameters to obtain a unique instance list within the corresponding inbound batch; and performing group counting on the variety, specification, and color dimensions based on the unique instance list and performing structured encapsulation processing with the inbound batch identifier to obtain inbound product detection information.

[0035] Specifically, cross-frame association and trajectory updates are performed. Confidence and minimum area filtering are applied to the instance set of the current frame to obtain the observation set. Kalman filtering (constant velocity model) is used to predict the position and scale of the existing trajectory from the previous frame, resulting in predicted bounding boxes. Subsequently, the overlap between the predicted and observed boxes and the distance between their center points are used as matching thresholds. Simultaneously, the HSV primary color histogram from the shrinking region in step 103 is introduced as a lightweight appearance description. After spatial constraints are met, appearance similarity is compared to form a comprehensive cost matrix. Minimum cost matching (Hungarian algorithm) is then used to complete one-to-one association.

[0036] For successfully associated trajectories, the filter state is updated based on observations, and the current frame bounding box and timestamp are appended. For trajectories that do not match any observations, they are marked as temporarily lost and retained for a lifespan of several frames. For new observations that are not currently used, a "pending confirmation" trajectory is created, which is only converted to a "confirmed" state after a series of consecutive successful associations to avoid generating invalid trajectories due to occasional noise. Trajectory objects continuously maintain three types of information: timestamp sequences, bounding box sequences, and attribute snapshots (species, specifications, color). Attribute snapshots are recorded using majority voting or the latest stable value.

[0037] Entry section crossing determination is based on trajectory sequences. The entry section and entry direction are given by calibration parameters and can be understood as a line segment on the channel plane and its normal direction. For each "confirmed" trajectory, the displacement sequence of the trajectory center point along the entry direction is calculated in chronological order. When the center point crosses from the outside to the inside of the section, and the cumulative displacement along the entry direction exceeds a set distance, while several adjacent frames maintain the same direction, a valid crossing is determined. To resist jitter and brief pauses, a three-state determination is set: not entered, pending confirmation, and counted. Counting is triggered only after a complete transition from never entered → pending confirmation → counted, and the trajectory is marked as counted to prevent duplicate accumulation.

[0038] Duplicate trajectories are deduplicated and merged. When two trajectories highly overlap spatially, have identical attributes, and only have a brief break within adjacent time periods, trajectory merging is performed: the one with the earlier start time is retained as the main trajectory, and the bounding box and time series of the other are merged; if both trajectories have completed the crossing, only one count is retained. For cases where IDs frequently switch before and after crossing, recovery is prioritized based on temporal continuity and similarity of appearance description to ensure that only one unique instance record is generated for the same object within a batch.

[0039] After completing the crossing determination and deduplication, a unique instance list is obtained. Each record includes: a unique trajectory identifier, crossing time, displacement in the warehousing direction, final location parameters, variety, specifications, color, and a count marker. The same warehousing batch can be divided according to the batch number provided by the business side, or it can be merged according to the configured time window: within the batch window, all "counted" unique instances are grouped into that batch; a new batch is automatically started when the window is switched.

[0040] During the group counting phase, key-value tables are established based on a unique list of instances, categorized into three dimensions: variety, specification, and color. Online incremental counting is performed. When a trajectory is merged or determined to be a miscount, its key-value pair is traced back and a reverse operation is performed to maintain counting consistency. To support subsequent reconciliation and spot checks, an instance index and time-travel list for each key-value pair are retained, facilitating rapid location of the original image fragment.

[0041] To adapt to changes in occlusion and lighting in the inbound channel, the trajectory update and crossing determination include several robust strategies: during short-term occlusion, Kalman prediction is used to maintain trajectory continuity; when strong reflections near the entrance cause jitter, the matching threshold near the entrance section is reduced and the number of frames for directional consistency checks is increased to suppress misjudgments; in the event of a reversal scenario (the object enters and then exits), the "counted" mark is removed only when the cumulative displacement reverses and crosses back to the outside of the section, to avoid counting the same object twice in two batches.

[0042] The statistical results are output in a structured format as inbound product inspection information, including: batch number, time range, total number of pieces, and a count field grouped by "variety × specification × color". An anomaly list is also included, recording events such as edge-matching, attribute anomalies, trajectory merging, and cancellation, facilitating quality inspection review and subsequent error correction. To facilitate business integration, the output also includes a key screenshot index and coordinate mapping information for each unique instance, allowing direct access to the original image for verification.

[0043] In this embodiment, image sets of candidate product regions are obtained by dividing the product images collected from the warehousing channel into regions. A joint extraction technique of spatial location and channel features is used to generate feature representations reflecting differences in product appearance. Based on these feature representations, the variety, specifications, and color attributes of the products are simultaneously identified. Finally, the quantity of products in the same batch is counted to generate complete warehousing inspection information. This method, through the joint extraction of spatial location and channel features, can generate stable product feature representations in complex background environments, improving the accuracy of multi-attribute recognition.

[0044] Please see Figure 2 The second embodiment of the commodity warehousing detection method in this application includes: 201. Perform region segmentation processing on the product images collected in the inbound channel to obtain an image set containing candidate product regions; In this embodiment, step 201 is similar to step 101 in the first embodiment, and will not be described again here.

[0045] 202. Perform scale normalization and orientation-sensitive coding on the candidate product regions in the image set to obtain a position signal feature map representing the width and height position information; In this embodiment, the candidate regions from step 201 are resampled by aligning the short sides and maintaining the aspect ratio. The out-of-bounds positions are filled with reflection to avoid edge distortion. Local geometric alignment is performed based on the perspective relationship obtained in step 101 so that the candidate regions and the channel reference plane are in the same coordinates. To suppress the noise introduced by resampling and preserve the edge transition, edge-preserving guided filtering or bilateral filtering is applied.

[0046] Then, directional cues are extracted. First, Sobel gradient is used to obtain the main edge and texture direction. Then, depthwise separable convolutions are applied along the horizontal and vertical directions to form two lightweight coding branches, obtaining the horizontal and vertical responses. After one-dimensional convolutional projection and normalized compression, the two responses can represent structural cues such as packaging stripes, text direction and vertical sealing edges, providing positional guidance for subsequent feature extraction.

[0047] Next, position-guided fusion is performed. A position-enhanced attention mechanism (LEA) is employed, using position weight maps generated from the lateral and longitudinal responses to modulate the basic features positionally. This results in higher responses for contours and textures related to the product subject, while suppressing background stripes and weak textures. Layer normalization is introduced before and after modulation, along with residual connections, to maintain numerical stability while preserving fine-grained details. Finally, lightweight mapping and compression are performed on the fusion result, outputting a single-channel position signal feature map, while retaining two auxiliary response maps (lateral and longitudinal) for subsequent use. In areas with strong reflections or significant occlusion, masking updates are performed using the foreground mask formed in step 101, prioritizing the preservation of stable and reliable spatial cues.

[0048] 203. Perform parallel fusion processing of main branch convolutional projection and low-cost feature generation on the candidate commodity region based on the location signal feature map to obtain a lightweight channel feature map with position constraints; In this embodiment, the parallel fusion processing of main branch convolutional projection and low-cost feature generation on the candidate product region based on the location signal feature map to obtain a position-constrained lightweight channel feature map includes: performing position-weighted main branch convolutional projection and normalization processing on the candidate product region based on the location signal feature map to obtain a main branch feature map; performing channel-by-channel transformation and linear combination processing on the low-cost feature generation path based on the main branch feature map to obtain a low-cost feature set; and performing splicing and fusion processing along the channel dimension and position weight modulation processing on the main branch feature map and the low-cost feature set to obtain a lightweight channel feature map.

[0049] Specifically, using the location signal feature map output from step 202 and the candidate product region as input, a location-weighted main branch convolutional projection is first performed. This is done by using the location signal as spatial weights, modulating the basic features of the candidate region position by position, and then feeding them into the main branch. The main branch uses lightweight convolution and channel blending mapping concatenated, along with normalization and non-linear activation, to obtain the main branch feature map. To ensure numerical stability, normalization is inserted before and after modulation, and short connections are retained, allowing the input and projection results to be summed in the channel dimension, thus avoiding excessive weakening of weak texture details. The lightweight convolution preferentially uses depthwise separable convolution, and the channel blending uses a pointwise mapping layer; the combination of these two achieves joint encoding of spatial and channel dimensions with low computational cost.

[0050] Subsequently, a low-cost feature set is generated based on the main branch feature map. These low-cost features refer to additional features derived from the obtained main branch features through low-cost computation, used to approximate the redundant channels that would be generated by conventional convolution but incur high overhead. Specifically, lightweight operators such as depthwise separable convolution, channel-wise linear transformation, and low-rank mapping are used to generate derived features on several parallel paths. These paths share the spatial structure information of the main branch, introducing fine-grained changes only at the channel level, thereby expanding expressive power without significantly increasing the number of parameters and computational cost. This approach corresponds to the industry-standard Ghost module concept, and is reliable and reusable in engineering.

[0051] To avoid derived redundancy, the generated features are first subjected to energy screening and channel rearrangement within a small window, retaining only the components with higher contribution. When the candidate region contains a large area of ​​background, sparse gating is introduced to allow low-response channels to be naturally deweighted in subsequent fusion, thereby controlling computation and memory usage.

[0052] After derivation, the main branch feature map and the low-cost feature set are spliced ​​and fused along the channel dimension. During the fusion stage, positional modulation is performed again using positional signals to ensure that areas related to product outlines, labels, and edges maintain high responsiveness after channel expansion, while suppressing background stripes and weak textures. To reduce resource pressure caused by channel expansion, channel compression mapping is then used to restore the number of channels to a preset range, and normalization and non-linear activation are used to shape the output distribution, resulting in a lightweight channel feature map. Considering the strong reflections and local occlusions that may occur at the warehousing site, a parallel strategy of truncation and smoothing is adopted for the modulation weights. Highlight areas limit the upper bound of the weights, and weak texture areas are smoothed within a small window to reduce weight jitter.

[0053] To improve deployment feasibility, spatial convolution is preferentially implemented with depth separability to reduce the number of multiplications and additions. Channel mixing mapping and compression mapping are merged into a single pointwise operation that can be fused, facilitating operator fusion during the inference stage. Normalization and nonlinearity are arranged in a fixed order to accommodate subsequent quantization requirements. Position modulation and channel stitching are performed locally as much as possible to reduce the memory usage of intermediate tensors. For high-resolution candidate regions, block processing and boundary stitching are used, with reflection filling at the boundaries to ensure the continuity of the convolution perception.

[0054] In abnormal situations, a robust degradation strategy is adopted. If the position signal is unreliable over a large area, such as when backlighting causes texture loss, only the main branch convolution projection is used and the derivation path is reduced, skipping emphasis control and large channel expansion to avoid erroneous weights amplifying noise. If the candidate region presents dense fine stripes or grids, a local response aggregation is added in the derivation stage to merge similar channels and reduce conflicts in subsequent fusion.

[0055] 204. Based on the lightweight channel feature map, perform parallel computation and cross-layer fusion processing on the spatial convolution branches divided into preset groups, and perform channel attention calibration and spatial weighted compression on the fusion results to obtain product feature representations that reflect product appearance differences. In this embodiment, the step of performing parallel computation and cross-layer fusion processing on the spatial convolution branches divided into preset groups based on the lightweight channel feature map, and performing channel attention calibration and spatial weighted compression on the fusion result to obtain a product feature representation reflecting product appearance differences includes: performing preset group division and branch initialization processing on the channel dimensions of the lightweight channel feature map to obtain a set of spatial convolution branches composed of groups; performing parallel spatial convolution and cross-layer fusion processing on the set of spatial convolution branches to obtain a multi-scale fused feature map; and calibrating the channel attention weights based on the multi-scale fused feature map and performing normalization compression processing on the spatial weights through cross-channel statistics and spatial statistics to obtain a product feature representation reflecting product appearance differences.

[0056] Specifically, a pre-defined grouping is performed along the channel dimension, and several spatial convolution branches are initialized. Each branch uses grouped spatial convolution as its core, first performing intra-group channel blending using pointwise mapping, and then extracting spatial responses using depthwise separable convolution. Different branches have different receptive fields and strides, with fine-grained branches focusing on edges and text textures, mid-scale branches focusing on contours and borders, and large receptive field branches perceiving shapes and occlusion relationships through dilated convolution. All branches share a consistent normalization and activation order, facilitating numerical domain alignment and reducing inference jitter. This approach corresponds to the commonly used combination of grouped spatial convolution and depthwise separable convolution in engineering, enabling the coverage of multi-scale spatial patterns with relatively low computational cost.

[0057] After parallel computation, cross-layer fusion is performed. First, short connections are preserved within each branch to prevent detail decay at deeper levels. Then, bidirectional paths are established between branches, one from top to bottom and the other from bottom to top, aligning high-semantic low-resolution features with low-semantic high-resolution features before fusion, referencing common practices in feature pyramids and path aggregation. Alignment uses lightweight upsampling and downsampling, and fusion employs point-by-point mapping after concatenation to eliminate channel redundancy, resulting in a multi-scale fused feature map. To avoid introducing externally uninterpretable weights, the fusion ratio is indirectly determined by the spontaneous statistics of the current features. The linear mapping after concatenation only serves as channel shaping, facilitating subsequent quantization and operator fusion.

[0058] Then, channel attention calibration is performed. The multi-scale fused feature maps are globally averaged and converged along the space to obtain a global description of each channel. Next, a one-dimensional convolution is applied within the channel's neighborhood to establish a lightweight interaction, forming calibration coefficients for each channel, and the original channel responses are calibrated. This process is equivalent to the implementation path of a lightweight channel attention mechanism. The weights are calculated entirely from the current fused features, without relying on external priors or additional branches. It has a small number of parameters, low latency, and is suitable for edge deployment.

[0059] In the spatial weighted compression stage, average and extreme spatial maps are calculated along the channel dimension to capture stable and highly significant responses. These are then smoothed using depthwise separable convolution to suppress high-frequency noise and stripe artifacts, resulting in a spatially weighted map. This weighted map is applied to a multi-scale fusion feature map, further highlighting the response of the main product region while suppressing the background region. Subsequently, point-by-point mapping combined with normalization is used to complete channel compression, converging the feature dimensions to a preset range. This forms a product feature representation reflecting the differences in product appearance, providing a unified input for subsequent classification and localization by the detection head.

[0060] To improve feasibility, the spatial convolution of the parallel branches mentioned above is preferably implemented with depth separability. The number of branches and channel groups can be configured according to the device's computing power and throughput requirements. Upsampling and downsampling adopt a combination of fusionable interpolation and point-by-point mapping to facilitate operator fusion during the inference stage. The normalization and activation order are fixed to facilitate subsequent quantization or tuning. Cross-layer fusion and channel compression are performed locally as much as possible to reduce the occupation of intermediate tensors. For high-resolution candidate regions, block parallelism and boundary stitching are supported, and the boundaries are filled with reflection to ensure the continuity of the receptive field.

[0061] This system provides robust strategies for complex scenarios. When strong reflections or large-area occlusion cause instability in the response of branches with large receptive fields, it adaptively reduces the proportion of such branches, prioritizing fine-grained and mesoscale branches. When excessively strong striped backgrounds introduce pseudo-textures, the spatial weighted map increases smoothing intensity within a local window and limits its upper bound to avoid over-enlarging the background. When multiple items are closely packed together, leading to inconsistencies in opinions among branches at different scales, the cross-layer fusion stage prioritizes retaining the output of branches with higher positional consistency, and further corrects this in the next frame using temporal consistency. Through the continuous processing of parallel computing, cross-layer fusion, channel calibration, and spatial compression, the resulting product feature representation possesses both robust semantic description and clear spatial guidance, allowing it to be directly fed into subsequent detection heads for multi-attribute recognition.

[0062] 205. Identify the variety, specifications, and color attributes of the goods based on the described product feature characteristics to obtain the corresponding product attribute identification results; 206. Based on the product attribute identification results, the quantity of products in the same batch of goods entering the warehouse is counted to obtain the product inspection information.

[0063] In this embodiment, steps 205-206 are similar to steps 103-104 in the first embodiment, and will not be described again here.

[0064] In this embodiment, image sets of candidate product regions are obtained by dividing the product images collected from the warehousing channel into regions. A joint extraction technique of spatial location and channel features is used to generate feature representations reflecting differences in product appearance. Based on these feature representations, the variety, specifications, and color attributes of the products are simultaneously identified. Finally, the quantity of products in the same batch is counted to generate complete warehousing inspection information. This method, through the joint extraction of spatial location and channel features, can generate stable product feature representations in complex background environments, improving the accuracy of multi-attribute recognition.

[0065] The above describes the product warehousing detection method in the embodiments of the present invention. The following describes the product warehousing detection device in the embodiments of the present invention. Please refer to [link to device description] for details. Figure 3 One embodiment of the commodity warehousing detection device in this invention includes: The region division module 301 is used to perform region division processing on the commodity images collected in the inbound channel to obtain an image set containing candidate commodity regions; The feature extraction module 302 is used to jointly extract the spatial location and channel features of the candidate product regions based on the image set, so as to obtain product feature representations that reflect the differences in product appearance. The attribute recognition module 303 is used to identify the variety, specifications and color attributes of the product based on the product feature characterization, and obtain the corresponding product attribute recognition results; The quantity statistics module 304 is used to count the quantity of goods in the same batch of goods entering the warehouse based on the product attribute identification results, and to obtain the inspection information of the goods entering the warehouse.

[0066] In this embodiment of the invention, the goods warehousing detection device operates the aforementioned goods warehousing detection method. The device performs region segmentation processing on goods images collected from the warehousing channel to obtain an image set of candidate goods regions; it employs a joint extraction technique of spatial location and channel features to generate feature representations reflecting differences in goods appearance; based on these feature representations, it simultaneously identifies the variety, specifications, and color attributes of the goods; finally, it counts the quantity of goods in the same batch to generate complete warehousing detection information. This method, through the joint extraction of spatial location and channel features, can generate stable goods feature representations in complex background environments, improving the accuracy of multi-attribute recognition.

[0067] above Figure 3 The commodity warehousing detection device in this embodiment of the invention will be described in detail from the perspective of unitized functional entities. The commodity warehousing detection device in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0068] Figure 4 This is a schematic diagram of a goods receiving inspection device 400 provided in an embodiment of the present invention. The goods receiving inspection device 400 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 410 (e.g., one or more processors) and a memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) storing application programs 433 or data 432. The memory 420 and storage media 430 can be temporary or persistent storage. The program stored in the storage media 430 may include one or more units (not shown in the diagram), each unit may include a series of instruction operations on the goods receiving inspection device 400. Furthermore, the processor 410 may be configured to communicate with the storage media 430 and execute the series of instruction operations in the storage media 430 on the goods receiving inspection device 400 to implement the steps of the aforementioned goods receiving inspection method.

[0069] The goods receiving inspection device 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input / output interfaces 460, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 4The illustrated structure of the goods receiving inspection equipment does not constitute a limitation on the goods receiving inspection equipment provided by the present invention. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0070] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the goods warehousing detection method.

[0071] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for inspecting incoming goods, characterized in that, The method for inspecting goods upon warehousing includes: The product images collected in the inbound channel are divided into regions to obtain an image set containing candidate product regions; The candidate product regions in the image set are subjected to scale normalization and orientation-sensitive encoding to obtain a position signal feature map representing the width and height position information. Based on the position signal feature map, the candidate product regions are subjected to parallel fusion processing of main branch convolutional projection and low-cost feature generation to obtain a position-constrained lightweight channel feature map. Based on the lightweight channel feature map, the spatial convolutional branches divided into preset groups are subjected to parallel computation and cross-layer fusion processing. The fusion result is then subjected to channel attention calibration and spatial weighted compression to obtain a product feature representation reflecting the differences in product appearance. Based on the product feature representation, the variety, specifications, and color attributes of the product are identified to obtain the corresponding product attribute identification results; Based on the product attribute identification results, the quantity of products in the same batch of goods entering the warehouse is counted to obtain the inspection information of the goods entering the warehouse.

2. The commodity warehousing inspection method according to claim 1, characterized in that, The process of dividing the product images collected in the warehousing channel into regions to obtain an image set containing candidate product regions includes: Geometric correction and color space conversion are performed on the product images collected in the inbound channel to obtain corrected images; The color and luminance components of the same pixel coordinates are differentially measured based on the corrected image and the preset empty field reference image. Based on the difference results, the foreground pixels are subjected to local statistical threshold segmentation and morphological opening and closing operations to obtain a purified foreground mask. Based on the purified foreground mask, the connected components are extracted and fitted with the minimum bounding rectangle to obtain a set of candidate bounding boxes. The candidate bounding box set is subjected to non-maximum suppression and bounding box regression refinement to obtain a deduplicated candidate bounding box set. Based on the corrected image, the deduplicated candidate product bounding boxes are cropped to obtain an image set containing the candidate product regions.

3. The commodity warehousing inspection method according to claim 1, characterized in that, The parallel fusion process of main branch convolutional projection and low-cost feature generation on the candidate product region based on the location signal feature map to obtain a location-constrained lightweight channel feature map includes: The candidate commodity region is subjected to position-weighted main branch convolutional projection and normalization processing on the position signal feature map to obtain the main branch feature map; Based on the main branch feature map, the cheap feature generation path is transformed and linearly combined through a channel-by-channel transformation to obtain a set of cheap features. The main branch feature map and the low-cost feature set are spliced ​​and fused along the channel dimension and the position weight is modulated to obtain a lightweight channel feature map.

4. The commodity warehousing inspection method according to claim 1, characterized in that, The process of performing parallel computation and cross-layer fusion processing on spatial convolutional branches divided into preset groups based on the lightweight channel feature map, and performing channel attention calibration and spatial weighted compression on the fusion results to obtain product feature representations reflecting product appearance differences includes: The channel dimension of the lightweight channel feature map is divided into preset groups and initialized with branches to obtain a set of spatial convolutional branches composed of groups. Parallel spatial convolution and cross-layer fusion processing are performed on the spatial convolution branch set to obtain a multi-scale fused feature map; Based on the multi-scale fusion feature map, the channel attention weights are calibrated and the spatial weights are normalized and compressed through cross-channel statistics and spatial statistics to obtain a product feature representation that reflects the differences in product appearance.

5. The commodity receiving inspection method according to claim 1, characterized in that, The step of identifying the variety, specifications, and color attributes of a product based on the product feature characterization to obtain the corresponding product attribute identification results includes: Based on the product feature representation, the candidate product region is classified and scored, and bounding box regression inference is performed to obtain instance detection results containing category scores and bounding box parameters; The category score is determined based on the instance detection results to obtain the variety determination results for each candidate product; Based on the instance detection results and calibration parameters, the physical size of the bounding box is converted and the specification matching process is performed according to the preset specification threshold table. At the same time, color histogram statistics and main color determination processing are performed on the corresponding candidate product areas, and the product attribute recognition result is obtained by combining the variety determination result.

6. The method for detecting incoming goods according to claim 5, characterized in that, The step of counting the quantity of goods in the same batch of goods based on the product attribute identification results to obtain the goods inspection information includes: The product attribute recognition results are subjected to cross-frame association matching and trajectory update processing to obtain an instance trajectory set with timestamps and bounding box sequences; Based on the instance trajectory set and the calibration parameters, the displacement sequence of the trajectory in the inbound direction is subjected to entrance section crossing determination and duplicate trajectory deduplication processing to obtain a unique instance list within the corresponding inbound batch. Based on the unique instance list, the variety, specifications, and color dimensions are grouped and counted, and then structured and encapsulated with the batch identification of the goods entering the warehouse to obtain the inspection information of the goods entering the warehouse.

7. A commodity receiving inspection device, characterized in that, The goods warehousing inspection device includes: The region segmentation module is used to segment the product images collected in the inbound channel into regions, and obtain an image set containing candidate product regions. The feature extraction module performs scale normalization and orientation-sensitive encoding on candidate product regions in the image set to obtain a position signal feature map representing width and height location information. Based on the position signal feature map, the module performs parallel fusion processing of main branch convolutional projection and low-cost feature generation on the candidate product regions to obtain a position-constrained lightweight channel feature map. Based on the lightweight channel feature map, the module performs parallel computation and cross-layer fusion processing on spatial convolutional branches divided into preset groups, and performs channel attention calibration and spatial weighted compression on the fusion result to obtain product feature representations reflecting differences in product appearance. The attribute recognition module is used to identify the variety, specifications and color attributes of the product based on the product feature representation, and obtain the corresponding product attribute recognition results; The quantity statistics module is used to count the quantity of goods in the same batch of goods entering the warehouse based on the product attribute identification results, and to obtain the inspection information of the goods entering the warehouse.

8. A commodity receiving inspection device, characterized in that, The goods warehousing inspection device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the goods receiving inspection device to perform the steps of the goods receiving inspection method as described in any one of claims 1-6.

9. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the steps of the commodity warehousing detection method as described in any one of claims 1-6.