Commodity shelf vacancy recognition and early warning method and system based on visual algorithm

Through the visual algorithm-based identification and early warning method of empty commodity shelves, vacant areas are identified and warned in real time, which solves the problems of low replenishment efficiency and high manual inspection costs in the existing technology, and realizes intelligent inventory management and efficient replenishment.

CN114863362BActive Publication Date: 2024-09-27SHANGHAI ULUCU ELECTRON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210435144.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-24
Publication Date
2024-09-27
Estimated Expiration
2042-04-24

AI Technical Summary

Technical Problem

In the existing technology, it is difficult for stores and supermarkets to accurately identify empty product shelves in a timely manner, resulting in low replenishment efficiency and the need for a large number of manual inspections, resulting in a waste of resources.

Method used

A visual algorithm-based early warning method for identifying vacant product shelves is adopted. Images are extracted from surveillance videos to build a vacant area detection model, a product label frame detection model and a label character recognition model. The system identifies and calculates the proportion of vacant areas in real time, and issues early warning information to prompt for replacement. goods.

Benefits of technology

It realizes intelligent inspection of commodity shelves, improves replenishment efficiency, reduces labor costs, and ensures timely replenishment of goods and accuracy of inventory management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114863362B
    Figure CN114863362B
Patent Text Reader

Abstract

The present invention provides a method and system for identifying and warning vacant commodity shelves based on a visual algorithm. The identification and warning method of the present invention comprises the following steps: extracting and selecting a plurality of training images; manually labeling each training image to obtain corresponding labeled vacant area data, labeled commodity label frame data, and labeled commodity identification character data; constructing and training a vacant area detection model, a commodity label frame detection model, and a label character recognition model; obtaining the current commodity label frame data, the current commodity identification character, and the current vacant area data corresponding to the current image through the trained commodity label frame detection model, the label character recognition model, and the vacant area detection model, and calculating the current vacant area ratio in the area where the corresponding commodity is stored; judging whether the current vacant area ratio is greater than the preset vacant area ratio; and issuing a warning message containing the current vacant area ratio and the corresponding commodity identification character when the judgment result is yes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent commodity management, and in particular relates to a commodity shelf vacancy recognition and early warning method and system based on a visual algorithm. Background Art

[0002] In daily life, some shopping places such as stores and supermarkets have a large number of shoppers and the shopping is relatively scattered. It is possible to accurately and timely discover that goods are empty and remind staff to replenish goods in time. This can not only better meet the needs of customers, but also promote the profits of supermarkets.

[0003] Usually shopping places hire clerks to regularly count the shelves, organize and report the inventory, and then replenish the goods. This may cause problems such as the clerks' failure to count in a timely manner, resulting in low efficiency, and the need for employees to frequently patrol the shelves. Summary of the invention

[0004] The present invention is made to solve the above-mentioned problems, and its purpose is to provide a method and system for identifying and warning empty commodity shelves based on visual algorithms, which can effectively improve the management efficiency of supermarkets and save labor costs.

[0005] In order to achieve the above object, the present invention adopts the following scheme:

[0006] <Option 1>

[0007] The present invention provides a method for identifying and warning vacant commodity shelves based on a visual algorithm, which is used to identify and warn vacant areas of commodity shelves. A commodity label is provided at the starting position and the end position of an area on the commodity shelf for storing the same commodity. Each commodity label frame has a commodity identification character of the corresponding commodity. The method has the following characteristics:

[0008] Step S1, extracting a plurality of single-frame images from at least one surveillance video of a collected target scene, and selecting a plurality of single-frame images with vacant areas from the plurality of single-frame images as training images;

[0009] Step S2, manually labeling each training image to obtain corresponding labeled vacant area data, labeled product label frame data, and labeled product identification character data;

[0010] Step S3, constructing a vacant area detection model, and training the vacant area detection model according to a preset target detection algorithm and using the labeled vacant area data to obtain a trained vacant area detection model;

[0011] Step S4, constructing a product label frame detection model, and training the product label frame detection model using the annotated product label frame data according to a preset character detection algorithm to obtain a trained product label frame detection model;

[0012] Step S5, constructing a label character recognition model, and training the label character recognition model according to a preset character recognition algorithm and using the labeled commodity recognition character data to obtain a trained label character recognition model;

[0013] Step S6, extracting a single frame image from the real-time surveillance video as the current image, obtaining the current product label frame data, the current product recognition character and the current vacant area data corresponding to the current image through the trained product label frame detection model, the label character recognition model and the vacant area detection model, respectively, and calculating the current vacant area ratio in the area where the corresponding product is stored based on the current vacant area data and the current product label frame data;

[0014] Step S7, determining whether the current vacant area ratio is greater than the preset vacant area ratio;

[0015] Step S8: When the judgment result is yes, a warning message including the current vacant area ratio and the corresponding commodity identification character is issued.

[0016] The visual algorithm-based commodity shelf vacancy identification and early warning method provided by the present invention may also have the following features: wherein the marked vacant area data includes the coordinates and categories of the upper left and lower right corners of the marked vacant area, and the marked commodity label frame data includes the coordinates and categories of the upper left and lower right corners of the marked commodity label frame.

[0017] The visual algorithm-based commodity shelf vacancy identification and early warning method provided by the present invention may also have the following feature: wherein the preset target detection algorithm is the YOLOv4 algorithm.

[0018] The visual algorithm-based commodity shelf vacancy identification and early warning method provided by the present invention may also have the following features: wherein the initial learning rate adopted by the vacant area detection model is 0.001, and the number of training data iteration rounds is 443.

[0019] The visual algorithm-based commodity shelf vacancy recognition and early warning method provided by the present invention may also have the following feature: wherein the preset character detection algorithm is a TextBPN algorithm.

[0020] The visual algorithm-based commodity shelf vacancy identification and warning method provided by the present invention may also have the following features: wherein the initial learning rate adopted by the commodity label frame detection model is 0.001, and the number of training data iteration rounds is 590.

[0021] The visual algorithm-based commodity shelf vacancy recognition and early warning method provided by the present invention may also have the following feature: wherein the preset character recognition algorithm is a CRNN algorithm.

[0022] The visual algorithm-based commodity shelf vacancy recognition and early warning method provided by the present invention may also have the following features: wherein the initial learning rate adopted by the label character recognition model is 0.0001, and the number of training data iteration rounds is 150.

[0023] The visual algorithm-based commodity shelf vacancy recognition and early warning method provided by the present invention may also have the following feature: wherein the commodity recognition characters are commodity names.

[0024] <Option 2>

[0025] The present invention also provides a commodity shelf vacancy recognition and early warning system based on a visual algorithm, which is used for recognizing and early warning of vacant areas of commodity shelves, wherein a commodity label is respectively arranged at the starting position and the end position of the area for storing the same commodity on the commodity shelf, and the detection frame of each commodity label has the trademark identification character of the corresponding commodity, and has the following characteristics, including: a single-frame image extraction module, which is used to extract a single-frame image from a surveillance video; a manual labeling module, which is used to allow an operator to label a single-frame image as a training image to obtain corresponding labeled vacant area data, labeled commodity label frame data and labeled commodity identification character data; a model building module, which is used to build a vacant area detection model, a commodity label frame detection model and a label character recognition model; a model training module, which is used to train the vacant area detection model according to a preset target detection algorithm and using the labeled vacant area data to obtain a trained vacant area detection model, and is also used to train the vacant area detection model according to a preset character detection algorithm and using the labeled vacant area data to obtain a trained vacant area detection model. The product label frame detection model is trained using the annotated product label frame data to obtain a trained product label frame detection model, and is also used to train the product label frame detection model according to a preset character detection algorithm and using the annotated product label frame data to obtain a trained product label frame detection model; a calculation module is used to obtain the current product label frame data, the current product recognition character and the current vacant area data corresponding to the single frame image as the current image through the trained product label frame detection model, the label character recognition model and the vacant area detection model, and calculate the current vacant area ratio in the area where the corresponding product is stored based on the current vacant area data and the current product label frame data; a judgment module is used to judge whether the current vacant area ratio is greater than the preset vacant area ratio; and an early warning module is used to issue an early warning message containing the current vacant area ratio and the corresponding current product recognition character when it is judged that the current vacant area ratio is greater than the preset vacant area ratio.

[0026] Functions and Effects of the Invention

[0027] Compared with the prior art, the present invention only needs to monitor the video of the commodity area in real time through the camera, identify the vacant commodity area, and report the missing commodities more timely and accurately. This not only improves the efficiency of timely replenishment of commodities but also saves a lot of labor costs and realizes the intelligent inspection of commodity shelves. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is an action flow chart of a method for identifying and warning of empty commodity shelves based on a visual algorithm in an embodiment of the present invention; and

[0029] Figure 2 It is a structural block diagram of a commodity shelf vacancy recognition and early warning system based on a visual algorithm in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is described in detail below in conjunction with embodiments and drawings.

[0031] <Example>

[0032] refer to Figure 1 The present embodiment provides a method for identifying and warning vacant commodity shelves based on a visual algorithm, which is used to identify and warn vacant areas of commodity shelves; a commodity label is provided at the starting position and the end position of an area on a commodity shelf for storing the same commodity, and a commodity identification character of the corresponding commodity is provided in the commodity label frame of each commodity label. In the present embodiment, the commodity identification character is the commodity name. The method for identifying and warning vacant commodity shelves based on a visual algorithm specifically includes the following steps S1 to S8.

[0033] Step S1, extracting a plurality of single-frame images from at least one section of surveillance video collected under a target scene, and selecting a plurality of single-frame images with vacant areas from the plurality of single-frame images as training images.

[0034] Step S2, manually annotating each training image to obtain corresponding annotated vacant area data, annotated commodity label frame data, and annotated commodity identification character data.

[0035] In this embodiment, the marked vacant area data includes the coordinates and categories of the upper left corner and lower right corner of the marked vacant area in the training image, and the marked product label frame data includes the coordinates and categories of the upper left corner and lower right corner of the marked product label frame in the training image.

[0036] Step S3: construct a vacant area detection model, and train the vacant area detection model according to a preset target detection algorithm and using the labeled vacant area data to obtain a trained vacant area detection model.

[0037] In this embodiment, the preset target detection algorithm adopts the YOLOv4 algorithm, the width and height of the training network input data are both 608, the initial learning rate is 0.001, and the number of training data iterations is 443. Use the trained vacant area detection model to detect the vacant area of ​​the product in the image and count it as a box p ={bp0,bp1,bp2,...bp i ,...,bp n}.

[0038] Step S4: construct a product label frame detection model, and train the product label frame detection model according to a preset character detection algorithm and using the annotated product label frame data to obtain a trained product label frame detection model.

[0039] In this embodiment, the preset character detection algorithm uses the TextBPN algorithm, the width and height of the training network input data are both 640, the initial learning rate is 0.001, the number of training data iterations is 590, and the output is the coordinates of the label character contour points. The trained product label box detection model is used to detect the product label box in the image. The product label detection box can be represented as box L = {bo1,bo2,bo3,...bo i ,...,bo n}.

[0040] The TextBPN algorithm is mainly composed of a boundary proposal model and an adaptive boundary deformation model. The boundary proposal model consists of multiple layers of dilated convolutions, including two 3x3 convolution layers with different dilation rates and one 1x1 convolution layer. It will use the shared features extracted from the backbone network to generate classification maps, distance field maps, and direction field maps; the adaptive boundary deformation model adopts an encoding and decoding structure, which is mainly composed of a graph convolutional neural network and a recursive neural network.

[0041] Step S5, constructing a label character recognition model, and training the label character recognition model according to a preset character recognition algorithm and using the labeled commodity recognition character data to obtain a trained label character recognition model.

[0042] In this embodiment, the preset character recognition algorithm adopts the CRNN algorithm, the width of the training network input image data is 240, the height is 112 and the label index of the corresponding character, the initial learning rate is 0.0001, the number of training data iterations is 150, and the output is the predicted character label index. The trained label character recognition model is used to identify the product recognition characters in the image, and the product label recognition result can be expressed as cont = {C0, C1, C2, ..., C i ,...,C n}, here box LThere is a one-to-one correspondence between it and cont. By using the method of detection first and then recognition, it can be easily migrated to different scenarios.

[0043] The CRNN algorithm model structure is mainly composed of three parts: convolutional layer, recursive layer, and transcription layer. At the bottom of CRNN, the convolutional layer can automatically extract feature sequences from each input image. The recursive layer is located at the top of the convolutional network and is used to predict each frame of the feature sequence. The top of the CRNN network is the transcription layer, which mainly converts the prediction of each frame of the recursive layer into a label sequence.

[0044] Step S6, extracting a single frame image from the real-time surveillance video as the current image, and obtaining the current product label frame data, current product recognition characters and current vacant area data corresponding to the current image through the trained product label frame detection model, label character recognition model and vacant area detection model respectively, and calculating the current vacant area ratio in the area where the corresponding product is stored based on the current vacant area data and the current product label frame data.

[0045] Specifically, the above step S6 includes the following sub-steps:

[0046] Step S6.1, extracting a single frame image from the real-time surveillance video as the current image.

[0047] Step S6.2, detecting the product label frame in the current image using the trained product label frame detection model to obtain current product label frame data, where the current product label frame data includes the coordinates of the current product label frame.

[0048] Step S6.3, using the trained label character recognition model to recognize the product recognition character in the current image, and obtain the corresponding current product recognition character C i .

[0049] Step S6.4, detecting the vacant areas in the current image using the trained vacant area detection model to obtain current vacant area data, which includes the coordinates of the current vacant area.

[0050] Step S6.5, the maximum value, minimum value and vertical coordinate of the label frame in each group represent G i_Xmax , G i_Xmin , G i_y , then the horizontal length D of the display area of ​​the i-th product on the shelf i =G i_Xmax -G i_Xmin , press Y for the vertical axis i =G i_y ; Current vacant area coordinate frame bp i The center coordinates are expressed as (bpi_cx ,bp i_cy ), then the current product identification character C is stored i The current vacant area ratio r in the corresponding commodity area i =bp i_width / D i , where bp i_width The width of the coordinate frame of the current empty area.

[0051] Step S7, determine the current vacant area ratio r i Is it greater than the preset vacant area ratio T? If the judgment result is yes, go to step S8; otherwise, return to execute step S6.

[0052] Step S8: Send a message including the current vacant area ratio r i and the corresponding product identification character C i early warning information.

[0053] Correspondingly, this embodiment also provides a visual algorithm-based commodity shelf vacancy identification and warning system corresponding to the visual algorithm-based commodity shelf vacancy identification and warning method. Figure 2 As shown, the commodity shelf vacancy identification and warning system 10 based on visual algorithm includes a single-frame image extraction module 11, a manual labeling module 12, a model construction module 13, a model training module 14, a calculation module 15, a judgment module 16 and a warning module 17.

[0054] The single-frame image extraction module 11 is used to extract a single-frame image as a training image from the collected surveillance video of the target scene, and is also used to extract a single-frame image as a current image from the surveillance video acquired in real time.

[0055] The manual labeling module 12 is used to allow the operator to label a single frame image as a training image to obtain corresponding labeled vacant area data, labeled commodity label frame data, and labeled commodity identification character data.

[0056] The model building module 13 is used to build a vacant area detection model, a commodity label frame detection model and a label character recognition model.

[0057] The model training module 14 is used to train the vacant area detection model according to the preset target detection algorithm and using the marked vacant area data to obtain the trained vacant area detection model, and is also used to train the product label frame detection model according to the preset character detection algorithm and using the marked product label frame data to obtain the trained product label frame detection model, and is also used to train the product label frame detection model according to the preset character detection algorithm and using the marked product label frame data to obtain the trained product label frame detection model.

[0058] The calculation module 15 is used to obtain the current product label frame data, the current product recognition character and the current vacant area data corresponding to the single frame image of the current image through the trained product label frame detection model, the label character recognition model and the vacant area detection model, and calculate the current vacant area ratio in the area where the corresponding product is stored based on the current vacant area data and the current product label frame data.

[0059] The judgment module 16 is used to judge whether the current vacant area ratio is greater than the preset vacant area ratio.

[0060] The early warning module 17 is used to issue an early warning message including the current vacant area ratio and the corresponding current commodity identification character when it is determined that the current vacant area ratio is greater than the preset vacant area ratio.

[0061] The above-mentioned embodiments are preferred examples of the present invention and are not intended to limit the protection scope of the present invention.

Claims

1. A method for identifying and warning vacant commodity shelves based on a visual algorithm, which is used to identify and warn vacant areas of commodity shelves. A commodity label is provided at the starting position and the end position of the area on the commodity shelf for storing the same commodity. Each commodity label frame has a commodity identification character of the corresponding commodity. It is characterized in that The following steps are involved: Step S1, extracting a plurality of single-frame images from at least one surveillance video of a collected target scene, and selecting a plurality of single-frame images with vacant areas from the plurality of single-frame images as training images; Step S2, manually labeling each of the training images to obtain corresponding labeled vacant area data, labeled commodity label frame data, and labeled commodity identification character data; Step S3, constructing a vacant area detection model, and training the vacant area detection model according to a preset target detection algorithm and using the labeled vacant area data to obtain a trained vacant area detection model; Step S4, constructing a product label frame detection model, and training the product label frame detection model using the annotated product label frame data according to a preset character detection algorithm to obtain a trained product label frame detection model; Step S5, constructing a label character recognition model, and training the label character recognition model according to a preset character recognition algorithm and using the labeled commodity recognition character data to obtain a trained label character recognition model; Step S6, extracting a single frame image from the real-time surveillance video as the current image, obtaining the current product label frame data, the current product recognition character and the current vacant area data corresponding to the current image through the trained product label frame detection model, the label character recognition model and the vacant area detection model, respectively, and calculating the current vacant area ratio in the area where the corresponding product is stored according to the current vacant area data and the current product label frame data; Step S7, determining whether the current vacant area ratio is greater than a preset vacant area ratio; Step S8: When the judgment result is yes, a warning message including the current vacant area ratio and the corresponding commodity identification character is issued.

2. The method for identifying and warning empty commodity shelves based on visual algorithms according to claim 1 is characterized in that: in, The marked vacant area data includes the coordinates and categories of the upper left corner and lower right corner of the marked vacant area. The marked commodity label frame data includes the coordinates of the upper left corner and the lower right corner and the category of the marked commodity label frame.

3. The method for identifying and warning vacant commodity shelves based on visual algorithms according to claim 1 is characterized in that: in, The preset target detection algorithm is the YOLOv4 algorithm.

4. The method for identifying and warning vacant commodity shelves based on visual algorithms according to claim 3 is characterized in that: in, The initial learning rate used by the vacant area detection model is 0.001, and the number of training data iterations is 443.

5. The method for identifying and warning vacant commodity shelves based on visual algorithms according to claim 1 is characterized in that: in, The preset character detection algorithm is the TextBPN algorithm.

6. The method for identifying and warning vacant commodity shelves based on visual algorithms according to claim 5 is characterized in that: in, The initial learning rate used by the product label box detection model is 0.001, and the number of training data iterations is 590.

7. The method for identifying and warning vacant commodity shelves based on visual algorithms according to claim 1 is characterized in that: in, The preset character recognition algorithm is the CRNN algorithm.

8. The method for identifying and warning empty commodity shelves based on visual algorithms according to claim 7 is characterized in that: in, The initial learning rate used by the label character recognition model is 0.0001, and the number of training data iterations is 150.

9. The method for identifying and warning vacant commodity shelves based on visual algorithms according to claim 1, characterized in that: in, The commodity identification characters are commodity names.

10. A visual algorithm-based commodity shelf vacancy identification and early warning system, used to identify and warn vacant areas of commodity shelves, where a commodity label is provided at the start and end positions of the area on the commodity shelf used to store the same commodity, and each commodity label has a trademark identification character of the corresponding commodity in the detection frame. It is characterized in that include: A single-frame image extraction module is used to extract a single-frame image from a surveillance video; A manual labeling module is used to allow an operator to label a single frame image as a training image to obtain corresponding labeled vacant area data, labeled commodity label frame data, and labeled commodity identification character data; Model building module, used to build vacant area detection model, product label box detection model and label character recognition model; A model training module, used to train the vacant area detection model according to a preset target detection algorithm and using the annotated vacant area data to obtain a trained vacant area detection model, and also used to train the product label frame detection model according to a preset character detection algorithm and using the annotated product label frame data to obtain a trained product label frame detection model, and also used to train the product label frame detection model according to a preset character detection algorithm and using the annotated product label frame data to obtain a trained product label frame detection model; A calculation module, used to obtain the current product label frame data, the current product recognition character and the current vacant area data corresponding to the single frame image as the current image through the trained product label frame detection model, the label character recognition model and the vacant area detection model, respectively, and calculate the current vacant area ratio in the area where the corresponding product is stored according to the current vacant area data and the current product label frame data; A judgment module, used to judge whether the current vacant area ratio is greater than a preset vacant area ratio; as well as The early warning module is used to issue an early warning message including the current vacant area ratio and the corresponding current commodity identification character when it is determined that the current vacant area ratio is greater than the preset vacant area ratio.