Out-of-stock ratio determination method, device and equipment and readable storage medium

The product status image is detected through the target segmentation model, the out-of-stock segmentation outline and target detection area are determined, and the out-of-stock ratio is calculated, which solves the problem of low efficiency in determining the out-of-stock ratio in the existing technology and achieves more efficient and accurate inventory management.

CN119359225APending Publication Date: 2025-01-24SUZHOU WANDIANZHANG NETWORK TECH CO LTD

Patent Information

Application Number
CN202411935063.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The efficiency of determining the stock ratio in the prior art is inefficient and cannot effectively meet the retail industry's demand for inventory management and customer needs.

Method used

Use the target segmentation model to detect the product status image, obtain the out-of-stock segmentation outline, and determine the target detection area corresponding to each out-of-stock segmentation outline. Calculate the out-of-stock ratio by calculating the total out-of-stock segmentation area and the area of ​​the target detection area.

Benefits of technology

It realizes intelligent calculation of out-of-stock ratios, improves the efficiency and accuracy of determining out-of-stock ratios, and helps retailers manage inventory more effectively and meet customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359225A_ABST
    Figure CN119359225A_ABST
Patent Text Reader

Abstract

The invention discloses an out-of-stock ratio determination method, device and equipment and a readable storage medium, which are applied to the technical field of machine learning, and the method comprises the steps: carrying out the detection of a commodity state image through a target segmentation model, and obtaining an out-of-stock segmentation contour; determining a target detection area corresponding to each stockout segmentation contour; each stockout segmentation contour corresponds to one target detection area; determining a total stockout segmentation area based on all stockout segmentation contours corresponding to the target detection area; and determining a stockout proportion based on the total stockout segmentation area and the area of the target detection area. Compared with a current manual out-of-stock proportion determination method, the out-of-stock segmentation contours are determined by using the target segmentation model, and the target detection region corresponding to each out-of-stock segmentation contour is determined, so that the out-of-stock proportion of the current detection region is directly obtained based on the area of the out-of-stock segmentation contour in the current target detection region and the area of the target detection region; the out-of-stock ratio intelligence is realized, and the out-of-stock ratio determination efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning technology, and in particular to a method, device, equipment, and readable storage medium for determining a stock-out ratio. Background Art

[0002] In the retail industry, maintaining appropriate inventory levels and ensuring product availability is crucial for sales performance and customer satisfaction. Calculating the out-of-stock percentage of displayed items helps retailers understand how they are managing inventory and meeting customer demand. A stock-out occurs when a customer visits a store to purchase a specific item, but that item is out of stock. This can lead to customer churn, lost sales, and damaged reputation. Currently, manual calculations are used to determine the out-of-stock percentage, resulting in low efficiency and accuracy.

[0003] How to improve the efficiency of determining the out-of-stock ratio is a technical problem that those skilled in the art urgently need to solve. Summary of the Invention

[0004] In view of this, the object of the present invention is to provide a method, device, equipment and readable storage medium for determining out-of-stock ratio, which solves the technical problem of low efficiency in determining out-of-stock ratio in the prior art.

[0005] To solve the above technical problems, the present invention provides a method for determining a stock-out ratio, comprising:

[0006] Use the target segmentation model to detect the product status image and obtain the out-of-stock segmentation contour;

[0007] Determine the target detection area corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection area;

[0008] Determine a total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area;

[0009] A stock-out ratio is determined based on the total stock-out segmented area and the area of ​​the target detection area.

[0010] Optionally, determining the target detection area corresponding to each out-of-stock segmentation contour includes:

[0011] Determine the centroid of each out-of-stock segmentation contour;

[0012] Determine whether the centroid of the current out-of-stock segmentation contour is located in the target detection area;

[0013] If the centroid of the current out-of-stock segmentation contour is located in the target detection area, determining that the current out-of-stock segmentation contour belongs to the target detection area;

[0014] If the centroid of the current out-of-stock segmentation contour is not located in the target detection area, it is determined that the current out-of-stock segmentation contour does not belong to the target detection area.

[0015] Optionally, detecting the commodity status image using the target segmentation model to obtain the out-of-stock segmentation contour includes:

[0016] The target segmentation model is used to detect the real-time commodity status image in the video stream to obtain the out-of-stock segmentation contour.

[0017] Optionally, after determining the out-of-stock ratio based on the total out-of-stock segmented area and the area of ​​the target detection area, the method further includes:

[0018] Comparing each of the out-of-stock ratios with a set out-of-stock ratio threshold, filtering the out-of-stock ratios, and obtaining a target out-of-stock ratio;

[0019] An out-of-stock status is determined based on the target out-of-stock ratio.

[0020] Optionally, determining the out-of-stock status based on the target out-of-stock ratio includes:

[0021] Based on the target out-of-stock segmentation outline corresponding to the target out-of-stock ratio, determining a circumscribed rectangular frame corresponding to the target out-of-stock segmentation outline;

[0022] The circumscribed rectangular frame is used as a display image, and out-of-stock categories are marked on the display image to obtain a target display image;

[0023] An out-of-stock status is determined based on the target display image.

[0024] Optionally, determining the out-of-stock status based on the target out-of-stock ratio includes:

[0025] Determine the out-of-stock area corresponding to the target out-of-stock ratio;

[0026] A machine learning model is used to determine the out-of-stock products corresponding to the out-of-stock area and the out-of-stock quantity corresponding to each out-of-stock product; wherein the out-of-stock status includes the out-of-stock products and the out-of-stock quantity corresponding to each out-of-stock product.

[0027] Optionally, before using the target segmentation model to detect the product status image and obtain the out-of-stock segmentation contour, the method further includes:

[0028] Obtaining an initial instance segmentation model and a training dataset; wherein the training dataset is a dataset including product images, segmentation outlines, and out-of-stock categories;

[0029] The initial instance segmentation model is trained using the training dataset based on transfer learning to obtain the target segmentation model.

[0030] The present application also provides a device for determining a stock-out ratio, comprising:

[0031] The out-of-stock segmentation contour determination module is used to detect the product status image using the target segmentation model to obtain the out-of-stock segmentation contour;

[0032] A target detection region determination module is used to determine the target detection region corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection region;

[0033] a total out-of-stock segmentation area determination module, configured to determine the total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area;

[0034] The out-of-stock ratio determination module is configured to determine the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area.

[0035] The present application also provides a device for determining a stock-out ratio, comprising:

[0036] memory for storing computer programs;

[0037] A processor is used to execute the computer program to implement the steps of the out-of-stock ratio determination method as described above.

[0038] The present application also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned out-of-stock ratio determination method are implemented.

[0039] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned out-of-stock ratio determination method.

[0040] It can be seen that the present invention detects the commodity status image by using the target segmentation model to obtain the out-of-stock segmentation contour; determines the target detection area corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection area; based on all the out-of-stock segmentation contours corresponding to the target detection area, determines the total out-of-stock segmentation area; and determines the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area. Compared with the current manual determination of the out-of-stock ratio, the present application determines the out-of-stock segmentation contour by using the target segmentation model, determines the target detection area corresponding to each out-of-stock segmentation contour, and thus directly obtains the out-of-stock ratio of the current detection area based on the area corresponding to the out-of-stock segmentation contour in the current target detection area and the area of ​​the target detection area, thereby realizing the intelligentization of the out-of-stock ratio and improving the efficiency of determining the out-of-stock ratio.

[0041] In addition, the present invention also provides a device, equipment and readable storage medium for determining out-of-stock ratio, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A flowchart of a method for determining a stock-out ratio provided by an embodiment of the present invention;

[0044] Figure 2 An example diagram of a process for training an object segmentation model provided by an embodiment of the present invention;

[0045] Figure 3 A flowchart illustrating a method for determining a stock-out ratio according to an embodiment of the present invention;

[0046] Figure 4 A schematic structural diagram of a device for determining a stock-out ratio according to an embodiment of the present invention;

[0047] Figure 5 A schematic structural diagram of a device for determining a stock-out ratio provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0049] Please refer to Figure 1 , Figure 1 This is a flow chart of a method for determining a stock-out ratio provided by an embodiment of the present invention. The method may include:

[0050] S101, using the target segmentation model to detect the product status image and obtain the out-of-stock segmentation contour.

[0051] The execution entity of this embodiment is an electronic device. The electronic device in this embodiment can be a computer, mobile phone, etc. This embodiment does not limit the specific product status image. For example, the product status image in this embodiment can be an image in a video stream; or the product status image in this embodiment can be the latest image. This embodiment does not limit the specific object segmentation model. The object segmentation model in this embodiment is a segmentation model that can be trained by transfer learning from an instance segmentation model. The object segmentation model can be flexibly selected based on the actual scenario. Mask-based instance segmentation includes the R-CNN (deep learning-based object detection algorithm) series. Mask R-CNN (deep learning-based instance segmentation algorithm) is a landmark method in the field of instance segmentation. It extends the Faster R-CNN object detection framework (a significant improvement on R-CNN, achieving more efficient and accurate object detection) and adds a branch to predict a pixel-level mask for each instance. Mask R-CNN achieves instance segmentation by combining bounding box detection and segmentation. Cascade Mask R-CNN is an improvement on Mask R-CNN, using a cascade architecture to gradually improve detection and segmentation. Each stage focuses on processing instances of different difficulty levels, thereby improving the accuracy of the results. The Hybrid Task Cascade (HTC) is a complex architecture that combines multiple tasks, including classification, bounding box regression, mask prediction, and segmentation prediction. This multi-task approach allows the model to share features across tasks and produce better results. The out-of-stock segmentation contour in this embodiment is the contour of the out-of-stock area. This embodiment is not limited to a specific out-of-stock segmentation contour. For example, the out-of-stock segmentation contour in this embodiment can be a square; or the out-of-stock segmentation contour in this embodiment can be a rectangle; or the out-of-stock segmentation contour in this embodiment can be an irregular shape.

[0052] S102, determining a target detection area corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to one target detection area.

[0053] This embodiment does not limit the number of target detection areas. For example, in this embodiment, the number of target detection areas can be single; or the number of target detection areas in this embodiment can be multiple. The target detection areas in this embodiment are areas determined by the user based on actual needs. This embodiment does not limit the specific process of determining the target detection area corresponding to each out-of-stock segmentation contour. For example, in this embodiment, the target detection area corresponding to each out-of-stock segmentation contour can be determined based on whether the centroid corresponding to the out-of-stock segmentation contour is located in the target detection area; or this embodiment can also be determined based on the proportion of the area where the out-of-stock segmentation contour is located in the target detection area. In this embodiment, there can be multiple out-of-stock segmentation contours in the target detection area; or there can be multiple out-of-stock segmentation contours in the target detection area.

[0054] It should be further explained that, to improve the efficiency of determining out-of-stock ratios, the aforementioned use of the target segmentation model to detect product status images and obtain out-of-stock segmentation contours may include: using the target segmentation model to detect real-time product status images in a video stream to obtain out-of-stock segmentation contours. In this embodiment, the images are real-time product images, allowing for the determination of real-time out-of-stock ratios, thereby improving the efficiency of out-of-stock ratio determination.

[0055] It should be further explained that, in order to improve the accuracy of determining the out-of-stock segmentation contour in the target detection area, the above-mentioned determination of the target detection area corresponding to each out-of-stock segmentation contour may include:

[0056] S1021, determining the centroid of each out-of-stock segmentation contour.

[0057] This embodiment calculates the geometric center point, also known as the centroid, of each out-of-stock segmentation contour. In image processing, this usually means finding the average position of all points within the contour, which can be used as a representative point of the contour.

[0058] S1022, determining whether the centroid of the current out-of-stock segmentation contour is located in the target detection area.

[0059] S1023: If the centroid of the current out-of-stock segmentation contour is located in the target detection area, determine that the current out-of-stock segmentation contour belongs to the target detection area.

[0060] S1024: If the centroid of the current out-of-stock segmentation contour is not located in the target detection area, it is determined that the current out-of-stock segmentation contour does not belong to the target detection area.

[0061] Through these steps, this embodiment can accurately calculate the geometric center point of each out-of-stock segmentation contour, and determine whether the contour belongs to the target detection area based on the position of the centroid.

[0062] S103 : Determine the total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area.

[0063] In this embodiment, the area of ​​each out-of-stock segmentation contour within the target detection area is determined to thereby determine the total out-of-stock segmentation area. It will be appreciated that if only a portion of the current out-of-stock segmentation contour falls within the target detection area, only the portion of the current out-of-stock segmentation contour that falls within the target detection area may be used as the current out-of-stock segmentation contour for area calculation. Alternatively, this embodiment may directly use the entire portion of the current out-of-stock segmentation contour as the area of ​​each out-of-stock segmentation contour.

[0064] S104: Determine the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area.

[0065] This embodiment determines the out-of-stock ratio by determining the ratio of the total out-of-stock segmented area to the area of ​​the target detection area. This embodiment can determine the range of the product status information based on the out-of-stock ratio, for example, 20% to 30% out of stock.

[0066] It should be further explained that, in order to improve the accuracy of out-of-stock judgment, after determining the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area, it may also include: comparing each out-of-stock ratio with a set out-of-stock ratio threshold, filtering the out-of-stock ratio to obtain a target out-of-stock ratio; and determining the out-of-stock status based on the target out-of-stock ratio. This embodiment does not limit the specific out-of-stock ratio threshold. For example, the out-of-stock ratio threshold in this embodiment may be 0.2; or the out-of-stock ratio threshold in this embodiment may also be 0.3. The out-of-stock status in this embodiment may be an out-of-stock range; or the out-of-stock status in this embodiment may be the current out-of-stock range, and its corresponding out-of-stock items and quantities. In this embodiment, the out-of-stock status of the current target detection area is determined to be out-of-stock only if the out-of-stock ratio is greater than the out-of-stock ratio threshold.

[0067] It should be further explained that, to improve display efficiency, the aforementioned determination of the out-of-stock status based on the target out-of-stock ratio may include: determining a circumscribed rectangular frame corresponding to the target out-of-stock segmentation outline based on the target out-of-stock ratio; using the circumscribed rectangular frame as a display image, and labeling the out-of-stock category on the display image to obtain a target display image; and determining the out-of-stock status based on the target display image. This embodiment can directly locate the circumscribed rectangular frame corresponding to the target out-of-stock segmentation outline, thereby directly locating the circumscribed rectangular frame where the out-of-stock item is most obvious, thereby enabling display based directly on the circumscribed rectangular frame. Since the position coordinates of the circumscribed rectangular frame can be quickly determined, the efficiency of the out-of-stock display can be improved.

[0068] It should be further explained that, to improve display accuracy, determining the out-of-stock status based on the target out-of-stock ratio may include: determining the out-of-stock area corresponding to the target out-of-stock ratio; and using a machine learning model to determine the out-of-stock items corresponding to the out-of-stock area and the out-of-stock quantity corresponding to each out-of-stock item. The out-of-stock status includes the out-of-stock items and the out-of-stock quantity corresponding to each out-of-stock item. This embodiment utilizes a machine learning model to determine the out-of-stock items corresponding to the out-of-stock area and the out-of-stock quantity corresponding to each out-of-stock item. An appropriate machine learning model can be selected. For classification problems, options include logistic regression, support vector machine, and random forest. For regression problems, options include linear regression, decision tree regression, and gradient boosting regression. The dataset is divided into training and test sets. The model is trained using the training set, and the model performance is evaluated on the test set. Model evaluation and optimization: Appropriate evaluation metrics (such as precision, recall, and F1 score) are used to evaluate model performance. If model performance is poor, optimization can be attempted by adjusting model parameters, adding or removing features, or using a more complex model. Deployment and monitoring: The trained model is deployed in a production environment to detect out-of-stock items and their quantities. Continuously monitor the model's performance and regularly update it to adapt to new data and changing business needs. Interpret and apply the results: Compare the model's detection results with actual stock-out situations to analyze the model's accuracy and reliability. Based on the model's predictions, formulate appropriate replenishment strategies to reduce stock-outs. Through these steps, machine learning models can be used to identify out-of-stock items in out-of-stock areas and the corresponding out-of-stock quantities for each out-of-stock item, providing strong support for supply chain management.

[0069] The method for determining the out-of-stock ratio provided by an embodiment of the present invention may include: S101, using a target segmentation model to detect a product status image to obtain an out-of-stock segmentation contour; S102, determining a target detection area corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection area; S103, determining a total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area; S104, determining the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area. Compared with the current manual determination of the out-of-stock ratio, the present application determines the out-of-stock segmentation contour using a target segmentation model and determines the target detection area corresponding to each out-of-stock segmentation contour, thereby directly obtaining the out-of-stock ratio of the current detection area based on the area corresponding to the out-of-stock segmentation contour in the current target detection area and the area of ​​the target detection area, thereby realizing intelligent out-of-stock ratio determination and improving the efficiency of out-of-stock ratio determination.

[0070] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2An example flow chart of an object segmentation model training process provided by an embodiment of the present invention may specifically include:

[0071] S201, obtaining an initial instance segmentation model and a training dataset; wherein the training dataset is a dataset including product images, segmentation outlines, and out-of-stock categories.

[0072] This embodiment does not limit the specific initial instance segmentation model. For example, the initial instance segmentation model in this embodiment may be YOLOv8; or the initial instance segmentation model in this embodiment may be Mask R-CNN. Mask R-CNN can simultaneously handle object detection and generate high-quality segmentation masks, and is suitable for scenarios requiring precise bounding boxes and pixel-level true values. The training dataset in this embodiment is data that can determine the segmentation outlines and out-of-stock categories in the image.

[0073] S202 , training the initial instance segmentation model using the training dataset based on transfer learning to obtain a target segmentation model.

[0074] This embodiment can collect and annotate a dataset of out-of-stock store product scenarios based on the initial instance segmentation model. The model ultimately outputs information such as the location, category, and confidence level of the segmented contours (the confidence level is used to filter out unreliable segmentations). Finally, it filters out mis-segments with small segmented areas (a value below which a mis-segmentation is considered).

[0075] The method for determining a target segmentation model according to an embodiment of the present invention may include: S201, obtaining an initial instance segmentation model and a training dataset; wherein the training dataset includes product images, segmentation outlines, and out-of-stock categories; and S202, training the initial instance segmentation model using the training dataset based on transfer learning to obtain a target segmentation model. The embodiment of the present invention may utilize transfer learning technology to develop a target segmentation model suitable for a specific application scenario (out-of-stock segmentation outlines) based on the initial instance segmentation model and a specific training dataset.

[0076] In order to make the present invention easier to understand, please refer to Figure 3 , Figure 3 A flowchart illustrating a method for determining a stock-out ratio according to an embodiment of the present invention may include:

[0077] S301: Detect the image in the video stream using the target segmentation model to determine the out-of-stock segmentation contour corresponding to the current image.

[0078] The image and out-of-stock segmentation results in this embodiment can be used to further train the target segmentation model. This embodiment can correct the images in the video stream before using the target segmentation model for detection. In practical applications, the camera may be tilted during shooting, resulting in the captured real-time status image being non-horizontal. In order to accurately represent the location of shelf layers, labels, and products, the real-time status image needs to be geometrically corrected.

[0079] S302: Determine the target detection area corresponding to each out-of-stock segmentation contour.

[0080] In this embodiment, each target detection area is non-overlapping.

[0081] S303: Determine multiple out-of-stock segmentation contours corresponding to each target detection area.

[0082] S304 : Calculate the total out-of-stock segmentation contour area corresponding to each template detection area based on the multiple out-of-stock segmentation contours corresponding to each template detection area.

[0083] S305 : Divide the total out-of-stock segmentation contour area by the total area of ​​the target detection area to obtain the out-of-stock ratio.

[0084] S306 : Filter each out-of-stock ratio based on the set minimum out-of-stock ratio threshold to obtain a target out-of-stock segmentation area.

[0085] This embodiment can filter based on a minimum out-of-stock ratio threshold set manually according to experience, and finally display products with a serious out-of-stock ratio.

[0086] S307: Determine the circumscribed rectangular frame corresponding to the target out-of-stock segmentation area, and obtain the target out-of-stock display image.

[0087] For the sake of convenience in demonstration, the present invention only displays the circumscribed rectangular frame of the target out-of-stock segmentation area, and then displays the rectangular frame of the largest out-of-stock area within the target detection area.

[0088] The inventive points of the embodiments of the present invention are mainly as follows: First, the method of the present invention is mainly based on instance segmentation, and a segmentation model is trained on a commodity annotation dataset according to pre-trained weights, and then erroneous segmentation results are filtered out according to the contour area. Second, for items to be detected as out of stock, the detection area is manually delineated to avoid interference from the background of the entire image. It is determined whether the centroid of the segmented contour falls within the detection area, the total out-of-stock area within the detection area is calculated, and the ratio of the total out-of-stock area to the area of ​​the detection area is calculated, and then filtered according to a manually set threshold to display the displayed commodities that are seriously out of stock. Third, the system of the present invention is ultimately implemented in a mobile terminal manner, and the mobile terminal is responsible for the collection of image data, the processing of the segmentation model and the post-processing module. The present invention can segment multiple display areas in real time, and output the out-of-stock ratio results of commodities in real time while reading the video stream.

[0089] The embodiment of the present invention uses a segmentation model to obtain a segmentation frame for out-of-stock items, and then filters out erroneous segmentation results based on the size of the contour area. Manually demarcating the detection area effectively avoids background interference and can further locate the out-of-stock area. It determines whether the centroid of the segmented contour falls within the detection area, calculates the total out-of-stock area within the detection area, and determines the ratio of the out-of-stock area to the total detection area. Then, based on a threshold, it displays severely out-of-stock items, allowing merchants to restock them in a timely manner. This invention can effectively reduce out-of-stock situations, improve customer satisfaction, optimize inventory management, and reduce costs.

[0090] The following is an introduction to a device for determining a stock-out ratio provided by an embodiment of the present invention. The device for determining a stock-out ratio described below and the method for determining a stock-out ratio described above can be referenced to each other.

[0091] Please refer to Figure 4 , Figure 4 A schematic structural diagram of a device for determining a stock-out ratio provided by an embodiment of the present invention may include:

[0092] The out-of-stock segmentation contour determination module 100 is used to detect the commodity status image using the target segmentation model to obtain the out-of-stock segmentation contour;

[0093] The target detection region determination module 200 is configured to determine a target detection region corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to one target detection region;

[0094] A total out-of-stock segmentation area determination module 300 is configured to determine a total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area;

[0095] The out-of-stock ratio determining module 400 is configured to determine the out-of-stock ratio based on the total out-of-stock segmented area and the area of ​​the target detection area.

[0096] Furthermore, based on the above embodiment, the target detection area determination module 200 may include:

[0097] A centroid determination unit, used to determine the centroid of each out-of-stock segmentation contour;

[0098] a judgment unit, configured to judge whether the centroid of the current out-of-stock segmentation contour is located in the target detection area;

[0099] a determining unit, configured to determine that the current out-of-stock segmentation contour belongs to the target detection area if the centroid of the current out-of-stock segmentation contour is located in the target detection area;

[0100] The not-belonging determining unit determines that the current out-of-stock segmentation contour does not belong to the target detection area if the centroid of the current out-of-stock segmentation contour is not located in the target detection area.

[0101] Further, based on any of the above embodiments, the out-of-stock segmentation outline determination module may include: an out-of-stock segmentation outline determination unit, configured to detect the real-time commodity status image in the video stream using the target segmentation model to obtain the out-of-stock segmentation outline.

[0102] Furthermore, based on any of the above embodiments, the device for determining the out-of-stock ratio may further include:

[0103] a target out-of-stock ratio determination module, configured to compare each of the out-of-stock ratios with a set out-of-stock ratio threshold, filter the out-of-stock ratios, and obtain a target out-of-stock ratio;

[0104] The out-of-stock status determining module is configured to determine the out-of-stock status based on the target out-of-stock ratio.

[0105] Furthermore, based on the above embodiment, the out-of-stock status determination module may include:

[0106] a circumscribed rectangular frame determining unit, configured to determine a circumscribed rectangular frame corresponding to the target stock-out segmentation outline based on the target stock-out ratio;

[0107] a target display image determining unit, configured to use the circumscribed rectangular frame as a display image and mark the out-of-stock category on the display image to obtain a target display image;

[0108] The out-of-stock status determining unit is configured to determine an out-of-stock status based on the target display image.

[0109] Furthermore, based on the above embodiment, the out-of-stock status determination module may include:

[0110] an out-of-stock area determining unit, configured to determine an out-of-stock area corresponding to the target out-of-stock ratio;

[0111] An out-of-stock product determination unit is used to use a machine learning model to determine the out-of-stock products corresponding to the out-of-stock area and the out-of-stock quantity corresponding to each out-of-stock product; wherein the out-of-stock status includes out-of-stock products and the out-of-stock quantity corresponding to each out-of-stock product.

[0112] Furthermore, based on any of the above embodiments, the device for determining the out-of-stock ratio may further include:

[0113] A data acquisition module, configured to acquire an initial instance segmentation model and a training dataset; wherein the training dataset is a dataset including product images, segmentation outlines, and out-of-stock categories;

[0114] The target segmentation model training module is used to train the initial instance segmentation model using the training data set based on transfer learning to obtain the target segmentation model.

[0115] It should be noted that the order of the modules and units in the above-mentioned out-of-stock ratio determining device can be changed without affecting the logic.

[0116] The out-of-stock ratio determination device provided by an embodiment of the present invention may include: an out-of-stock segmentation contour determination module 100 for detecting a product status image using a target segmentation model to obtain out-of-stock segmentation contours; a target detection area determination module 200 for determining a target detection area corresponding to each out-of-stock segmentation contour, wherein each out-of-stock segmentation contour corresponds to a target detection area; a total out-of-stock segmentation area determination module 300 for determining a total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area; and an out-of-stock ratio determination module 400 for determining the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area. Compared to the current manual determination of the out-of-stock ratio, the present application uses the target segmentation model to determine the out-of-stock segmentation contours and the target detection area corresponding to each out-of-stock segmentation contour, thereby directly determining the out-of-stock ratio of the current detection area based on the area corresponding to the out-of-stock segmentation contour in the current target detection area and the area of ​​the target detection area, thereby realizing intelligent out-of-stock ratio determination and improving the efficiency of out-of-stock ratio determination.

[0117] The following introduces a device for determining a stock-out ratio provided by an embodiment of the present invention. The device for determining a stock-out ratio described below and the method for determining a stock-out ratio described above can refer to each other.

[0118] Please refer to Figure 5 , Figure 5 A schematic structural diagram of a device for determining a stock-out ratio provided in an embodiment of the present invention may include:

[0119] Memory 10, for storing computer programs;

[0120] The processor 20 is configured to execute a computer program to implement the above-mentioned method for determining the out-of-stock ratio.

[0121] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .

[0122] In the embodiment of the present invention, the memory 10 is used to store one or more programs. The program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:

[0123] Use the target segmentation model to detect the product status image and obtain the out-of-stock segmentation contour;

[0124] Determine the target detection area corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection area;

[0125] Determine the total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area;

[0126] The out-of-stock ratio is determined based on the total out-of-stock segmentation area and the area of ​​the target detection area.

[0127] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function, etc.; the data storage area may store data created during use.

[0128] In addition, the memory 10 may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset or an extended set thereof. The operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.

[0129] The processor 20 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field programmable gate array, or other programmable logic device. The processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10 .

[0130] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.

[0131] Of course, it needs to be explained that Figure 5 The structure shown does not constitute a limitation on the out-of-stock ratio determining device in the embodiment of the present invention. In actual applications, the out-of-stock ratio determining device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0132] The computer-readable storage medium provided in an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the method for determining the out-of-stock ratio described above can be referenced to each other.

[0133] The present invention also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned method for determining the out-of-stock ratio are implemented.

[0134] The readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which can store program codes.

[0135] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0136] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0137] Finally, it should be noted that, in this document, relationships such as first and second, etc., are used solely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0138] The above is a detailed introduction to the out-of-stock ratio determination method, device, equipment and readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for determining a stock-out ratio, characterized in that: include: Use the target segmentation model to detect the product status image and obtain the out-of-stock segmentation contour; Determine the target detection area corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection area; Determine a total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area; A stock-out ratio is determined based on the total stock-out segmentation area and the area of ​​the target detection area.

2. The method for determining the out-of-stock ratio according to claim 1, characterized in that: The determining of the target detection area corresponding to each out-of-stock segmentation contour includes: Determine the centroid of each out-of-stock segmentation contour; Determine whether the centroid of the current out-of-stock segmentation contour is located in the target detection area; If the centroid of the current out-of-stock segmentation contour is located in the target detection area, determining that the current out-of-stock segmentation contour belongs to the target detection area; If the centroid of the current out-of-stock segmentation contour is not located in the target detection area, it is determined that the current out-of-stock segmentation contour does not belong to the target detection area.

3. The method for determining the out-of-stock ratio according to claim 1, characterized in that: The method of detecting the commodity status image by using the target segmentation model to obtain the out-of-stock segmentation contour includes: The target segmentation model is used to detect the real-time commodity status image in the video stream to obtain the out-of-stock segmentation contour.

4. The method for determining the out-of-stock ratio according to any one of claims 1 to 3, characterized in that: After determining the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area, the method further includes: Compare each of the out-of-stock ratios with a set out-of-stock ratio threshold, filter the out-of-stock ratios, and obtain a target out-of-stock ratio; An out-of-stock status is determined based on the target out-of-stock ratio.

5. The method for determining the out-of-stock ratio according to claim 4, characterized in that: Determining the out-of-stock status based on the target out-of-stock ratio includes: Based on the target out-of-stock segmentation contour corresponding to the target out-of-stock ratio, determining a circumscribed rectangular frame corresponding to the target out-of-stock segmentation contour; The circumscribed rectangular frame is used as a display image, and the out-of-stock category is marked on the display image to obtain a target display image; An out-of-stock status is determined based on the target display image.

6. The method for determining the out-of-stock ratio according to claim 4, characterized in that: Determining the out-of-stock status based on the target out-of-stock ratio includes: Determine the out-of-stock area corresponding to the target out-of-stock ratio; A machine learning model is used to determine the out-of-stock commodities corresponding to the out-of-stock area and the out-of-stock quantity corresponding to each out-of-stock commodity; wherein the out-of-stock status includes the out-of-stock commodities and the out-of-stock quantity corresponding to each out-of-stock commodity.

7. The method for determining the out-of-stock ratio according to claim 1, characterized in that: Before using the target segmentation model to detect the product status image and obtain the out-of-stock segmentation contour, it also includes: Obtaining an initial instance segmentation model and a training data set; wherein the training data set is a data set including product images, segmentation contours, and out-of-stock categories; The initial instance segmentation model is trained using the training data set based on transfer learning to obtain the target segmentation model.

8. A device for determining a stock-out ratio, characterized in that: include: The out-of-stock segmentation contour determination module is used to detect the commodity status image using the target segmentation model to obtain the out-of-stock segmentation contour; A target detection region determination module is used to determine the target detection region corresponding to each out-of-stock segmentation contour; wherein each out-of-stock segmentation contour corresponds to a target detection region; A total out-of-stock segmentation area determination module is used to determine the total out-of-stock segmentation area based on all out-of-stock segmentation contours corresponding to the target detection area; The out-of-stock ratio determination module is used to determine the out-of-stock ratio based on the total out-of-stock segmentation area and the area of ​​the target detection area.

9. A device for determining a stock-out ratio, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method for determining the out-of-stock ratio as claimed in any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the out-of-stock ratio determination method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Commodity status identification method and device, electronic device and readable storage medium

    CN109446883A

  • Shelf monitoring device, shelf monitoring method, and shelf monitoring program

    CN111295684A

  • Warehouse overflow early warning method, device and equipment for cargo accumulation amount and storage medium

    CN111310645A

  • Standard detection method, system and equipment for placing trial products on shelf of store

    CN115049598A

  • Out-of-stock detection method and device for goods shelf commodities and robot

    CN116935198A

Cited By

  • Real-time shelf stockout detection method and device based on inspection robot and storage medium

    CN120808299A