CN116246093A - Commodity identification method and device after commodity is new, electronic equipment and storage medium - Google Patents

Commodity identification method and device after commodity is new, electronic equipment and storage medium Download PDF

Info

Publication number
CN116246093A
CN116246093A CN202211559261.8A CN202211559261A CN116246093A CN 116246093 A CN116246093 A CN 116246093A CN 202211559261 A CN202211559261 A CN 202211559261A CN 116246093 A CN116246093 A CN 116246093A
Authority
CN
China
Prior art keywords
commodity
historical
base
new
training
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
CN202211559261.8A
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.)
Beijing Zhongnengda Technology Co Ltd
Original Assignee
Beijing Zhongnengda Technology Co Ltd
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 Beijing Zhongnengda Technology Co Ltd filed Critical Beijing Zhongnengda Technology Co Ltd
Priority to CN202211559261.8A priority Critical patent/CN116246093A/en
Publication of CN116246093A publication Critical patent/CN116246093A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention relates to a method and a device for identifying a new commodity, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a first base picture corresponding to a new commodity to be added, and sending the first base picture to a commodity base; constructing a first support set based on a first base picture and a second base picture in the commodity base; acquiring a trade video, detecting commodity areas on key frame images in the trade video based on a trained commodity detection model, and acquiring commodity subgraphs; based on a pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify commodities corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method; the adopted few-sample classification model of the meta-learning framework does not need to be retrained when the commodity is new, thereby improving the new-loading and recognition speed.

Description

Commodity identification method and device after commodity is new, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for identifying a new commodity on a commodity, an electronic device, and a storage medium.
Background
In recent years, with the development of artificial intelligence technology, intelligent sales counter gradually replaces other traditional retail modes. The dynamic visual cabinet is gradually favored by the market due to the advantages of larger space utilization rate, more intelligent digital background operation and the like, and how to carry out new and identification on new commodities is one of important problems.
The current new commodity loading mode mainly adopts a customer to post or purchase a new commodity by oneself, collects a commodity data set, and retrains a commodity detection model according to the collected commodity data set. The early communication of the new mode is time-consuming, the later data acquisition requires a large amount of manpower, and when the model is trained, the training period is prolonged along with the increase of the number of new commodities, the model is more and more redundant, the requirement on calculation power is more and more high, and a plurality of inconveniences are brought to actual container operation. Therefore, how to quickly and conveniently perform new and identification on new commodities becomes a technical problem that needs to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a method and a device for identifying new commodities on a commodity, electronic equipment and a storage medium, which are used for solving the technical problems of long and complicated time consumption for identifying the new commodities on a dynamic visual cabinet.
In a first aspect, an embodiment of the present invention provides a method for identifying a new commodity on a commodity, including: acquiring a first base picture corresponding to a new commodity to be added, and sending the first base picture to a commodity base, wherein the commodity base also comprises a second base picture corresponding to a historical commodity; constructing a first support set based on a first base picture and a second base picture in the commodity base; acquiring a trade video, detecting commodity areas on key frame images in the trade video based on a trained commodity detection model, and acquiring commodity subgraphs; based on a pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify commodities corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method.
As an embodiment of the present invention, before the determining the correspondence between the commodity subgraph and the support set based on the pre-trained few-sample classification model, the method further includes: acquiring a historical trading video, detecting a historical commodity area on a key frame image in the historical trading video based on the trained commodity detection model, and acquiring a historical commodity subgraph; constructing a training set based on the historical commodity subgraph and a second base picture corresponding to the historical commodity; based on a meta learning method, training the few-sample classification model according to the training set to obtain the pre-trained few-sample classification model.
As an embodiment of the present invention, the meta-learning method, training the classification model with few samples according to the training set, includes: the following steps are repeatedly executed to obtain a plurality of meta-training tasks: randomly extracting a first preset number of historical commodities from the training set, wherein each type of historical commodity comprises a first preset number of historical commodity sample pictures to form a second support set, randomly extracting at least one historical commodity sample picture from the rest historical commodity sample pictures of each type of historical commodity to form a query set, and forming the meta-training task by the second support set and the query set; and training the few-sample classification model in batches based on the meta-training tasks to obtain the pre-trained few-sample classification model.
As an embodiment of the present invention, the method further includes: and after a preset time interval, acquiring historical transaction videos in the preset time interval, and updating the few-sample classification model based on the historical transaction videos in the preset time interval.
As an embodiment of the present invention, before the constructing the first support set based on the first base picture and the second base picture in the commodity base, the method further includes: determining the variety number of the new commodities to be added; and under the condition that the number of the types of the to-be-added new commodities does not exceed the second preset number of the types, executing the step of constructing a support set based on the first base picture and the second base picture in the commodity base.
As an embodiment of the present invention, the obtaining a first base picture corresponding to a new commodity to be added includes: and acquiring first base pictures which are not more than a second preset number of the new commodity to be acquired according to a preset shooting rule, wherein the preset shooting rule is determined according to the appearance type of the commodity.
As an embodiment of the invention, the commodity detection model is obtained based on training of an open source data set and a historical commodity data set of marked commodity categories.
As an embodiment of the present invention, after identifying the commodity corresponding to the commodity subgraph, the method further includes: and carrying out commodity expense settlement processing on the identified commodity.
In a second aspect, an embodiment of the present invention provides a device for identifying a new commodity on a commodity, including: the commodity image acquisition module is used for acquiring a first base picture corresponding to a new commodity to be uploaded and sending the first base picture to a commodity base, wherein the commodity base also comprises a second base picture corresponding to a historical commodity; the method is also used for constructing a first support set based on a first base picture and a second base picture in the commodity base; the commodity image acquisition module is also used for acquiring a trade video; the commodity subgraph detection module is used for detecting commodity areas on key frame images in the transaction video based on the trained commodity detection model to obtain commodity subgraphs; the commodity identification module is used for determining the corresponding relation between the commodity subgraph and the first support set based on a pre-trained few-sample classification model so as to identify commodities corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; a memory for storing a computer program; and the processor is used for realizing the method for identifying the new commodity on the commodity according to any one of the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for identifying a new item on an item according to any one of the first aspects.
According to the commodity identification method, the device, the electronic equipment and the storage medium after the commodity is newly loaded, the first base picture corresponding to the commodity to be loaded is obtained, and the first base picture is sent to the commodity base, and the commodity base further comprises the second base picture corresponding to the historical commodity; constructing a first support set based on a first base picture and a second base picture in the commodity base; acquiring a trade video, detecting commodity areas on key frame images in the trade video based on a trained commodity detection model, and acquiring commodity subgraphs; based on a pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify commodities corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method; the method has the advantages that through the few sample classification model of the meta-learning framework, the model is not required to be retrained for newly added commodity categories, and only a small number of base pictures of new commodities are required to be collected to form a support set, so that the new commodities in the trading video can be quickly and conveniently identified, and the new time and the labor cost are greatly reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method for identifying a new commodity on a commodity according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another method for identifying a new commodity according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for identifying a new commodity according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a commodity identification device after a new commodity is provided in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In recent years, with the development of artificial intelligence technology, intelligent sales counter gradually replaces other traditional retail modes, and becomes an unmanned retail terminal industry choice. Because the traditional vending machine has the defects of high cost, complicated operation and the like, the dynamic vision cabinet is gradually developed, the cost of the dynamic vision cabinet is reduced, the design is convenient and fast, the space utilization rate is higher, and the intelligent digital background operation and the like are realized.
Along with the technical innovation of the dynamic vision cabinet, a plurality of new challenges are brought, how to quickly update the commodity, and the problems of realizing the identification of the new commodity in the shortest time are plagued by a plurality of manufacturers. The main new mode at present is to collect commodity data sets by mailing or purchasing new commodities by customers and retrain commodity detection models according to the collected commodity data sets. The early communication of the new mode is time-consuming, the later data acquisition requires a large amount of manpower, and when the model is trained, as the number of new commodities is increased, the training period is prolonged, the model is more and more redundant, the requirement on calculation power is higher and higher, and the new 20 new commodities are taken as examples, and the new period approximately requires one week, so that the model is extremely unfavorable for operation.
Aiming at the technical problems, the technical conception of the invention is as follows: the commodity is identified by adopting the small sample classification model of the meta-learning framework, so that when a new commodity is on, the corresponding relation between the commodity subgraph in the new trading video and the new support set can be judged by only collecting the new commodity subgraph and the historical commodity subgraph to form the new support set through the small sample classification model, and the commodity category is identified.
Fig. 1 is a schematic flow chart of a method for identifying a new commodity on a commodity according to an embodiment of the present invention, where an execution subject is a device for identifying a new commodity on a commodity or an electronic device with a device for identifying a new commodity on a commodity deployed. As shown in fig. 1, the method for identifying the new commodity on the commodity comprises the following steps:
step S101, a first base picture corresponding to a new commodity to be added is obtained, and the first base picture is sent to a commodity base.
The commodity bottom library further comprises a second bottom library picture corresponding to the historical commodity.
Specifically, when a new commodity needs to be uploaded, an operator shoots a base picture of the new commodity, and uploads the shot base picture of the new commodity to a commodity base through a background new channel, wherein base pictures of various commodities (historical commodities and new commodities) are stored in the commodity base, and the base picture of each commodity is generally not more than 9.
In some embodiments, the step S101 of obtaining a first base picture corresponding to a new commodity to be added includes: and acquiring first base pictures which are not more than a second preset number of the new commodity to be acquired according to a preset shooting rule, wherein the preset shooting rule is determined according to the appearance type of the commodity.
Specifically, the commodity appearance types mainly include: the box packing, the bag packing, the cylinder (the canning, the bowl packing) and the like can determine different shooting rules according to different appearance types, for example, 6 faces can be shot on the front face, the side face and the bottom face of a certain box-packed commodity, and the combination of different side faces and angles can be used for shooting, 9 new commodity base pictures are obtained, more specifically, one picture is shot (nodding) right against the commodity, one picture is shot inwards from eight corners of the commodity respectively at 45 degrees, and 3 faces of the commodity should be shot as much as possible each time.
Step S102, a first support set is constructed based on a first base picture and a second base picture in the commodity base.
Specifically, the first support set includes a plurality of types of merchandise, each type of merchandise includes a small number (not more than a second preset number) of base pictures, and each picture is labeled with a corresponding merchandise category.
And step S103, acquiring a trade video, and detecting commodity areas on key frame images in the trade video based on a trained commodity detection model to acquire commodity subgraphs.
Specifically, the commodity detection model adopts a target detection algorithm, so that commodity areas in pictures or videos can be stably identified, and the commodity areas are cut to obtain commodity subgraphs. The commodity detection model can remove background useless information and focus on commodities.
In some embodiments, the commodity detection model is obtained based on training an open source data set and a historical commodity data set of labeled commodity categories. Specifically, a training set is constructed through open source data and a large number of commodity data sets collected by operators, and category labeling is carried out on the training set. Thousands of commodities are classified as a commodity target, and a general commodity detection model is trained.
Furthermore, the general commodity detection model adopts a yoloX model, a trunk network of the model is selected from an improved version based on a Darknet53, and the improved version is optimized on data preprocessing, and mainly adopts two data enhancement methods of Mosaic and Mixup. The mosaics data enhancement mainly comprises the steps of splicing part of 4 images into one image in a random cutting, overturning and splicing mode, and the mode has good advantages for detecting small targets such as commodities, enriches the background and simultaneously increases the diversity of samples. The Mixup is mainly to fill two commodity images up and down and fill left and right respectively and then superpose, and the mode can effectively perform data preprocessing on irregular commodity images, and is better suitable for feature extraction of a subsequent network. Through multiple optimizations of the yoloX model, the backbone network of the universal commodity detection model Backone link adopts a dark net53, the network freezes the full-connection layer of the last layer, and 52 convolution layers are used as the backbone. The characteristics of the feedforward network are continuously utilized for learning, and the fitting capacity of the model to commodity characteristics is improved.
In summary, by continuously optimizing the YoloX-dark 53 model, the small target of the commodity can be better detected in the final general commodity detection model, and the general commodity detection can be performed with higher recognition accuracy after the multi-iteration training of the millions-level commodity target frame.
Step S104, based on a pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify commodities corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method.
Specifically, the few-sample classification model is obtained through training by a meta-learning method, namely, in a meta-training stage, a sample support set is divided into a plurality of meta-training tasks to learn the generalization capability of the model under the condition of category change, and in the meta-learning stage, classification can be completed without changing the existing model. In the step, commodity subgraphs to be identified are analyzed through a support set constructed by a few sample classification model and a commodity base (a base picture comprising new commodities) to obtain the category of the commodity.
In some embodiments, after the step S104, further includes: and carrying out commodity expense settlement processing on the identified commodity. Specifically, the commodity in the trading video is identified according to the small sample classification model, so that the commodity category and the commodity quantity can be determined, and commodity expense settlement can be performed according to the commodity category and the commodity quantity.
In some embodiments, before the step S102, the method further includes: determining the variety number of the new commodities to be added; and under the condition that the number of the types of the to-be-added new commodities does not exceed the second preset number of the types, executing the step of constructing a support set based on the first base picture and the second base picture in the commodity base.
Specifically, determining the number M of types of the new commodities to be added, if M is very small (not exceeding the second preset type number, such as 20), directly adding the new commodities, otherwise adding the new commodities in batches, namely selecting the first number of the new commodities not exceeding 20 types for adding the new commodities, acquiring the trading video of the first number of the new commodities, iteratively updating a few-sample classification model according to the trading video of the first number of the new commodities, then selecting the second number of the new commodities not exceeding 20 types for adding the new commodities, and so on, thereby ensuring the accuracy of commodity identification.
According to the commodity identification method after the commodity is newly loaded, a first base picture corresponding to the commodity to be loaded is obtained, and the first base picture is sent to a commodity base, wherein the commodity base further comprises a second base picture corresponding to a historical commodity; constructing a first support set based on a first base picture and a second base picture in the commodity base; acquiring a trade video, detecting commodity areas on key frame images in the trade video based on a trained commodity detection model, and acquiring commodity subgraphs; based on a pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify commodities corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method; namely, the small sample classification model of the meta-learning framework adopted by the embodiment of the invention does not need retraining after the commodity is updated, and only needs to collect a small amount of new commodity base pictures and historical commodity base pictures as a support set of the small sample classification model, so that the commodity in the trading video can be rapidly identified, the updating time and the computing cost are greatly reduced, and the remote rapid updating can be provided by combining with a new system tool; in addition, before commodity identification, the commodity identification is focused on the commodity by a commodity detection model, so that the accuracy of commodity identification is further improved.
On the basis of the foregoing embodiments, fig. 2 is a schematic flow chart of another method for identifying a new commodity according to an embodiment of the present invention. As shown in fig. 2, the method for identifying the new commodity on the commodity comprises the following steps:
step S201, acquiring a historical trading video, detecting a historical commodity area on a key frame image in the historical trading video based on a trained commodity detection model, and acquiring a historical commodity subgraph.
And step S202, constructing a training set based on the historical commodity subgraph and a second base picture corresponding to the historical commodity.
Step 203, training the few-sample classification model through the training set based on the meta learning method to obtain the pre-trained few-sample classification model.
Step S204, a first base picture corresponding to a new commodity to be added is obtained, the first base picture is sent to a commodity base, and the commodity base further comprises a second base picture corresponding to a historical commodity.
Step S205, a first support set is constructed based on the first base picture and the second base picture in the commodity base.
And S206, acquiring a trade video, and detecting commodity areas on key frame images in the trade video based on a trained commodity detection model to acquire commodity subgraphs.
Step S207, based on the pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify the commodity corresponding to the commodity subgraph.
The implementation manners of steps S204 to S207 in this embodiment are similar to those of steps S101 to S104 in the foregoing embodiment, respectively, and will not be repeated here.
The difference from the previous embodiment is that this embodiment further defines the training process of the low sample classification model. In the embodiment, a historical transaction video is obtained, and a historical commodity area on a key frame image in the historical transaction video is detected based on the trained commodity detection model, so that a historical commodity subgraph is obtained; constructing a training set based on the historical commodity subgraph and a second base picture corresponding to the historical commodity; based on a meta learning method, training the few-sample classification model according to the training set to obtain the pre-trained few-sample classification model.
Specifically, a historical transaction video is obtained, a historical commodity area on a key frame image in the historical transaction video is extracted through a general commodity detection model, a historical commodity subgraph is obtained, the historical commodity subgraph and a base picture corresponding to the historical commodity (namely a second base picture) form a training set, the training set comprises N (N is a natural number) types of historical commodities, each type of historical commodity comprises less than 200 historical commodity samples, and about 5-9 base pictures corresponding to the historical commodity. And forming a plurality of meta training tasks according to the training set, and training the few-sample classification model.
In some embodiments, the step of protecting S203 includes: the following steps are repeatedly executed to obtain a plurality of meta-training tasks: the following steps are repeatedly executed to obtain a plurality of meta-training tasks: randomly extracting a first preset number of historical commodities from the training set, wherein each type of historical commodity comprises a first preset number of historical commodity sample pictures to form a second support set, randomly extracting at least one historical commodity sample picture from the rest historical commodity sample pictures of each type of historical commodity to form a query set, and forming the meta-training task by the second support set and the query set; and training the few-sample classification model in batches based on the meta-training tasks to obtain the pre-trained few-sample classification model.
Specifically, taking a historical commodity subgraph in a historical trading video and a bottom library picture of a historical commodity in a commodity bottom library as training sets through a universal commodity detection model, randomly extracting C (C is a natural number smaller than N) categories in the training sets according to meta-learning, wherein each category comprises K (because of small samples, K is a natural number not exceeding 9) (total C is K pictures) and inputting the K as a support set of a few-sample classification model; and extracting a batch of historical commodity pictures from the historical commodity pictures remaining in the C categories to serve as a query set of the few-sample classification model, namely determining a loss function of the few-sample classification model of the current meta-training task by using the query set. Each training round comprises meta-training tasks of a preset batch (batch size), a total loss function corresponding to the current training round is determined according to the loss function of each meta-training task corresponding to each training round, and iterative training is carried out until the total loss function converges or reaches the preset training round, so that a pre-trained few-sample classification model is obtained.
It should be noted that, in the meta-learning training process, the few-sample classification model is sampled to obtain different meta-tasks during each training round, so that the few-sample classification model training includes different category combinations, and the mechanism makes the few-sample classification model learn common parts in different meta-tasks. Meta-learning a few-sample classification model learned by this learning mechanism can also classify better in the face of new, unseen meta-tasks.
In some embodiments, the method further comprises: and after a preset time interval, acquiring historical transaction videos in the preset time interval, and updating the few-sample classification model based on the historical transaction videos in the preset time interval.
Specifically, data collection is carried out on the historical transaction video on line at regular intervals, and the small sample classification model is iterated as a support set (real data), so that the fitting capacity of the small sample classification model is continuously improved, and the reliability of the model is improved.
On the basis of the embodiment, a historical commodity subgraph is obtained by acquiring a historical trading video and detecting a historical commodity area on a key frame image in the historical trading video based on the trained commodity detection model; constructing a training set based on the historical commodity subgraph and a second base picture corresponding to the historical commodity; training the few-sample classification model according to the training set based on a meta-learning method to obtain the pre-trained few-sample classification model; the embodiment of the invention acquires the historical commodity subgraphs in the historical commodity video through acquiring the base pictures and the historical commodity video of the historical commodity, acquires the historical commodity subgraphs in the historical commodity video through a general commodity detection model, constructs a historical support set through the historical commodity data, trains to obtain a few sample classification model, and judges the corresponding relation between the commodity subgraphs and the support set; for the actual new commodity, uploading the bottom library photo of the new commodity to the commodity bottom library, acquiring commodity bottom library data to construct a new support set, extracting a key frame from online transaction video, acquiring a commodity subgraph through a general commodity detection model, judging the commodity category through a few sample classification model, and greatly reducing the new time and calculation cost without retraining the model for newly increasing the commodity category through a meta-learning frame, so that remote quick updating can be provided by matching with a new system tool.
In order to further understand the embodiment of the present invention, fig. 3 is a schematic flow chart of another new and identifying method on a commodity according to the embodiment of the present invention, and as shown in fig. 3, the method mainly includes a training link of a few sample classification model and a new commodity identifying link on the commodity:
training procedure for few sample classification model: acquiring historical commodity base pictures and historical transaction videos, wherein the historical commodity base pictures are acquired from a historical commodity base, and each historical commodity comprises about 5-9 base pictures; inputting the historical transaction video into a general commodity detection model to obtain a historical commodity subgraph; based on the historical commodity base pictures and the historical commodity subgraphs, a few-sample classification model is obtained through meta learning training. In addition, the historical trading video can be collected regularly and used for iterating the few-sample classification model, so that the fitting capacity of the few-sample classification model is improved continuously, and the reliability of a closed loop of the whole algorithm is improved.
Aiming at a commodity identification link after the commodity is new: acquiring a bottom library picture of the new commodity and uploading the picture to a commodity bottom library (which can be called as a new commodity bottom library); acquiring a trading video; inputting the trade video into a general commodity detection model to obtain a commodity subgraph; inputting the commodity subgraph and the new commodity base into a few sample classification model, carrying out commodity identification, and then carrying out commodity settlement on the identified commodity.
In summary, the embodiment of the invention firstly utilizes the few sample classification model of the meta-learning framework to carry out commodity updating, only needs a small amount of new bottom library pictures, automatically acquires online new product data to iterate, effectively solves the problem of long commodity updating period, and saves labor cost and time cost; secondly, model optimization is carried out by continuously acquiring data of online orders, so that the stability and the recognition rate of the model are improved, and the problem of false commodity recognition is better solved; finally, the embodiment is applied to the dynamic vision cabinet, so that the dynamic vision cabinet is more effectively adapted to the market, the traditional static cabinet and the spring cabinet can be replaced, and the stability and commercial value of the dynamic vision cabinet are improved.
Fig. 4 is a schematic structural diagram of a device for identifying a new commodity on a commodity according to an embodiment of the present invention, as shown in fig. 4, where the device 400 for identifying a new commodity on a commodity includes:
the commodity image acquisition module 401 is configured to acquire a first base picture corresponding to a new commodity to be uploaded, and send the first base picture to a commodity base, where the commodity base further includes a second base picture corresponding to a historical commodity; the method is also used for constructing a first support set based on a first base picture and a second base picture in the commodity base; the commodity image module 401 is further configured to acquire a transaction video; the commodity subgraph detection module 402 is configured to detect a commodity area on a key frame image in the trading video based on a trained commodity detection model, and obtain a commodity subgraph; the commodity identification module 403 is configured to determine a correspondence between the commodity subgraph and the first support set based on a pre-trained few-sample classification model, so as to identify a commodity corresponding to the commodity subgraph; the pre-trained few-sample classification model is obtained through training by a meta-learning method.
As an embodiment of the present invention, the commodity image obtaining module 401 is further configured to: acquiring a historical trading video; the commodity subgraph detection module 402 is further configured to: detecting a historical commodity area on a key frame image in the historical transaction video based on the trained commodity detection model to obtain a historical commodity subgraph; the commodity image obtaining module 401 is further configured to: constructing a training set based on the historical commodity subgraph and a second base picture corresponding to the historical commodity; the commodity identification module 403 is further configured to: based on a meta learning method, training the few-sample classification model according to the training set to obtain the pre-trained few-sample classification model.
As an embodiment of the present invention, the article identification module 403 is specifically configured to: the following steps are repeatedly executed to obtain a plurality of meta-training tasks: randomly extracting a first preset number of historical commodities from the training set, wherein each type of historical commodity comprises a first preset number of historical commodity sample pictures to form a second support set, randomly extracting at least one historical commodity sample picture from the rest historical commodity sample pictures of each type of historical commodity to form a query set, and forming the meta-training task by the second support set and the query set; and training the few-sample classification model in batches based on the meta-training tasks to obtain the pre-trained few-sample classification model.
As an embodiment of the present invention, the article identification module 403 is further configured to: and after a preset time interval, acquiring historical transaction videos in the preset time interval, and updating the few-sample classification model based on the historical transaction videos in the preset time interval.
As an embodiment of the present invention, the commodity image obtaining module 401 is further configured to: determining the variety number of the new commodities to be added; and under the condition that the number of the types of the to-be-added new commodities does not exceed the second preset number of the types, executing the step of constructing a support set based on the first base picture and the second base picture in the commodity base.
As an embodiment of the present invention, the commodity image obtaining module 401 is specifically configured to: and acquiring first base pictures which are not more than a second preset number of the new commodity to be acquired according to a preset shooting rule, wherein the preset shooting rule is determined according to the appearance type of the commodity.
As an embodiment of the invention, the commodity detection model is obtained based on training of an open source data set and a historical commodity data set of marked commodity categories.
As an embodiment of the present invention, the apparatus further includes a commodity settlement module 404, where the commodity settlement module 404 is configured to: and carrying out commodity expense settlement processing on the identified commodity.
The new commodity identification device provided by the embodiment of the present invention has similar principles and technical effects to those of the above embodiment, and will not be described here again.
As shown in fig. 5, an embodiment of the present invention provides an electronic device, which includes a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 perform communication with each other through the communication bus 504,
a memory 503 for storing a computer program;
in one embodiment of the present invention, the processor 501 is configured to implement the steps of the method for identifying a new commodity on a commodity provided in any one of the foregoing method embodiments when executing the program stored in the memory 503.
The implementation principle and technical effects of the electronic device provided by the embodiment of the invention are similar to those of the above embodiment, and are not repeated here.
The memory 503 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 503 has a storage space for program code for performing any of the method steps described above. For example, the memory space for the program code may include individual program code for implementing individual steps in the above method, respectively. The program code can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, compact Disk (CD), memory card or floppy disk. Such computer program products are typically portable or fixed storage units. The storage unit may have a memory segment or a memory space or the like arranged similarly to the memory 503 in the above-described electronic device. The program code may be compressed, for example, in a suitable form. In general, the storage unit comprises a program for performing the method steps according to an embodiment of the invention, i.e. code that can be read by a processor, such as 501 for example, which when run by an electronic device causes the electronic device to perform the various steps in the method described above.
Embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program which, when executed by a processor, performs the steps of the method for identifying a new commodity on a commodity described above.
The computer-readable storage medium may be embodied in the apparatus/means described in the above embodiments; or may exist alone without being assembled into the apparatus/device. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for identifying a new article on a commodity, comprising:
acquiring a first base picture corresponding to a new commodity to be added, and sending the first base picture to a commodity base, wherein the commodity base also comprises a second base picture corresponding to a historical commodity;
constructing a first support set based on a first base picture and a second base picture in the commodity base;
acquiring a trade video, detecting commodity areas on key frame images in the trade video based on a trained commodity detection model, and acquiring commodity subgraphs;
based on a pre-trained few sample classification model, determining the corresponding relation between the commodity subgraph and the first support set so as to identify commodities corresponding to the commodity subgraph;
the pre-trained few-sample classification model is obtained through training by a meta-learning method.
2. The method of claim 1, wherein prior to determining the correspondence of the commodity subgraph to the support set based on the pre-trained few-sample classification model, further comprising:
acquiring a historical trading video, detecting a historical commodity area on a key frame image in the historical trading video based on the trained commodity detection model, and acquiring a historical commodity subgraph;
constructing a training set based on the historical commodity subgraph and a second base picture corresponding to the historical commodity;
based on a meta learning method, training the few-sample classification model according to the training set to obtain the pre-trained few-sample classification model.
3. The method of claim 2, wherein the meta-learning based method training the low sample classification model according to the training set comprises:
the following steps are repeatedly executed to obtain a plurality of meta-training tasks:
randomly extracting a first preset number of historical commodities from the training set, wherein each type of historical commodity comprises a first preset number of historical commodity sample pictures to form a second support set, randomly extracting at least one historical commodity sample picture from the rest historical commodity sample pictures of each type of historical commodity to form a query set, and forming the meta-training task by the second support set and the query set;
and training the few-sample classification model in batches based on the meta-training tasks to obtain the pre-trained few-sample classification model.
4. A method according to claim 3, characterized in that the method further comprises:
and after a preset time interval, acquiring historical transaction videos in the preset time interval, and updating the few-sample classification model based on the historical transaction videos in the preset time interval.
5. The method of any of claims 1-4, wherein prior to constructing the first support set based on the first and second base pictures in the commodity base, further comprising:
determining the variety number of the new commodities to be added;
and under the condition that the number of the types of the to-be-added new commodities does not exceed the second preset number of the types, executing the step of constructing a support set based on the first base picture and the second base picture in the commodity base.
6. The method according to any one of claims 1-4, wherein the obtaining a first base picture corresponding to a new commodity to be added includes:
and acquiring first base pictures which are not more than a second preset number of the new commodity to be acquired according to a preset shooting rule, wherein the preset shooting rule is determined according to the appearance type of the commodity.
7. The method of any of claims 1-4, wherein the commodity detection model is obtained based on training an open source data set and a historical commodity data set of labeled commodity categories.
8. The method according to any one of claims 1 to 4, wherein after identifying the commodity corresponding to the commodity subgraph, further comprising:
and carrying out commodity expense settlement processing on the identified commodity.
9. A commodity identification apparatus after a commodity is newly placed thereon, comprising:
the commodity image acquisition module is used for acquiring a first base picture corresponding to a new commodity to be uploaded and sending the first base picture to a commodity base, wherein the commodity base also comprises a second base picture corresponding to a historical commodity; the method is also used for constructing a first support set based on a first base picture and a second base picture in the commodity base;
the commodity image acquisition module is also used for acquiring a trade video;
the commodity subgraph detection module is used for detecting commodity areas on key frame images in the transaction video based on the trained commodity detection model to obtain commodity subgraphs;
the commodity identification module is used for determining the corresponding relation between the commodity subgraph and the first support set based on a pre-trained few-sample classification model so as to identify commodities corresponding to the commodity subgraph;
the pre-trained few-sample classification model is obtained through training by a meta-learning method.
10. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method for identifying a new article on an article according to any one of claims 1 to 8 when executing a program stored in a memory.
11. A computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method for identifying a new article on an article according to any of claims 1-8.
CN202211559261.8A 2022-12-06 2022-12-06 Commodity identification method and device after commodity is new, electronic equipment and storage medium Pending CN116246093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211559261.8A CN116246093A (en) 2022-12-06 2022-12-06 Commodity identification method and device after commodity is new, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211559261.8A CN116246093A (en) 2022-12-06 2022-12-06 Commodity identification method and device after commodity is new, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116246093A true CN116246093A (en) 2023-06-09

Family

ID=86624932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211559261.8A Pending CN116246093A (en) 2022-12-06 2022-12-06 Commodity identification method and device after commodity is new, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116246093A (en)

Similar Documents

Publication Publication Date Title
AU2016332947B2 (en) Semi-automatic labelling of datasets
CN110570389B (en) Vehicle damage identification method and device
US20160350336A1 (en) Automated image searching, exploration and discovery
CN111061890B (en) Method for verifying labeling information, method and device for determining category
US11669843B2 (en) Automated planogram anomaly detection
US11823128B2 (en) Large-scale automated image annotation system
CN109840503B (en) Method and device for determining category information
CN109712324A (en) A kind of automatic vending machine image-recognizing method, good selling method and vending equipment
CN114419363A (en) Target classification model training method and device based on label-free sample data
CN115063084A (en) Inventory checking method and system for cigarette retail merchants
CN110826481A (en) Data processing method, commodity identification method, server and storage medium
CN114255377A (en) Differential commodity detection and classification method for intelligent container
CN110705620A (en) Display image detection method and device based on copying recognition and storage medium
CN113743455A (en) Target retrieval method, device, electronic equipment and storage medium
CN111401438B (en) Image sorting method, device and system
CN116246093A (en) Commodity identification method and device after commodity is new, electronic equipment and storage medium
US20210166028A1 (en) Automated product recognition, analysis and management
CN112307231A (en) Information processing method, model training method, feature library creating method and electronic equipment
CN114882020B (en) Product defect detection method, device, equipment and computer readable medium
CN113408546B (en) Single-sample target detection method based on mutual global context attention mechanism
CN113610832B (en) Logo defect detection method, device, equipment and storage medium
CN115565042A (en) Commodity image feature representation method and device, equipment, medium and product thereof
CN113465251B (en) Intelligent refrigerator and food material identification method
CN110287203B (en) Updating method and updating device for vending machine and vending machine
CN113780335A (en) Small sample commodity image classification method, device, equipment and storage medium

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