A method, system and electronic device for detecting smart retail cabinet goods
By using dual-view fusion and residual network technology, key frames of goods in smart retail vending machines are acquired, and feature extraction and regression prediction are performed. This solves the problem of low detection accuracy for small commodities and achieves efficient commodity detection results.
Patent Information
- Application Number
- CN202311639352.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-12-04
AI Technical Summary
Existing smart retail vending machine product detection technologies suffer from issues such as feature loss and low detection accuracy when detecting small items, especially static vision methods which have low space utilization and dynamic vision solutions which are easily affected by occlusion, resulting in poor consumer experience and wasted human resources.
Keyframes of video data are obtained using dual-view fusion technology. Feature extraction and regression prediction are performed through residual networks. Hand joints are used to supplement information on occluded areas. The combination of residual networks and feature pyramids improves the detection accuracy of small commodities.
It improves the accuracy and real-time performance of product detection in smart retail vending machines, solves the problem of missing features due to occlusion of small commodities, and enhances the robustness and computational efficiency of the detection model.
Smart Images

Figure CN117935103B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition, and in particular to a method, system, and electronic device for detecting goods in smart retail vending machines. Background Technology
[0002] In recent years, artificial intelligence has been widely applied in various fields in China, with vending machines becoming increasingly common in the payment sector. However, traditional vending machines, such as gravity-sensing vending machines and RFID retail vending machines, still have many drawbacks in terms of production costs, consumer experience, and equipment maintenance. Therefore, most smart retail vending machines on the market currently adopt vision solutions, mainly divided into static vision solutions and dynamic vision solutions. Static vision methods suffer from problems such as requiring a large number of cameras and low space utilization. Although dynamic vision solutions have high space utilization within the vending machine, the product images are easily affected by various obstructions during the acquisition process, resulting in low product detection accuracy. Therefore, manual review of the video is still required. This not only affects the consumer experience but also consumes a lot of human resources.
[0003] The rapid development of deep learning technology has provided new ideas and methods for the field of product detection. Currently, for product detection in smart retail vending machines, there are mainly single-stage and two-stage object detection algorithms. Single-stage object detection algorithms directly locate and classify objects based on the feature maps extracted by the backbone convolutional network, while two-stage object detection algorithms first filter the target region before locating and classifying the target. This method can filter out a large number of background candidate boxes, resulting in higher accuracy in object detection.
[0004] Existing object detectors demonstrate significant performance in detecting large items, but small items remain challenging due to their limited information and susceptibility to network oversight, especially under occlusion. Numerous studies have shown that in smart retail vending machines, the occlusion of small items leads to a loss of effective product features. Furthermore, the limited features of small items also contribute to lower detection accuracy. Summary of the Invention
[0005] The purpose of this invention is to provide a method, system, and electronic device for detecting goods in smart retail vending machines, which can improve the detection accuracy of goods in smart retail vending machines.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] A method for detecting goods in a smart retail vending machine, the method comprising:
[0008] Multiple video data of smart retail vending machine products collected simultaneously from different perspectives are acquired, and each video data is divided into multiple key frames according to the hand joints of the consumer.
[0009] By fusing and stitching together the keyframes at the same moment in each of the video data, multiple image data are obtained;
[0010] A residual network is applied to extract features from each of the image data to obtain multiple multi-scale feature maps;
[0011] Regression prediction is performed on each of the multi-scale feature maps to obtain the detection results; the detection results are the smart retail cabinet products outlined by the detection box.
[0012] Optionally, the residual network includes a residual backbone network and residual dense blocks; the backbone network is composed of multiple stacked residual units; the residual unit consists of a convolutional layer, a batch normalization layer, and a linear rectified function.
[0013] Optionally, the video data is divided into multiple keyframes based on the consumer's hand joints, specifically including:
[0014] Obtain the hand joints of the consumer; the hand joints of the consumer are five fingertip positions and nine joint positions preset from general hand joints;
[0015] Calculate the position of the center point of the consumer's hand based on the hand joint points of the consumer;
[0016] The video data is divided into multiple keyframes based on the center point position of the consumer's hand.
[0017] Optionally, the keyframes at the same moment in each of the video data are fused and stitched together to obtain multiple image data, specifically including:
[0018] The overlapping sliding window technique is used to divide the keyframes at the same time into multiple image blocks; wherein, the keyframes at the same time include a first keyframe and a second keyframe.
[0019] Based on the hand joints of the consumer, both the first keyframe and the second keyframe are divided into a detail portion and a base portion; the detail portion is the image portion that includes the hand joints of the consumer; the base portion is the image portion that does not include the hand joints of the consumer.
[0020] The image block of the detail portion is determined based on each of the image blocks and the detail portion;
[0021] The image blocks of the base portion are determined based on each of the image blocks and the base portion;
[0022] A weighted average strategy is applied to fuse the image blocks of the detail portion of the first keyframe and the second keyframe to obtain the fused detail portion image;
[0023] The fused detail image is mapped onto the first keyframe to obtain the detail image mapped to the first keyframe.
[0024] The detailed image after mapping the first key frame and the image block of the base part of the first key frame in each of the video data are stitched together to obtain multiple image data.
[0025] Optionally, before performing the step "perform regression prediction on each of the multi-scale feature maps", the detection method further includes:
[0026] Each of the multi-scale feature maps is downsampled to obtain multiple downsampled feature maps;
[0027] Each of the sampled feature maps is upsampled to obtain multiple upsampled feature maps, and the multiple multi-scale feature maps are updated based on the multiple upsampled feature maps.
[0028] A detection system for goods in smart retail vending machines, employing the aforementioned detection method for goods in smart retail vending machines, the detection system comprising:
[0029] The acquisition module is used to acquire multiple video data of smart retail cabinet products collected simultaneously from different perspectives, and to divide each video data into multiple key frames according to the hand joints of the consumer.
[0030] The stitching module is used to fuse and stitch together the key frames at the same moment in each of the video data to obtain multiple image data.
[0031] The extraction module is used to extract features from each of the image data using a residual network to obtain multiple multi-scale feature maps;
[0032] The detection module is used to perform regression prediction on each of the multi-scale feature maps to obtain the detection result; the detection result is the smart retail cabinet product outlined by the detection box.
[0033] An electronic device includes a memory and a processor, the memory storing a computer program and the processor running the computer program to enable the electronic device to perform the above-described method for detecting goods in a smart retail vending machine.
[0034] Optionally, the memory is a readable storage medium.
[0035] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0036] This invention acquires multiple video data of smart retail vending machine products simultaneously from different perspectives, divides each video data into multiple keyframes based on the consumer's hand joints, and fuses and stitches together the keyframes at the same moment in each video data to obtain multiple image data. By fusing the detailed features of small commodities from different perspectives, the problem of missing feature information of occluded small commodities under single-view conditions is solved, improving the accuracy of commodity detection. At the same time, a residual network is applied to extract features from each image data to obtain multiple multi-scale feature maps, and regression prediction is performed on each multi-scale feature map to obtain the detection result. This reduces the amount of network parameter calculation and improves real-time performance compared with previous technologies. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a schematic diagram of the visual cabinet provided by the present invention;
[0039] Figure 2 A schematic diagram of the process for detecting occlusion in small retail commodities based on dual-view fusion provided by the present invention;
[0040] Figure 3 A schematic diagram of the dual-view fusion method provided by the present invention;
[0041] Figure 4 A partial view of the container from a dual-view perspective provided for this invention;
[0042] Figure 5 The image shows the detection results provided by this invention. Detailed Implementation
[0043] The technical solutions of the embodiments 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, and 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.
[0044] The purpose of this invention is to provide a method, system, and electronic device for detecting goods in smart retail vending machines, which can improve the detection accuracy of goods in smart retail vending machines.
[0045] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] Example 1
[0047] like Figures 1-5 As shown, the present invention provides a method for detecting goods in smart retail vending machines, the method comprising:
[0048] Step S1: Acquire multiple video data of smart retail vending machine products collected simultaneously from different perspectives, and divide each video data into multiple keyframes according to the hand joints of the consumer.
[0049] In practical applications, two cameras with different shooting angles are placed inside the smart retail vending machine, and the images captured by the two cameras overlap. Keyframes are obtained from the videos captured by the two cameras using hand joint points, and image information is obtained by matching the keyframes from different perspectives at the same moment.
[0050] Specifically, a hand joint detection algorithm is used to match video frames, obtain keyframes, and acquire information on 21 hand joints of the consumer. These 21 hand joints are then used to locate the product area, and the hand center point position is calculated to track and match product information to obtain local information of the product image.
[0051] S1 specifically includes:
[0052] Step S11: Obtain the hand joints of the consumer; the hand joints of the consumer are five fingertip positions and nine joint positions preset from the general hand joints.
[0053] Step S12: Calculate the position of the center point of the consumer's hand based on the hand joint points of the consumer.
[0054] Step S13: Divide each video data into multiple keyframes according to the center point position of the consumer's hand.
[0055] Furthermore, keyframes are obtained through hand joints. Due to occlusion, dual-view feature fusion is used to aggregate the features of keyframes from different perspectives at the same time, supplementing the information features of the occluded areas and obtaining a more complete fused image. A residual network is then used to extract features from the fused image. For small commodities with limited features, a feature pyramid is used to generate multi-layered semantic information about the commodity. Feature pyramids are a commonly used technique in computer vision to process feature information of different sizes. In small commodity detection tasks, the application of feature pyramids can improve the model's ability to detect commodities of different sizes. The generation of feature pyramids typically involves constructing a multi-dimensional image pyramid from the image input and then extracting corresponding features in each dimension. These features capture different levels of information in different dimensions, which helps improve the robustness of the detection model. The following is a further explanation of the specific application of feature pyramids in small commodity detection: Multi-dimensional information capture: By constructing dimensional representations in different dimensions, the model can simultaneously focus on dimensional representations of different sizes. This is crucial for the detection of small commodities, as they may differ due to variations in the dimensional representations. Robustness Enhancement: Since small commodities typically have limited features, feature pyramids can compensate for this deficiency. Multi-dimensional information allows the model to understand image content more comprehensively, thereby improving the robustness of small commodity detection. Region Regression Support: The multi-dimensional graphs generated by feature pyramids are very helpful for subsequent region regression. By utilizing feature information generated at different dimensions at the end, the model can more accurately determine the location of small commodities and generate precise detection boxes. Therefore, the application of feature pyramids in small commodity detection tasks is a key technology that helps improve model performance and robustness.
[0056] Finally, detection boxes for small commodities are generated based on region regression to achieve the task of detecting small commodities.
[0057] in:
[0058] The hand joints include 21 joints. The position information of the hand joints at time i is expressed by the following formula:
[0059]
[0060]
[0061] in, Let be the x-axis coordinate of the hand joint at time i. Let be the y-axis coordinate of the hand joint at time i.
[0062] To reduce computational load, this invention selects the fingertip. Information and key points The information includes the fingertip coordinates and joint coordinates, which are the x-axis and y-axis coordinates of 14 representative joints selected from 21 joints, including the coordinates of 5 fingertips and 9 joints.
[0063] To achieve product area positioning, this invention calculates the hand center point position using the selected joint points mentioned above, and defines... The maximum value on the x-axis among the joints. The maximum value on the y-axis of the joint. The minimum value on the x-axis of the joint. This is the minimum value on the y-axis of the joint.
[0064] The center point can be determined from the coordinate values above, and the formula is described as follows:
[0065]
[0066]
[0067] in, Let the center point of the hand be on the x-axis. The y-axis represents the center point of the hand. Joint information will be discussed in detail in the subsequent sections on product feature extraction and product regression.
[0068] Because the input video frames contain a large number of redundant images, performing feature analysis on all images not only increases the computational load but also significantly reduces efficiency. Therefore, this invention solves the video frame redundancy problem by selecting keyframes for feature analysis. Since the input video frames contain non-key image frames, hand joints are introduced to obtain video keyframes. A hand joint detection algorithm is used to detect hand joints in video frames from different viewpoints. This invention uses the video frames with detected hand joints as keyframes. Hand position accuracy: Through the hand joint detection algorithm, the keyframes can accurately capture the hand's position in the video. This ensures that the selected frames represent the accurate position of the hand throughout the entire video sequence, not just at a specific moment. Multi-view perspective improvement: If the video involves different viewpoints or camera changes, the selection of keyframes can take this into account, ensuring hand information from different camera angles and the robustness of the algorithm. Image estimation and quality: Since the hand joint detection algorithm may be sensitive to image quality, the selected keyframes may prefer frames with higher image estimation and lower noise to ensure accurate joint detection. To facilitate subsequent dual-view feature fusion, video keyframes from different viewpoints at the same time are matched.
[0069] Step S2: Fuse and stitch together the keyframes at the same time in each of the video data to obtain multiple image data. In practical applications, the images captured by the camera are fused from two perspectives to supplement the information features of occluded areas. The input image is divided into many image blocks using overlapping sliding window technology, and then cleaned and returned to the source matrix. This process involves image fusion, sliding window technology, and the separation and fusion of details and basic parts. The detailed steps are as follows: 1. Dual-view image fusion: The images captured by the camera are fused from two perspectives, which can be done using stereo symmetry or other fusion techniques. This helps to improve the stereoscopic effect of the image, and at the same time, fusion can compensate for the information loss caused by symmetry. 2. Image block division: The fused images are divided into multiple image blocks using the image overlapping sliding window technology. The size and stride of the sliding window can be adjusted according to specific needs to achieve more efficient block division results. 3. Rearrange to source matrix: The image blocks are rearranged into the source matrix, where each column of the matrix corresponds to one image block. This arrangement facilitates subsequent processing of each image block. 4. Separating the base and detail parts of the image block: Segment each column of the source matrix (i.e., each image block) to obtain the base and detail parts. This can be achieved through image processing methods such as wavelet transform and Laplacian pyramid techniques. 5. Fusing the base and detail parts: For each image block, fuse its base and detail parts. This fusion process may include techniques such as weighted summation and image interpolation to preserve detail information and obtain a clearer image. 6. Stitching to generate the aggregated image: Re-stitch all the fused image blocks together to obtain the aggregated image. This image stitching process needs to ensure that overlapping areas between image blocks are handled reasonably, and that the image does not appear unnatural or broken. 7. Generating the final feature fusion: Through the above steps, a relatively complete fused feature image can be obtained. This feature combines dual-view information, information supplemented from occluded areas, and the fusion of detail and base parts of the image blocks. Regarding the specific definition of the source matrix, it usually refers to the original image matrix, i.e., the image matrix after orthogonal matrix fusion. In this process, the source matrix is segmented, dispersed, and fused to form the final aggregated feature. The source matrix is the foundational data for the entire processing flow.
[0070] Each column of the matrix corresponds to an image patch. The image patch is divided into a base part and a detail part. After obtaining the detail part and the base part, these two parts need to be fused and stitched together to generate an aggregated image. Finally, a relatively complete fused feature can be obtained.
[0071] Specifically, (1) the dual-view perspective includes two images, I1 and I2, with image I1 being the main part and image I2 serving as supplementary detailed information to image I1. The detailed part utilizes hand joint information. This process acquires local information from dual-view images, including detailed information about the product area. This detailed information is generated from L and the input image I. The physical meaning of L: L contains local information guided by hand joints, which helps extract local features of the product area. Guided by the hand joint information, L makes the details extracted from the image more concentrated in the key hand areas, enhancing the local details of the product area. I represents the entire input image and can include information from multiple viewpoints or cameras. When generating the detailed part L, information in I, especially information related to hand joints, may be used to obtain local product area details. The physical meaning of I is closely related to the specific requirements of the task and the image characteristics; it is the final input to the entire image processing process.
[0072] (2) The features obtained from (1) are fused together, and a weighted average strategy is used for each pair of details.
[0073] S2 specifically includes:
[0074] Step S21: Apply the overlapping sliding window technique to divide each keyframe at the same time into multiple image blocks; wherein, each keyframe at the same time includes a first keyframe and a second keyframe.
[0075] Step S22: Based on the hand joints of the consumer, divide both the first keyframe and the second keyframe into a detail portion and a base portion; the detail portion is the image portion including the hand joints of the consumer; the base portion is the image portion excluding the hand joints of the consumer.
[0076] Step S23: Determine the image block of the detail portion based on each of the image blocks and the detail portion.
[0077] Step S24: Determine the image block of the base part based on each of the image blocks and the base part.
[0078] Step S25: Apply a weighted average strategy to fuse the image blocks of the detail portion of the first keyframe and the second keyframe to obtain the fused detail portion image.
[0079] Step S26: The fused detail image is mapped onto the first keyframe to obtain the detail image mapped from the first keyframe.
[0080] Step S27: In each of the video data, the detailed image after mapping the first key frame and the image block of the base part of the first key frame are stitched together to obtain multiple image data.
[0081] Furthermore, the dual-view fusion, for images input at the same time from different viewpoints, involves fusing dual-viewpoint features. For two given input images I1 and I2 (viewpoint 1 and viewpoint 2), the fusion algorithm uses viewpoint 1 image I1 as the main part and input viewpoint 2 image I2 as supplementary information about the occlusion portion of the product in image I1. First, the input images I1 and I2 are divided into many image blocks using an overlapping sliding window technique, with an n×n sliding window size. These image blocks are then cleaned and added to the source matrix. Each column of this matrix corresponds to an image block. In this invention, the image blocks are divided into a base part and a detail part, where the detail part utilizes hand joint information. We obtain local information from images I1 and I2, which includes detailed information about the product area. The formula is expressed as follows:
[0082]
[0083] The detailed parts are generated from L and the input image I. Here, L1 and L2 are the learned feature matrices, R(·) is the reconstructed detail operator, and I... d1 I d2 This refers to the feature information of the reconstructed detailed parts. d1 and V d2 Physical meaning of V d1 and V d2 It's a feature hint: In this context, V d1 and V d2 Feature processing to represent specific details of an image. These processes are used to express local information in the image related to the product area. L1 and L2 acquisition: L1 and L2 are learned feature matrices: L1 and L2 are represented by feature matrices learned from the input data. Guidance on hand joint information: L1 and L2 include image extraction or feature generation of regions near hand joints to highlight local information related to hand joints.
[0084] Formula representation: I d1 =R(V d1 ), I d2 =R(V d2 These two equations are represented by a certain reconstruction function for V. d1 and V d2 Perform mapping to obtain V d1 and V d2 This refers to the reconstructed detailed feature information. The purpose of this reconstruction function is either to restore the local details of the image from the acquired features. Overall, V d1 V d2Both L1 and L2 are used to represent or feature information about details in an image. These features can be learned through deep learning networks to ensure effective capture of details in the target area of the product.
[0085] The basic part consists of the feature information of the remaining part of viewpoint 1. The formula is described as follows:
[0086]
[0087] The basic part is achieved by subtracting the detail image I from the input image I1. d1 The obtained, of which I b This refers to the basic feature information after reconstruction. In restoring V... d1 V d2 V b In this invention, an averaging strategy is used to handle overlapping pixels. First, the overlapping pixel value at each corresponding location is calculated. Next, for each location in the recovered image, the average pixel value is calculated.
[0088] After obtaining the detailed and basic parts, these two parts need to be merged. That is, the detailed parts from the two perspectives are merged, and then they are stitched together with the basic part to generate the aggregated image.
[0089] First, the details contain information about the product's structure, outline, and texture. Therefore, for each pair of details, this invention uses a weighted average strategy to fuse these features. The formula is expressed as follows:
[0090] ω d1 =I d1 ,ω d2 =I d2 ;
[0091] I F =I d1 ω d1 +I d2 ω d2 ;
[0092] Where, ω d1 ω d2 For the weight of the details, I F Features are the result of integrating the details.
[0093] Then, because the base part of the input image contains more common features, redundancy, and brightness information, to avoid unnecessary calculations, the fused detail features are directly mapped to viewpoint 1. The detail part and the base part are then stitched together to obtain the desired fused image F. W×H×3CSpecifically, the base part also uses a weighted average strategy for fusion. Simultaneously, the mapped detail features and the base part corresponding to angle 1 are stitched together to generate the required fused image.
[0094] Step S3: Apply a residual network to extract features from each of the image data to obtain multiple multi-scale feature maps. Specifically, the residual network includes a residual backbone network and residual dense blocks; the backbone network is composed of multiple stacked residual units; the residual unit consists of convolutional layers, batch normalization layers, and linear rectified functions.
[0095] In practical applications, to address the product occlusion problem during feature extraction, this invention employs a dual-view feature fusion method to integrate features from different perspectives, generating more effective information to compensate for feature loss caused by occlusion. Simultaneously, a residual network is used for feature extraction. This residual network not only solves the gradient vanishing and network degradation problems caused by network deepening but also improves network performance. Regarding convolutional layers, the characteristics of "local connectivity" and "parameter sharing" significantly reduce network parameters, ensuring network sparsity while preventing overfitting.
[0096] The residual network is used to extract features from the feature map, and the extracted feature map is upsampled to obtain a multi-scale feature map containing rich information.
[0097] Specifically, (1) the residual network is used to effectively extract features from the goods. The residual network consists of a residual backbone network and residual dense blocks. In the backbone network, a 3*3 convolutional kernel is used to extract features from the feature map to obtain the feature map. The residual network is composed of multiple residual units stacked together. The residual unit consists of convolutional layers, batch normalization (BN) layers and rectified linear units (ReLU).
[0098] (2) The residual dense blocks in (1) are merged into each branch to obtain a dense feature map.
[0099] (3) Add the input feature map and the dense feature map to obtain the multi-scale feature map.
[0100] Furthermore, in the feature extraction using a residual network, the present invention fuses the dual-view feature maps F... W×H×3C The data is fed into the three channels of the residual network for effective product feature extraction. The network is divided into two parts: the residual backbone network and the residual dense blocks. In the backbone network, 3×3 convolutional kernels are used to extract features from the feature maps, yielding F1,…,F1 values. i ,…,F nFeature map, expressed by the formula as follows:
[0101] F i =H Conv (F i-1 );
[0102] Among them, H Conv (·) consists of three parts: a 3×3 convolutional layer, a batch normalization layer (BN), and a ReLU function.
[0103] To address the issue of insufficient utilization of intermediate layer features in the residual network, this invention incorporates residual dense blocks in the middle of the residual network. To avoid the loss of significant features of small commodities during extraction, a 1×1 convolutional kernel is used, with skip connections between each residual block for local adaptive feature extraction and fusion. The residual dense blocks are fused together in each branch to obtain a dense feature map, the formula of which is described as follows:
[0104] Among them, H Concat (·) indicates feature fusion, H Conv,1×1 (·) consists of a 1×1 convolutional layer, a BN layer, and a ReLU nonlinear layer.
[0105] Output feature map F k+2 From the input feature map F k and dense feature map F k+1 The result is obtained by adding them together. The formula is expressed as follows: F k+2 =F k +F k+1 .
[0106] Preferably, a residual network is used for feature extraction. The residual network consists of multiple stacked residual units, each composed of convolutional layers, batch normalization (BN) layers, and rectified linear units (ReLU). Because small commodities have relatively few features, this invention uses dense residual blocks for feature extraction. During feature extraction, local features complement each other, reducing the number of network parameters through parameter sharing. A skip connection is added between each residual unit and the next, fusing the output features of different residual units. The skip connections in the residual blocks help maintain the norm of the gradient and ensure stable backpropagation.
[0107] Step S4: Perform regression prediction on each of the multi-scale feature maps to obtain the detection results; the detection results are the smart retail cabinet products outlined by the detection box.
[0108] In practical applications, the obtained multi-scale feature maps are used for regression prediction to generate product detection boxes to achieve product detection.
[0109] Specifically, (1) the network is trained using three loss functions, and the target product size is regressed using the obtained product center point. In (1), the regressed product width and height are... The hyperparameters λ1, λ2, and λ3 are used to control the actual width and height of the small commodities. (2) The accurate detection box is regressed to achieve the detection task of the small commodities.
[0110] Before performing step S4, the detection method further includes:
[0111] The multi-scale feature maps are downsampled to obtain multiple downsampled feature maps.
[0112] Each of the sampled feature maps is upsampled to obtain multiple upsampled feature maps, and the multiple multi-scale feature maps are updated based on the multiple upsampled feature maps.
[0113] Furthermore, the regression prediction process involves downsampling the extracted feature maps to obtain multi-scale feature maps G1, G2, G3, and G4. Upsampling and fusing these feature maps at different scales yields S1, S2, S3, and S4, which fully utilizes different contextual regions to obtain global information, including high-level semantic information and shallow location information. The region proposal network adaptively generates feature maps of candidate regions, which are then fed into subsequent networks.
[0114] The product detection process involves generating product detection boxes, for which the RPN network provides region suggestions. Because small products are often occluded and have relatively few features, missed detections are common during the box regression process. This invention proposes a novel loss function for network training. This loss function consists of three parts. The first part is a regression loss function. Since product shapes vary greatly, this significantly impacts the regression of product detection boxes. To address this issue, an IOU factor is introduced. It can optimize positioning accuracy and effectively regress the product detection box. The formula is expressed as follows:
[0115]
[0116] Where K1 smoothing loss is used, N is the number of regression boxes, and IOU represents the overlap between the predicted and ground truth boxes. L1(x) is the smoothing loss for x; L reg For the regression loss of the IOU factor, L1(v') kj ,v kj ) represents the degree of overlap between the predicted bounding box and the ground truth bounding box.
[0117] Based on the already obtained commodity center point Regression was performed on the target product's dimension c, and the regressed product width and height were obtained. The second part is the product width and height loss function, which measures the loss in product width and height. Its formula is described as follows:
[0118]
[0119] in, The actual width and height of the small commodity.
[0120] The classification loss function, which is composed of the cross-entropy function, is expressed as follows:
[0121]
[0122] in, For the learned weights, b j For bias terms, This is a bias term.
[0123] The overall loss function is defined as follows:
[0124] L total =λ1L reg +λ2L h,w +λ3L cls +c;
[0125] The hyperparameters λ1, λ2, and λ3 control the trade-offs. Through the constraints of the loss function, an accurate detection box is regressed, thus achieving the task of detecting small commodities.
[0126] This invention discloses a method for detecting occluded retail commodities. It utilizes dual cameras to capture video and combines hand joint points to obtain keyframes. By fusing the detailed features of the commodities from these two perspectives, it solves the problem of missing feature information of occluded commodities under single-view conditions, thereby improving the accuracy of commodity detection. At the same time, when performing feature extraction in the residual network, residual dense blocks are added to alleviate the gradient vanishing problem. Furthermore, by sharing weights among networks, the computational load of network parameters is reduced, resulting in improved real-time performance compared to previous technologies.
[0127] Compared with the prior art, the positive technical effects achieved by the present invention are as follows:
[0128] 1. A shopping dataset for unmanned retail scenarios was established.
[0129] 2. A framework for a small commodity detection model was designed. Dual-view fusion was used to supplement the information features of the occluded areas, thereby obtaining more complete fused features and multi-scale feature maps containing rich information, which improved the accuracy of small commodity detection.
[0130] Example 2
[0131] To implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a detection system for goods in smart retail vending machines is provided below. The detection system includes:
[0132] The acquisition module is used to acquire multiple video data of smart retail vending machine products collected simultaneously from different perspectives, and to divide each video data into multiple key frames according to the hand joints of the consumer.
[0133] The stitching module is used to fuse and stitch together the key frames at the same moment in each of the video data to obtain multiple image data.
[0134] The extraction module is used to extract features from each of the image data using a residual network to obtain multiple multi-scale feature maps.
[0135] The detection module is used to perform regression prediction on each of the multi-scale feature maps to obtain the detection result; the detection result is the smart retail cabinet product outlined by the detection box.
[0136] Example 3
[0137] This invention provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the detection method for goods in a smart retail vending machine according to Embodiment 1.
[0138] Alternatively, the aforementioned electronic device may be a server.
[0139] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for detecting goods in a smart retail vending machine as described in Embodiment 1.
[0140] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0141] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for detecting goods in smart retail vending machines, characterized in that, The detection method includes: Acquire multiple video data points of smart retail vending machine products simultaneously from different perspectives, and divide each video data point into multiple keyframes based on the consumer's hand joint points, specifically including: Obtain the hand joints of the consumer; the hand joints of the consumer are five fingertip positions and nine joint positions preset from general hand joints; Calculate the position of the center point of the consumer's hand based on the hand joint points of the consumer; The video data is divided into multiple keyframes based on the position of the center point of the consumer's hand; By fusing and stitching together the keyframes at the same moment in each of the video data, multiple image data are obtained; A residual network is applied to extract features from each of the image data to obtain multiple multi-scale feature maps; Regression prediction is performed on each of the multi-scale feature maps to obtain the detection results; the detection results are the smart retail cabinet products outlined by the detection box.
2. The method for detecting goods in a smart retail vending machine according to claim 1, characterized in that, The residual network includes a residual backbone network and residual dense blocks; the backbone network is composed of multiple residual units stacked together; the residual unit consists of a convolutional layer, a batch normalization layer, and a linear rectified function.
3. The method for detecting goods in a smart retail vending machine according to claim 1, characterized in that, By fusing and stitching together the keyframes from the same moment in each of the video data, multiple image data are obtained, specifically including: The overlapping sliding window technique is used to divide the keyframes at the same time into multiple image blocks; wherein, the keyframes at the same time include a first keyframe and a second keyframe. Based on the hand joints of the consumer, both the first keyframe and the second keyframe are divided into a detail portion and a base portion; the detail portion is the image portion that includes the hand joints of the consumer; the base portion is the image portion that does not include the hand joints of the consumer. The image block of the detail portion is determined based on each of the image blocks and the detail portion; The image blocks of the base portion are determined based on each of the image blocks and the base portion; A weighted average strategy is applied to fuse the image blocks of the detail portion of the first keyframe and the second keyframe to obtain the fused detail portion image; The fused detail image is mapped onto the first keyframe to obtain the detail image mapped to the first keyframe. The detailed image after mapping the first key frame and the image block of the base part of the first key frame in each of the video data are stitched together to obtain multiple image data.
4. The method for detecting goods in a smart retail vending machine according to claim 1, characterized in that, Before performing the step "perform regression prediction on each of the multi-scale feature maps", the detection method further includes: Each of the multi-scale feature maps is downsampled to obtain multiple downsampled feature maps; Each of the sampled feature maps is upsampled to obtain multiple upsampled feature maps, and the multiple multi-scale feature maps are updated based on the multiple upsampled feature maps.
5. A detection system for goods in smart retail vending machines, characterized in that, The detection system includes: The acquisition module is used to acquire multiple video data of smart retail vending machine products simultaneously captured from different perspectives, and to divide each video data into multiple keyframes based on the consumer's hand joint points, specifically including: Obtain the hand joints of the consumer; the hand joints of the consumer are five fingertip positions and nine joint positions preset from general hand joints; Calculate the position of the center point of the consumer's hand based on the hand joint points of the consumer; The video data is divided into multiple keyframes based on the position of the center point of the consumer's hand; The stitching module is used to fuse and stitch together the key frames at the same moment in each of the video data to obtain multiple image data. The extraction module is used to extract features from each of the image data using a residual network to obtain multiple multi-scale feature maps; The detection module is used to perform regression prediction on each of the multi-scale feature maps to obtain the detection result; the detection result is the smart retail cabinet product outlined by the detection box.
6. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the detection method for goods in a smart retail vending machine according to any one of claims 1 to 4.
7. An electronic device according to claim 6, characterized in that, The memory is a readable storage medium.
Citation Information
Patent Citations
Composite group image
US20200320673A1
Deep learning based fingerprint minutiae extraction
US20230119918A1
