[go: up one dir, main page]

CN116109992A - Goods shelf commodity identification method and system - Google Patents

Goods shelf commodity identification method and system Download PDF

Info

Publication number
CN116109992A
CN116109992A CN202310067189.5A CN202310067189A CN116109992A CN 116109992 A CN116109992 A CN 116109992A CN 202310067189 A CN202310067189 A CN 202310067189A CN 116109992 A CN116109992 A CN 116109992A
Authority
CN
China
Prior art keywords
commodity
image
information
shelf
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310067189.5A
Other languages
Chinese (zh)
Inventor
李晓磊
杨海波
张伟
宋然
褚石磊
谢世宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University
Original Assignee
Shandong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University filed Critical Shandong University
Priority to CN202310067189.5A priority Critical patent/CN116109992A/en
Publication of CN116109992A publication Critical patent/CN116109992A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/809Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)

Abstract

The invention discloses a method and a system for identifying goods on a goods shelf, and relates to the technical field of image identification. The method for identifying the goods on the goods shelf comprises the following steps: acquiring a shelf image, positioning a shelf to be detected and framing the area of the shelf to be detected; coarse detection is carried out on the framed area through global detection, commodities are classified according to rows, and images are segmented according to classification results to obtain commodity images to be detected; performing character recognition on the commodity image to be detected to preliminarily determine commodity category; image feature comparison and color comparison are carried out on the commodity image to be detected; obtaining a final commodity category through information fusion; judging the commodity category according to the template category information and the category information to be detected, and outputting a commodity identification result. The method and the device not only solve the problem that the efficiency of manually managing the goods on the goods shelf is low and errors are easy to occur, but also overcome the defect that the error rate of image identification by a single method in the existing goods shelf goods identification method is high.

Description

一种货架商品的识别方法及系统A method and system for identifying goods on a shelf

技术领域technical field

本发明涉及图像识别技术领域,尤其涉及一种货架商品的识别方法及系统。The invention relates to the technical field of image recognition, in particular to a method and system for recognizing goods on a shelf.

背景技术Background technique

本部分的陈述仅仅是提供了与本发明相关的背景技术信息,不必然构成在先技术。The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

货架陈列是商场超市主要的商品展示方式,合理的商品摆放可以吸引顾客,方便购物,提高商店业绩。同时,还可根据每天货架上相应商品的存余、数量变化等获知该商品的供需程度,从而实现智能进货管理。Shelf display is the main commodity display method in shopping malls and supermarkets. Reasonable commodity placement can attract customers, facilitate shopping, and improve store performance. At the same time, it is also possible to know the supply and demand level of the commodity according to the stock and quantity changes of the corresponding commodity on the shelf every day, so as to realize intelligent purchase management.

目前,货架商品审计即货架摆放与检查工作主要由人工完成。理货员一方面需要确定商品数量,另一方面需要对商品逐个扫码并摆放。由于商品种类繁多,同时货架的排列十分紧密,很容易出现商品错摆、漏摆。除此之外,随着时间推移,货架中商品逐渐售出,需要及时补货,人工不能顾及方方面面,并且人为巡检速度慢,精度低,既耗时费力,又难以准确找到问题。At present, shelf commodity auditing, that is, shelf placement and inspection, is mainly done manually. On the one hand, the tally staff needs to determine the quantity of goods, and on the other hand, they need to scan and place the goods one by one. Due to the wide variety of commodities and the tight arrangement of the shelves, it is easy for the products to be placed incorrectly or missing. In addition, as time goes by, the goods in the shelves are gradually sold out, and timely replenishment is required. Manual inspections are slow and inaccurate, and it is time-consuming and labor-intensive, and it is difficult to accurately find problems.

发明内容Contents of the invention

针对现有技术存在的不足,本发明的目的是提供一种货架商品的识别方法及系统,基于图像分析技术实时对货架上的商品按照预先设计的摆放情况进行识别和分析,具备实时、灵活、便捷、资源占用率低、可扩展性强等特点。In view of the deficiencies in the existing technology, the purpose of the present invention is to provide a method and system for identifying goods on the shelf, which can identify and analyze the goods on the shelf in real time according to the pre-designed placement based on the image analysis technology, with real-time and flexible , convenience, low resource usage, and strong scalability.

为了实现上述目的,本发明是通过如下的技术方案来实现:In order to achieve the above object, the present invention is achieved through the following technical solutions:

本发明第一方面提供了一种货架商品的识别方法,包括以下步骤:The first aspect of the present invention provides a method for identifying goods on a shelf, including the following steps:

采集货架图像,对待测货架进行定位并对待测货架的区域进行框定;Collect shelf images, locate the shelf to be tested and frame the area of the shelf to be tested;

通过全局检测对框定的区域进行粗检测,获取所需商品的信息;Roughly detect the framed area through global detection to obtain the information of the required goods;

根据所需商品的信息将商品按行分类,并根据分类结果对图像进行分割获得待检测商品图像;Classify the products by rows according to the information of the required products, and segment the images according to the classification results to obtain images of the products to be detected;

对待检测商品图像进行文字识别初步确定商品类别;Carry out text recognition on the image of the commodity to be detected to initially determine the category of the commodity;

对待测商品图像进行图像特征比对与颜色比对;Carry out image feature comparison and color comparison on the image of the product to be tested;

将文字识别结果和图像特征比对与颜色比对信息进行信息融合,得到最终的商品类别;Information fusion of text recognition results and image feature comparison and color comparison information to obtain the final product category;

根据模板类别信息与待检测类别信息对商品类别进行判断,输出商品识别结果。The product category is judged according to the template category information and the category information to be detected, and the product identification result is output.

进一步的,通过回形码定位和透视变换处理对待测货架进行定位并对待测货架的区域进行框定。Further, the shelf to be tested is positioned and the area of the shelf to be tested is framed by means of back-code positioning and perspective transformation processing.

进一步的,通过全局检测对框定的区域进行粗检测,获取所需商品的信息的具体步骤包括:Further, a rough detection is performed on the framed area through the global detection, and the specific steps for obtaining the information of the desired commodity include:

使用YOLOv5网络对图片进行全局粗检测,获得粗检测结果;Use the YOLOv5 network to perform global rough detection on the picture, and obtain the rough detection result;

根据回形码位置、商品中心平均高度、货架行数信息对粗检测结果进行滤除和补全得到所需商品在图片中的位置信息及大小信息。According to the position of the return code, the average height of the product center, and the number of shelf rows, the rough detection results are filtered and supplemented to obtain the position information and size information of the required product in the picture.

进一步的,对待检测商品图像进行文字识别初步确定商品类别的具体步骤为:Further, the specific steps of performing text recognition on the image of the commodity to be detected to initially determine the category of the commodity are as follows:

通过预先训练好的模型对分割出的待检测商品图像进行文字提取;Use the pre-trained model to extract text from the segmented image of the product to be detected;

根据提取出的文字信息与关键词库进行查询从而确定商品类别。Query according to the extracted text information and keyword database to determine the commodity category.

进一步的,对待测商品图像进行图像特征比对的具体步骤为:Further, the specific steps for comparing the image features of the product images to be tested are as follows:

对待检测商品图像进行图案特征提取;Extract pattern features from the image of the product to be detected;

将提取的特征进行重复特征滤除处理获得比对信息。The extracted features are subjected to repeated feature filtering to obtain comparison information.

进一步的,对待测商品图像进行颜色比对的具体步骤为:Further, the specific steps for color comparison of the images of the products to be tested are as follows:

利用HSV颜色空间对光照不敏感的特性,将原本RGB颜色空间转换及压缩至HSV颜色空间作为色彩特征,对比色彩特征与主要颜色的一致性,并输出比对信息。Taking advantage of the insensitivity of HSV color space to light, the original RGB color space is converted and compressed into HSV color space as color features, and the consistency between color features and main colors is compared, and the comparison information is output.

进一步的,将文字识别结果和图像特征比对与颜色比对结果进行信息融合,得到最终的商品类别的具体步骤为:Further, the specific steps for obtaining the final commodity category are as follows:

以文字识别结果为主,当特征相似时附加图案特征与颜色比对信息得出最终结果。Based on the text recognition results, when the features are similar, the pattern features and color comparison information are added to get the final result.

本发明第二方面提供了一种货架商品的识别系统,包括:The second aspect of the present invention provides an identification system for goods on shelves, including:

定位模块,被配置为采集货架图像,对待测货架进行定位并对待测货架的区域进行框定;The positioning module is configured to collect shelf images, locate the shelf to be tested and frame the area of the shelf to be tested;

检测模块,被配置为通过全局检测对框定的区域进行粗检测,获取所需商品的信息;根据所需商品的信息将商品按行分类,并根据分类结果对图像进行分割获得待检测商品图像;The detection module is configured to roughly detect the framed area through global detection to obtain the information of the required commodity; classify the commodity by row according to the information of the required commodity, and segment the image according to the classification result to obtain the image of the commodity to be detected;

识别模块,被配置为对待检测商品图像进行文字识别初步确定商品类别;对待测商品图像进行图像特征比对与颜色比对;将文字识别结果和图像特征比对与颜色比对结果进行信息融合,得到最终的商品类别,根据模板类别信息与待检测类别信息对商品类别进行判断,输出商品识别结果。The identification module is configured to perform text recognition on the image of the product to be detected to initially determine the product category; perform image feature comparison and color comparison on the product image to be tested; perform information fusion of the text recognition result and the image feature comparison and color comparison result, The final product category is obtained, and the product category is judged according to the template category information and the category information to be detected, and the product identification result is output.

本发明第三方面提供了一种介质,其上存储有程序,该程序被处理器执行时实现如本发明第一方面所述的货架商品的识别方法中的步骤。The third aspect of the present invention provides a medium on which a program is stored, and when the program is executed by a processor, the steps in the method for identifying goods on shelves as described in the first aspect of the present invention are implemented.

本发明第四方面提供了一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的程序,所述处理器执行所述程序时实现如本发明第一方面所述的货架商品的识别方法中的步骤。The fourth aspect of the present invention provides a device, including a memory, a processor, and a program stored on the memory and operable on the processor, when the processor executes the program, the method described in the first aspect of the present invention is implemented Steps in a method for identifying a shelf item.

以上一个或多个技术方案存在以下有益效果:The above one or more technical solutions have the following beneficial effects:

本发明公开了一种货架商品的识别方法,基于图像分析技术实时对货架上的商品按照预先设计的摆放情况进行识别和分析,不仅解决了人工管理货架上的商品效率低容易出错的问题,还对文字识别结果附加图像特征和颜色信息的比对进行识别结果进一步的确认,克服了现有货架商品识别方法中单一方法对图像识别误差率高的缺陷。The invention discloses a method for identifying goods on a shelf. Based on image analysis technology, the goods on the shelf are identified and analyzed in real time according to the pre-designed placement situation, which not only solves the problem of low efficiency and error-prone manual management of goods on the shelf, The text recognition results are further confirmed by comparing the additional image features and color information, which overcomes the defect that the single method of the existing shelf commodity recognition methods has a high error rate for image recognition.

本发明可以针对获得的商品类别识别结果针对模板类别信息与待检测类别信息,以摆放正确、摆反、缺货、多摆为最终类别进行进一步判定,以每行错误数最少结果为最终结果输出,大大减轻现有人工理货的任务,并为管理人员进行销售记录分析提供数据支持。本发明仅靠普通摄像头便能完成图像采集过程,具备实时、灵活、便捷、资源占用率低、易实现、可扩展性强等特点。The present invention can aim at the template category information and the category information to be detected for the obtained product category recognition results, and further judge with correct placement, reverse placement, out of stock, and extra placement as the final category, and take the result with the least number of errors in each row as the final result output, greatly reducing the existing tasks of manual tallying, and providing data support for managers to analyze sales records. The invention can complete the image acquisition process only by ordinary cameras, and has the characteristics of real-time, flexibility, convenience, low resource occupation rate, easy realization, strong scalability and the like.

本发明附加方面的优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Advantages of additional aspects of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明Description of drawings

构成本发明的一部分的说明书附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention, and the schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention.

图1为本发明实施例一中货架商品的识别方法的流程图;FIG. 1 is a flowchart of a method for identifying goods on shelves in Embodiment 1 of the present invention;

图2为本发明实施例一中回形码的样例图;Fig. 2 is the sample diagram of back shape code in the embodiment of the present invention one;

图3为本发明实施例一中识别判断过程示意图;FIG. 3 is a schematic diagram of the identification and judgment process in Embodiment 1 of the present invention;

图4为本发明实施例一中图像特征比对与颜色比对判断过程示意图;Fig. 4 is a schematic diagram of image feature comparison and color comparison judgment process in Embodiment 1 of the present invention;

图5为本发明实施例一中ini描述文件示意图。FIG. 5 is a schematic diagram of an ini description file in Embodiment 1 of the present invention.

具体实施方式Detailed ways

应该指出,以下详细说明都是示例性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be pointed out that the following detailed description is exemplary and is intended to provide further explanation to the present application. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

实施例一:Embodiment one:

本发明实施例一提供了一种货架商品的识别方法,以饮料类商品为例,如图1所示,包括以下步骤:Embodiment 1 of the present invention provides a method for identifying goods on a shelf. Taking beverage goods as an example, as shown in FIG. 1 , the method includes the following steps:

图像预处理:Image preprocessing:

S1:采集货架图像,通过回形码定位和透视变换处理对待测货架进行定位并对待测货架的区域进行框定。S1: Collect the shelf image, locate the shelf to be tested and frame the area of the shelf to be tested through zigzag positioning and perspective transformation processing.

S1.1:回形码检测针对待检测货架图像进行两次二值化处理,对二值化后的黑白图像进行闭区间图形检测。以闭区间中心点重合度、各闭区间包含关系(满足回形码层数包含)、各闭区间面积比例等为判断条件筛选滤除错误判定,从而获取图像中四个回形码位置信息。回形码示例如图2所示。本实施例中,四个回形码分别贴在货架第一排的左上角和右上角及最下一排的左下脚和右下脚,用于定位需要识别的货架的四个顶点。S1.1: Return shape code detection performs two binarization processing on the shelf image to be detected, and performs closed interval graphic detection on the binarized black and white image. Using the coincidence degree of the center point of the closed interval, the inclusion relationship of each closed interval (satisfied with the number of layers of the zigzag code), the area ratio of each closed interval, etc., are used as judgment conditions to filter and filter out wrong judgments, so as to obtain the position information of the four zigzag codes in the image. An example of back bar code is shown in Figure 2. In this embodiment, four back-shaped codes are pasted on the upper left corner and upper right corner of the first row of the shelf and the lower left foot and lower right foot of the bottom row respectively, and are used to locate the four vertices of the shelf to be identified.

S1.2:透视变换处理通过四点回形码位置进行透视变换,获取货架正视图,即所得框定区域。S1.2: Perspective Transformation Processing Perspective transformation is performed through the position of the four-point back-shaped code to obtain the front view of the shelf, that is, the obtained framed area.

S2:通过全局检测对框定的区域进行粗检测,获取所需商品的信息。S2: Perform rough detection on the framed area through global detection to obtain the information of the desired product.

S2.1:使用YOLOv5网络对图片进行全局粗检测,获得粗检测结果。具体的,将货架正视图送入提前训练好的YOLOv5网络中,获取图片中部分商品位置和大小信息。作为二分类任务,粗检测只检测商品位置不识别种类。S2.1: Use the YOLOv5 network to perform global rough detection on the picture, and obtain the rough detection result. Specifically, the front view of the shelf is sent to the pre-trained YOLOv5 network to obtain the position and size information of some commodities in the picture. As a binary classification task, rough detection only detects the location of the product and does not identify the type.

S2.2:根据回形码位置、商品中心平均高度、货架行数信息对粗检测结果进行滤除和补全得到所需商品在图片中的位置信息及大小信息。S2.2: According to the position of the return code, the average height of the product center, and the number of shelf rows, the rough detection results are filtered and supplemented to obtain the position information and size information of the required product in the picture.

S3:根据所需商品的信息将商品按行分类,并根据分类结果对图像进行分割获得待检测商品图像;具体的,根据训练好的二分类网络识别结果即各商品在图像中的位置信息,对图像进行进一步分割,得到每件商品独立的小图像用以接下来的识别过程。S3: Classify the products by row according to the information of the required products, and segment the image according to the classification results to obtain the images of the products to be detected; specifically, according to the recognition results of the trained binary classification network, that is, the position information of each product in the image, The image is further segmented to obtain an independent small image for each product for the next recognition process.

图像特征提取与比对:Image feature extraction and comparison:

商品类别的识别过程如图3所示,对待测商品图像根据置信度检索一级关键词并获得排名,对一级关键词中的置信度的前三进行二级检索,当二级检索结果唯一时输出商品类别,当二级检索结果不唯一时检索各类下三级关键词,当三级检索结果唯一时输出商品类别,当三级检索结果不唯一时附加图形特征比对和颜色比对结果,输出商品类别。本实施例中,一级关键词为商品品牌名称,二级关键词为商品口味,三级关键词为商品净含量等。具体过程如下:The identification process of the product category is shown in Figure 3. The image of the product to be tested retrieves the first-level keywords according to the confidence level and obtains the ranking, and conducts the second-level search for the top three confidence levels in the first-level keywords. When the second-level search results are unique When the second-level search results are not unique, search for all kinds of lower-level keywords; when the third-level search results are unique, output the product category; when the third-level search results are not unique, add graphic feature comparison and color comparison As a result, the commodity category is output. In this embodiment, the first-level keyword is the brand name of the product, the second-level keyword is the taste of the product, and the third-level keyword is the net content of the product. The specific process is as follows:

S4:对待检测商品图像进行文字识别初步确定商品类别。S4: Perform character recognition on the image of the commodity to be detected to initially determine the category of the commodity.

S4.1:通过预先训练好的模型对分割出的待检测商品图像进行文字提取;本实施例中采用PaddleOCR进行文字提取。S4.1: Perform text extraction on the segmented product image to be detected by using a pre-trained model; in this embodiment, PaddleOCR is used for text extraction.

具体的,获取包含商品名称、商品口味、商品净含量在内的若干商品描述信息。在预先设定好的关键词库中分别检索描述信息词,根据关键词优先级、关键词所占空间大小等信息决定商品类别。Specifically, several commodity description information including commodity name, commodity flavor, and commodity net content are acquired. Retrieve the descriptive information words in the preset keyword database, and determine the commodity category according to the keyword priority, the space occupied by the keyword and other information.

S4.2:根据提取出的文字信息与关键词库进行查询从而确定商品类别。S4.2: Query according to the extracted text information and keyword database to determine the commodity category.

S5:对待测商品图像进行图像特征比对与颜色比对。本实施例中,采用传统SIFT算法与RANSAC算法相结合,对文字识别在文字信息较少情况作以补充,提高精度。颜色比对过程通过将RGB颜色空间的高维数值转换到HSV颜色空间进行判断。S5: Perform image feature comparison and color comparison on the image of the product to be tested. In this embodiment, the combination of the traditional SIFT algorithm and the RANSAC algorithm is used to supplement the text recognition in the case of less text information and improve the accuracy. The color comparison process judges by converting the high-dimensional values of the RGB color space to the HSV color space.

S5.1:对待测商品图像进行图像特征比对。S5.1: Compare the image features of the images of the products to be tested.

S5.1.1:采用SIFT+BFmatcher算法对待检测商品图像进行图案特征提取。S5.1.1: Use the SIFT+BFmatcher algorithm to extract pattern features from the product image to be detected.

S5.1.2:将提取的特征进行使用RANSAC算法进行重复特征滤除处理获得比对信息。S5.1.2: Perform repeated feature filtering on the extracted features using the RANSAC algorithm to obtain comparison information.

S5.1.3:将比对信息与模板图库特征进行匹配,若匹配结果唯一则输出比对信息。若不唯一则跳转至S5.1.4对待测商品图像进行颜色比对。S5.1.3: Match the comparison information with the features of the template gallery, and output the comparison information if the matching result is unique. If it is not unique, skip to S5.1.4 to perform color comparison on the image of the product to be tested.

S5.1.4:对待测商品图像进行颜色比对。S5.1.4: Carry out color comparison of the images of the products to be tested.

具体的,利用HSV颜色空间对光照不敏感的特性,将原本RGB颜色空间转换及压缩至HSV颜色空间作为色彩特征,对比色彩特征与主要颜色的一致性,并输出比对信息。Specifically, the original RGB color space is converted and compressed into the HSV color space as color features by utilizing the insensitivity of the HSV color space to light, and the consistency between the color features and the main colors is compared, and the comparison information is output.

S6:将文字识别结果和图像特征比对与颜色比对信息进行信息融合,得到最终的商品类别。S6: Fusion of text recognition results, image feature comparison and color comparison information to obtain the final commodity category.

S6.1:以文字识别结果为主,当特征相似时附加图案特征与颜色比对信息得出最终结果。S6.1: Based on the text recognition results, when the features are similar, add pattern features and color comparison information to get the final result.

具体的,当文字信息模糊或者现有信息无法直接确认具体商品,采用图案特征与颜色比对信息做以辅助,在文字分类的基础上进一步筛选确认,并采取投票机制,根据置信度确定待检测商品最终类别。Specifically, when the text information is vague or the existing information cannot directly confirm the specific product, use pattern features and color comparison information to assist, further screen and confirm on the basis of text classification, and adopt a voting mechanism to determine the product to be detected according to the confidence level The final category of the product.

识别结果分析与展示:Analysis and display of recognition results:

S7:根据模板类别信息与待检测类别信息对商品类别进行判断,输出商品识别结果。S7: Judging the product category according to the template category information and the category information to be detected, and outputting a product identification result.

S7.1:在开始的系统参数配置过程中配置模板类别信息与待检测类别信息,具体包括商品条码(即获取种类)、货架行数、每行商品种类数、每类商品个数等信息等,从而对整个货架进行描述。S7.1: Configure the template category information and the category information to be detected in the initial system parameter configuration process, specifically including commodity barcodes (that is, the type of acquisition), the number of shelf rows, the number of commodity types in each row, the number of commodities in each category, etc. , thus describing the entire shelf.

S7.2:针对模板类别信息与待检测类别信息,以摆放正确、摆反、缺货、多摆为最终类别进行进一步判定,以每行错误数最少结果为最终结果输出,得到商品识别结果。S7.2: Based on the template category information and the category information to be detected, further judgment is made with correct placement, reverse placement, out of stock, and multi-placement as the final category, and the result with the least number of errors per line is the final result output to obtain the product identification result .

实施例二:Embodiment two:

本发明实施例二提供了一种货架商品的识别系统,包括:Embodiment 2 of the present invention provides an identification system for goods on shelves, including:

定位模块,被配置为采集货架图像,对待测货架进行定位并对待测货架的区域进行框定;The positioning module is configured to collect shelf images, locate the shelf to be tested and frame the area of the shelf to be tested;

检测模块,被配置为通过全局检测对框定的区域进行粗检测,获取所需商品的信息;根据所需商品的信息将商品按行分类,并根据分类结果对图像进行分割获得待检测商品图像;The detection module is configured to roughly detect the framed area through global detection to obtain the information of the required commodity; classify the commodity by row according to the information of the required commodity, and segment the image according to the classification result to obtain the image of the commodity to be detected;

识别模块,被配置为对待检测商品图像进行文字识别初步确定商品类别;对待测商品图像进行图像特征比对与颜色比对;将文字识别结果和图像特征比对与颜色比对结果进行信息融合,得到最终的商品类别,根据模板类别信息与待检测类别信息对商品类别进行判断输出商品识别结果。The identification module is configured to perform text recognition on the image of the product to be detected to initially determine the product category; perform image feature comparison and color comparison on the product image to be tested; perform information fusion of the text recognition result and the image feature comparison and color comparison result, The final product category is obtained, and the product category is judged according to the template category information and the category information to be detected to output a product recognition result.

实施例三:Embodiment three:

本发明实施例三提供了一种介质,其上存储有程序,该程序被处理器执行时实现如本发明实施例一所述的货架商品的识别方法中的步骤,所述步骤为:Embodiment 3 of the present invention provides a medium on which a program is stored. When the program is executed by a processor, the steps in the method for identifying goods on shelves as described in Embodiment 1 of the present invention are implemented. The steps are:

采集货架图像,对待测货架进行定位并对待测货架的区域进行框定;Collect shelf images, locate the shelf to be tested and frame the area of the shelf to be tested;

通过全局检测对框定的区域进行粗检测,获取所需商品的信息;Roughly detect the framed area through global detection to obtain the information of the required goods;

根据所需商品的信息将商品按行分类,并根据分类结果对图像进行分割获得待检测商品图像;Classify the products by rows according to the information of the required products, and segment the images according to the classification results to obtain images of the products to be detected;

对待检测商品图像进行文字识别初步确定商品类别;Carry out text recognition on the image of the commodity to be detected to initially determine the category of the commodity;

对待测商品图像进行图像特征比对与颜色比对;Carry out image feature comparison and color comparison on the image of the product to be tested;

将文字识别结果和图像特征比对与颜色比对信息进行信息融合,得到最终的商品类别;Information fusion of text recognition results and image feature comparison and color comparison information to obtain the final product category;

根据模板类别信息与待检测类别信息对商品类别进行判断输出商品识别结果。According to the category information of the template and the category information to be detected, the product category is judged and the product identification result is output.

可选的,系统初始化过程中包含ini配置文件读取分析与模板图库特征提取两部分。因此可以实现根据模板类别信息与待检测类别信息对商品类别进行判断输出商品识别结果。Optionally, the system initialization process includes reading and analyzing the ini configuration file and extracting features from the template library. Therefore, it is possible to judge the product category according to the template category information and the category information to be detected and output the product identification result.

ini描述文件主要用于获取商品条码(即获取种类)、货架行数、每行商品种类数、每类商品个数等信息。通过对ini描述文件的读取分析,从而形成一个可以描述整个货架的数组即标准模板数组,用以同最终测试结果对比。ini文件基本格式如图5所示。The ini description file is mainly used to obtain information such as commodity barcodes (that is, to obtain types), number of shelf rows, number of commodity types in each row, and number of commodities in each category. By reading and analyzing the ini description file, an array that can describe the entire shelf, that is, a standard template array, is formed for comparison with the final test results. The basic format of the ini file is shown in Figure 5.

模板图库特征提取则是对标准摆放描述数组的一种扩充,访问ini文件中模板图对应位置,使用sift算法提取各模板特征并存储留作对比使用。The template gallery feature extraction is an extension of the standard placement description array, accessing the corresponding position of the template map in the ini file, using the SIFT algorithm to extract the features of each template and storing them for comparison.

详细步骤与实施例一提供的货架商品的识别方法相同,这里不再赘述。The detailed steps are the same as the method for identifying goods on the shelf provided in Embodiment 1, and will not be repeated here.

实施例四:Embodiment four:

本发明实施例四提供了一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的程序,所述处理器执行所述程序时实现如本发明实施例一所述的货架商品的识别方法中的步骤,所述步骤为:Embodiment 4 of the present invention provides a device, which includes a memory, a processor, and a program stored in the memory and operable on the processor. When the processor executes the program, the device described in Embodiment 1 of the present invention The steps in the method for identifying goods on the shelf, the steps are:

采集货架图像,对待测货架进行定位并对待测货架的区域进行框定;Collect shelf images, locate the shelf to be tested and frame the area of the shelf to be tested;

通过全局检测对框定的区域进行粗检测,获取所需商品的信息;Roughly detect the framed area through global detection to obtain the information of the required goods;

根据所需商品的信息将商品按行分类,并根据分类结果对图像进行分割获得待检测商品图像;Classify the products by rows according to the information of the required products, and segment the images according to the classification results to obtain images of the products to be detected;

对待检测商品图像进行文字识别初步确定商品类别;Carry out text recognition on the image of the commodity to be detected to initially determine the category of the commodity;

对待测商品图像进行图像特征比对与颜色比对;Carry out image feature comparison and color comparison on the image of the product to be tested;

将文字识别结果和图像特征比对与颜色比对信息进行信息融合,得到最终的商品类别;Information fusion of text recognition results and image feature comparison and color comparison information to obtain the final product category;

根据模板类别信息与待检测类别信息对商品类别进行判断输出商品识别结果。According to the category information of the template and the category information to be detected, the product category is judged and the product identification result is output.

详细步骤与实施例一提供的货架商品的识别方法相同,这里不再赘述。The detailed steps are the same as the method for identifying goods on the shelf provided in Embodiment 1, and will not be repeated here.

以上实施例二、三和四中涉及的各步骤与方法实施例一相对应,具体实施方式可参见实施例一的相关说明部分。术语“计算机可读存储介质”应该理解为包括一个或多个指令集的单个介质或多个介质;还应当被理解为包括任何介质,所述任何介质能够存储、编码或承载用于由处理器执行的指令集并使处理器执行本发明中的任一方法。The steps involved in the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and for specific implementation methods, please refer to the relevant description part of the embodiment 1. The term "computer-readable storage medium" shall be construed to include a single medium or multiple media including one or more sets of instructions; and shall also be construed to include any medium capable of storing, encoding, or carrying A set of instructions to execute and cause the processor to execute any method in the present invention.

本领域技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算机装置来实现,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本发明不限制于任何特定的硬件和软件的结合。Those skilled in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computer device, optionally, they can be realized by a program code executable by the computing device, thereby, they can be stored in a memory The device is executed by a computing device, or they are made into individual integrated circuit modules, or multiple modules or steps among them are made into a single integrated circuit module for realization. The invention is not limited to any specific combination of hardware and software.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, those skilled in the art do not need to pay creative work Various modifications or variations that can be made are still within the protection scope of the present invention.

Claims (10)

1. The method for identifying the goods on the goods shelf is characterized by comprising the following steps:
acquiring a shelf image, positioning a shelf to be detected and framing the area of the shelf to be detected;
coarse detection is carried out on the framed area through global detection, and information of the required commodity is obtained;
classifying commodities according to the information of the required commodities according to rows, and dividing the image according to the classification result to obtain a commodity image to be detected;
performing character recognition on the commodity image to be detected to preliminarily determine commodity category;
image feature comparison and color comparison are carried out on the commodity image to be detected;
information fusion is carried out on the character recognition result and the image characteristic comparison and color comparison information, and a final commodity category is obtained;
judging the commodity category according to the template category information and the category information to be detected, and outputting a commodity identification result.
2. The method of claim 1, wherein the method comprises locating the shelf to be tested and framing the area of the shelf to be tested by a positioning of a loop code and a perspective transformation process.
3. The method of claim 1, wherein the step of obtaining information about the desired product by roughly detecting the framed area through global detection comprises:
performing global coarse detection on the picture by using a YOLOv5 network to obtain a coarse detection result;
and filtering and complementing the coarse detection result according to the position of the shape code, the average height of the commodity center and the line number information of the goods shelf to obtain the position information and the size information of the required commodity in the picture.
4. The method for identifying a shelf commodity according to claim 1, wherein the specific step of performing text recognition on the image of the commodity to be detected to preliminarily determine the commodity category comprises the steps of:
character extraction is carried out on the segmented commodity images to be detected through a pre-trained model;
and inquiring according to the extracted text information and the keyword library so as to determine the commodity category.
5. The method for identifying a shelf commodity according to claim 1, wherein the specific steps of comparing the image features of the commodity image to be tested are as follows:
extracting pattern features of the commodity image to be detected;
and carrying out repeated feature filtering processing on the extracted features to obtain comparison information.
6. The method for identifying a shelf commodity according to claim 1, wherein the specific step of performing color comparison on the image of the commodity to be tested is:
the original RGB color space is converted and compressed into the HSV color space to serve as color features by utilizing the characteristic that the HSV color space is insensitive to illumination, consistency of the color features and main colors is compared, and comparison information is output.
7. The method for identifying goods on shelves according to claim 1, wherein the specific steps of information fusion between the character identification result and the image feature comparison result and the color comparison result to obtain the final goods category are as follows:
and (3) taking a character recognition result as a main, and when the characteristics are similar, adding pattern characteristics and color comparison information to obtain a final result.
8. A system for identifying a shelf commodity, comprising:
the positioning module is configured to acquire images of the goods shelves, position the goods shelves to be tested and frame the areas of the goods shelves to be tested;
the detection module is configured to perform rough detection on the framed area through global detection to obtain information of the required commodity; classifying commodities according to the information of the required commodities according to rows, and dividing the image according to the classification result to obtain a commodity image to be detected;
the identification module is configured to perform character identification on the commodity image to be detected to preliminarily determine commodity category; image feature comparison and color comparison are carried out on the commodity image to be detected; and carrying out information fusion on the character recognition result and the image characteristic comparison result and the color comparison result to obtain a final commodity category, judging the commodity category according to the template category information and the category information to be detected, and outputting the commodity recognition result.
9. A computer readable storage medium, characterized in that a plurality of instructions are stored, which instructions are adapted to be loaded by a processor of a terminal device and to carry out the method of identifying a shelf commodity according to any one of claims 1 to 7.
10. A terminal device comprising a processor and a computer readable storage medium, the processor configured to implement instructions; a computer readable storage medium for storing a plurality of instructions adapted to be loaded by a processor and to perform the method of identifying a shelf commodity according to any one of claims 1 to 7.
CN202310067189.5A 2023-01-16 2023-01-16 Goods shelf commodity identification method and system Pending CN116109992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310067189.5A CN116109992A (en) 2023-01-16 2023-01-16 Goods shelf commodity identification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310067189.5A CN116109992A (en) 2023-01-16 2023-01-16 Goods shelf commodity identification method and system

Publications (1)

Publication Number Publication Date
CN116109992A true CN116109992A (en) 2023-05-12

Family

ID=86261149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310067189.5A Pending CN116109992A (en) 2023-01-16 2023-01-16 Goods shelf commodity identification method and system

Country Status (1)

Country Link
CN (1) CN116109992A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117952507A (en) * 2024-03-26 2024-04-30 南京亿猫信息技术有限公司 Intelligent shopping cart commodity returning identification method and system
CN119493876A (en) * 2024-10-31 2025-02-21 北京百度网讯科技有限公司 Target item retrieval method, device, electronic device and storage medium
CN120236155A (en) * 2025-06-03 2025-07-01 深圳友朋智能商业科技有限公司 Multi-target commodity recognition method, device and system based on multimodal data processing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117952507A (en) * 2024-03-26 2024-04-30 南京亿猫信息技术有限公司 Intelligent shopping cart commodity returning identification method and system
CN119493876A (en) * 2024-10-31 2025-02-21 北京百度网讯科技有限公司 Target item retrieval method, device, electronic device and storage medium
CN120236155A (en) * 2025-06-03 2025-07-01 深圳友朋智能商业科技有限公司 Multi-target commodity recognition method, device and system based on multimodal data processing

Similar Documents

Publication Publication Date Title
CN116188475B (en) Intelligent control method, system and medium for automatic optical detection of appearance defects
CN116109992A (en) Goods shelf commodity identification method and system
CN107463946B (en) A Commodity Category Detection Method Combining Template Matching and Deep Learning
Marder et al. Using image analytics to monitor retail store shelves
CN107463945B (en) Commodity type identification method based on deep matching network
CN115063084B (en) Cigarette retail merchant inventory checking method and system
CN108345912A (en) Commodity rapid settlement system based on RGBD information and deep learning
AU2011200696B2 (en) Method, apparatus and system for rating images
US11748787B2 (en) Analysis method and system for the item on the supermarket shelf
US20090198593A1 (en) Method and apparatus for comparing entities
CN111160450A (en) Fruit and vegetable weighing method based on neural network, storage medium and device
CN110348293B (en) Commodity identification method and system
CN110688900A (en) A method of withdrawing meter management based on image recognition
CN117115569B (en) Automatic object image identification and classification method and system based on machine learning
CN110069980A (en) Product polymerization and device, electronic equipment based on image
CN113642291A (en) Method, system, storage medium and terminal for constructing logical structure tree reported by listed companies
CN111369317A (en) Order generation method and device, electronic equipment and storage medium
CN119323660A (en) Automatic quality inspection method for labeling information, electronic equipment and storage medium
CN115115825B (en) Method, device, computer equipment and storage medium for detecting object in image
CN120032380A (en) Commodity price tag identification method, device, medium, processor and program product
JP2001092975A (en) System and method for recognizing article
CN115457458A (en) A non-contact intelligent inventory system and method
CN118052991B (en) Shelf management method and system based on image recognition
CN118917777A (en) Commodity management method, commodity management device, storage medium and computer equipment
CN118334672A (en) Electronic price tag identification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination