CN115761457A - Commodity identification method and device, electronic equipment and computer readable medium - Google Patents

Commodity identification method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN115761457A
CN115761457A CN202211478072.8A CN202211478072A CN115761457A CN 115761457 A CN115761457 A CN 115761457A CN 202211478072 A CN202211478072 A CN 202211478072A CN 115761457 A CN115761457 A CN 115761457A
Authority
CN
China
Prior art keywords
commodity
identification
identification result
model
image
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
CN202211478072.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.)
Yantai Chuangyi Software Co ltd
Original Assignee
Yantai Chuangyi Software 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 Yantai Chuangyi Software Co ltd filed Critical Yantai Chuangyi Software Co ltd
Priority to CN202211478072.8A priority Critical patent/CN115761457A/en
Publication of CN115761457A publication Critical patent/CN115761457A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

Abstract

The invention discloses a commodity identification method, a commodity identification device, electronic equipment and a computer readable medium. The method comprises the following steps: acquiring at least one overall image and at least one local image of a commodity to be identified; respectively identifying at least one integral image and at least one local image through a first identification model and a second identification model which are trained in advance to obtain a first identification result and a second identification result; determining at least one identification result of the to-be-selected commodity according to the first identification result and the second identification result; and selecting a target commodity identification result from the to-be-selected commodity identification results. The scheme of the invention can identify the commodities from two dimensions of the whole dimension and the local dimension, and obtains the identification result of the commodity to be selected according to the identification results of the two dimensions for the user to select, thereby improving the efficiency of weighing and settling the commodities while increasing the identification accuracy.

Description

Commodity identification method and device, electronic equipment and computer readable medium
Technical Field
The present invention relates to the field of intelligent identification technologies, and in particular, to a method and an apparatus for identifying a commodity, an electronic device, and a computer-readable medium.
Background
In the process of weighing and settling the articles by using the conventional electronic scale, the electronic scale can weigh and settle the articles only after a worker manually selects the types of the articles or manually inputs the corresponding article numbers, and the steps are complicated.
At present, many manufacturers have started to introduce AI weighing devices to weigh and bill commodities, and the principle of the AI weighing devices is to take an overall picture of the commodities, identify the types of the commodities, and bill the commodities according to the types and weights of the commodities.
However, the accuracy of recognition of the entire picture is not sufficient, and even if the recognition is wrong, the worker or the buyer still needs to manually input the type or number of the product, and therefore the efficiency of weighing and settling the product cannot be effectively improved. Therefore, there is a need for a way to achieve automatic and reliable identification of merchandise.
Disclosure of Invention
The invention provides a commodity identification method, a commodity identification device, electronic equipment and a computer readable medium, which can automatically and reliably identify commodities and improve the efficiency of weighing and settling the commodities.
According to an aspect of the present invention, there is provided an article identification method including:
acquiring at least one whole image and at least one local image of a commodity to be identified;
respectively identifying at least one integral image and at least one local image through a first identification model and a second identification model which are trained in advance to obtain a first identification result and a second identification result;
determining at least one identification result of the to-be-selected commodity according to the first identification result and the second identification result;
and selecting a target commodity identification result from the identification results of the commodities to be selected.
Optionally, the first recognition model is trained in the following manner:
acquiring integral image data of at least one sample;
marking the commodity category of the whole image data of each sample through a label to obtain a first commodity identification data set;
and inputting the first commodity identification data set into a preset network model for training until network loss is converged to obtain the first identification model.
Optionally, the second recognition model is trained in the following manner:
acquiring at least one piece of sample local image data;
labeling commodity areas in each sample local image data through a boundary frame, and labeling commodity categories of each commodity area through a label to obtain a second commodity identification data set;
and inputting the second commodity identification data set into a preset network model for training until network loss is converged to obtain the second identification model.
Optionally, the local image is obtained by:
acquiring an image to be cut of the commodity to be identified under at least one angle;
and cutting the image to be cut through the detection frame to obtain the local image.
Optionally, the first recognition result is determined by:
identifying the whole image through the first identification model to obtain at least one first probability value, wherein each first probability value corresponds to a preset commodity category and the probability that commodities in the first whole image belong to the commodity category;
and taking the first N first probability values with the probability values larger than a preset value as the first identification result, wherein N is a positive integer.
Optionally, the second recognition result is determined by the following method:
determining at least one bounding box containing a commodity from the local image through the second recognition model;
cutting the local image through the boundary frame to obtain at least one frame diagram to be identified;
identifying each block diagram to be identified, and determining a confidence value of each block diagram to be identified, wherein each confidence value comprises a preset commodity type and a confidence degree of the commodity in the block diagram to be identified, which belongs to the commodity type;
and taking the first M confidence values with the probability values larger than a preset value as the second recognition result, wherein M is a positive integer.
Optionally, determining at least one identification result of the to-be-selected commodity according to the first identification result and the second identification result, including:
weighting and summing the first identification result and the second identification result to obtain a second probability value of each preset commodity type;
and taking the commodities corresponding to the first L second probability values with the probability values higher than the preset value as the identification results of the commodities to be selected.
Optionally, the method further includes:
when the target commodity identification result does not exist in the to-be-selected commodity identification result, generating feedback information representing identification failure;
sending the feedback information to the first recognition model and/or the second recognition model so that the first recognition model and/or the second recognition model can self-learn through the feedback information.
According to another aspect of the present invention, there is provided an article recognition apparatus including:
the system comprises an image acquisition unit, a recognition unit and a recognition unit, wherein the image acquisition unit is used for acquiring at least one overall image and at least one local image of a commodity to be recognized;
the model identification result determining unit is used for respectively identifying at least one integral image and at least one local image through a first identification model and a second identification model which are trained in advance to obtain a first identification result and a second identification result;
the identification result determining unit of the goods to be selected is used for determining at least one identification result of the goods to be selected according to the first identification result and the second identification result;
and the target commodity identification result determining unit is used for selecting a target commodity identification result from the to-be-selected commodity identification results.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the article identification method of any embodiment of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the method for article identification according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, at least one overall image and at least one local image of a commodity to be identified are obtained, the at least one overall image and the at least one local image are respectively identified through a first identification model and a second identification model which are trained in advance, a first identification result and a second identification result are obtained, at least one commodity identification result to be selected is determined according to the first identification result and the second identification result, and a target commodity identification result is selected from the commodity identification results. According to the scheme of the invention, the commodities can be identified from the whole dimension and the local dimension, and the identification result of the commodity to be selected is obtained according to the identification results of the commodities and is used for the user to select, so that the commodity weighing and settlement efficiency is improved while the identification accuracy is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for identifying a commodity according to an embodiment of the present invention;
fig. 2 is a flowchart of a recognition model training method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a recognition model training method according to a second embodiment of the present invention;
fig. 4 is a flowchart of a method for determining an identification result of a to-be-selected commodity according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a commodity identification device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing the method for identifying a commodity according to the embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a commodity identification method according to an embodiment of the present invention, where the present embodiment is applicable to a case where bulk commodities are weighed and settled, the method may be implemented by a commodity identification device, and the commodity identification method may be implemented in a form of hardware and/or software, and the commodity identification device may be configured in a weighing apparatus. As shown in fig. 1, the method includes:
s110, acquiring at least one whole image and at least one local image of the commodity to be identified.
When a customer weighs, the selected commodities (mixed) filled in the transparent bag are placed on a weighing platform of a weighing device, at the moment, a whole image and a partial image of the commodities are obtained, the whole image refers to an image containing the whole bag and the commodities, the partial image refers to an image of an individual bulk commodity in the bag, for example, three bulk chocolates are placed in the bag, one partial image is obtained for each chocolate, and the whole image containing the three bulk chocolates is the whole image. The acquisition of the whole image and the partial image can be done by the camera of the weighing device itself.
And S120, respectively identifying the at least one integral image and the at least one local image through a pre-trained first identification model and a pre-trained second identification model to obtain a first identification result and a second identification result.
As the bulk commodities such as leisure snacks and the like are mixed and loaded into the same shopping bag for weighing and settlement when customers buy most of the commodities with the same price and different tastes, the leisure foods in a part of large supermarkets are various, the variety of single products can reach thousands, and the mixed loading of the commodities with the same price can reach thousands or even more. Therefore, the accuracy of commodity identification is greatly reduced, the data acquisition difficulty is very high, and the data acquisition of various combinations is difficult to achieve. The overall image recognition and the local image recognition in the scheme are realized through the recognition model, and the recognition is carried out through two sets of schemes, so that the accuracy is higher compared with the conventional method that the recognition is carried out only by shooting one image and the recognition is carried out through the images with overall and local dimensions.
S130, determining at least one identification result of the to-be-selected commodities according to the first identification result and the second identification result.
And S140, selecting a target commodity identification result from the identification results of the commodities to be selected.
The identification result of the goods to be selected is one or more identification results of the goods to be selected obtained by combining the first identification result and the second identification result, the identification results are used as alternatives to be provided for customers, the customers can select the goods which are already put in the bags, for example, after the identification results of the goods to be selected are determined, the identification results of the goods to be selected are displayed through a display screen of the weighing equipment, the customers select the goods which have been selected, and the weighing equipment performs settlement according to the prices of the selected goods after weighing.
According to the technical scheme, at least one overall image and at least one local image of a commodity to be recognized are obtained, the at least one overall image and the at least one local image are recognized through a first recognition model and a second recognition model which are trained in advance respectively to obtain a first recognition result and a second recognition result, at least one commodity to be selected recognition result is determined according to the first recognition result and the second recognition result, and a target commodity recognition result is selected from the commodity to be selected recognition results. The scheme of the invention can identify the commodities from two dimensions of the whole dimension and the local dimension, and obtains the identification result of the commodity to be selected according to the identification results of the two dimensions for the user to select, thereby improving the efficiency of weighing and settling the commodities while increasing the identification accuracy.
Example two
Fig. 2 is a flowchart of a recognition model training method according to a second embodiment of the present invention, and further explanation is performed on the basis of the second embodiment of the present invention and the foregoing embodiment of the present invention to train a first recognition model. As shown in fig. 2, the method includes:
s210, acquiring integral image data of at least one sample.
Wherein, sample whole image data can be acquireed through the camera of setting on weighing-appliance, gather the whole image of singleness through weighing-appliance multi-angle is diversified, need not to load in mixture and gather the image, for example, set up a camera respectively around weighing platform of weighing-appliance, perhaps set up the camera that can center on weighing platform optional equipment, place the weighing platform with the commodity on, shoot the whole image of multi-angle as sample whole image data.
S220, marking the commodity category of the whole image data of each sample through a label to obtain a first commodity identification data set.
After the sample overall image data is obtained, the sample image data is marked through the label according to the commodity category of the corresponding commodity, for example, if the shot sample overall image data is an apple, the label of the apple is added to the sample overall image data and is used for verifying after the model obtains the recognition result in training. The labeling through the label can be realized through a LabelImg, wherein the LabelImg is a graphical image annotation tool and is written by Python, and Qt is used as a graphical interface of the LabelImg. The annotations were saved as XML files in PASCALVOC format, using ImageNet.
And S230, inputting the first commodity identification data set into a preset network model for training until network loss is converged to obtain the first identification model.
After a first commodity identification data set is obtained, firstly loading a pre-training model and initializing network model parameters; and inputting the marked first commodity identification data set into a network model for training, stopping training when network loss is converged, obtaining a model weight file, and loading the trained weight file. The weight file stores the weights of each layer of the trained network, namely the weights are trained through a training set. After training, only the weight value is loaded when the method is applied.
Fig. 3 is a flowchart of a recognition model training method according to a second embodiment of the present invention, which is used for training a second recognition model. As shown in fig. 3, the method includes:
and S310, acquiring local image data of at least one sample.
When a customer weighs, a selected commodity (mixed package) filled into a transparent bag is placed on a weighing platform, a plurality of single products are usually placed in the bag, and when sample local image data are obtained, the single products can be cut from an overall image or a commodity image under a certain angle can be obtained.
S320, labeling the commodity area in each sample local image data through a boundary frame, and labeling the commodity category of each commodity area through a label to obtain a second commodity identification data set.
In order to identify the commodity single body, it is necessary to detect each single product in the bag as much as possible, that is, a part of the picture including the single product is marked by a border frame, the border frame is used for indicating a part where the commodity exists, and the area is a rectangular area.
S330, inputting the second commodity identification data set into a preset network model for training until network loss is converged to obtain the second identification model.
The first recognition model and the second recognition model in the embodiment of the invention can be obtained by training different network recognition models, and can also share the same network recognition model.
In the second embodiment of the present invention, the local image is obtained as follows:
acquiring an image to be cut of the commodity to be identified under at least one angle;
and cutting the image to be cut through the detection frame to obtain the local image.
In the second embodiment of the present invention, the first recognition result is determined as follows:
identifying the whole image through the first identification model to obtain at least one first probability value, wherein each first probability value corresponds to a preset commodity category and the probability of the commodity in the first whole image belonging to the commodity category;
and taking the first N first probability values with the probability values larger than the preset value as the first identification result, wherein N is a positive integer.
The integral image is input into the first recognition model for recognition, a plurality of recognition results are obtained through integral recognition, the first recognition result shows the probability of belonging to a certain commodity, the preset commodity categories are multiple, the probability value can be identified through the value range from 0 to 1, the 0 identification completely does not belong to the category, the 1 identification completely belongs to the category, and other value identifications belong to the possibility of belonging to the category. We take the first K recognition results from the large rank by probability as the first recognition results (K < = N), which have a probability distribution of { p1, p 2.
In the second embodiment of the present invention, the second recognition result is determined as follows:
determining at least one bounding box containing goods from the local image through the second recognition model;
cutting the local image through the boundary frame to obtain at least one frame diagram to be identified;
identifying each block diagram to be identified, and determining a confidence value of each block diagram to be identified, wherein each confidence value comprises a preset commodity type and a confidence degree of the commodity in the block diagram to be identified, which belongs to the commodity type;
and taking the first M confidence values with the probability values larger than a preset value as the second recognition result, wherein M is a positive integer.
After the local images are obtained, the commodities are detected through the boundary frame, redundant boundary frames are filtered out through means such as NMS (network management system) and the like, and the block diagram to be identified is cut according to the boundary frame. In order to improve the detection precision, means such as equal-proportion cutting can be adopted, and the collected images can be cut into countless small images in equal proportion according to requirements (threshold values). And finally, inputting the small pictures cut by the two methods into a second recognition model for commodity recognition. And after receiving the block diagram to be recognized, the second recognition model recognizes through the model file, recognizes the commodity category to which the block diagram to be recognized belongs, and calculates the confidence coefficient of each single item according to a certain weight.
For example, in the case of obtaining M blocks to be recognized, the M blocks to be recognized are recognized as L categories, each of which has a confidence level,
Figure BDA0003960044520000101
i 1 ,i 2 ,...i L a total of L categories are labeled for the category. Taking a threshold value according to the confidence coefficient alpha, counting the number of targets which are larger than alpha and belong to a certain category to be used
Figure BDA0003960044520000102
s ∈ {0, 1.., L } representation with an average confidence of q s
EXAMPLE III
Fig. 4 is a flowchart of a method for determining a recognition result of a candidate commodity according to a third embodiment of the present invention, and as shown in fig. 4, the method includes:
s410, carrying out weighted summation on the first identification result and the second identification result to obtain a second probability value of each preset commodity type.
And S420, taking the commodities corresponding to the first L second probability values with the probability values higher than the preset value as the identification results of the commodities to be selected.
The identification result of the commodity to be selected is comprehensively judged through a first identification result representing the whole and a second identification result representing the individual, and the probability P of belonging to a certain category s is recalculated according to the second identification result by the following method s 。p s =f(p s ,T s ,q s )。
Where f is some linear or non-linear function, such as a weighted sum function or other functions that can be used for comprehensive judgment.
Such as:
Figure BDA0003960044520000111
where a is some constant between 0 and 1, such as 0.5, etc. And after the probability of each category is calculated, sorting the results according to the probability and outputting the results. If the confidence corresponding to a certain category s is not in the global recognition front N, the global recognition confidence of the category s is 0.
And according to the judgment, sorting from high to bottom according to the probability, setting a threshold value according to a user, outputting a result exceeding the threshold value, and finally outputting the result to a display picture for the user to finally select.
If the to-be-selected commodity identification result shows the single products with different selling prices, for example, chocolate with different brands, the prices of the two kinds of chocolate are different, and in order to prevent settlement errors, a customer can be reminded to split the single products with different prices through prompt information.
In the third embodiment of the present invention, the method further includes:
when the target commodity identification result does not exist in the to-be-selected commodity identification result, generating feedback information representing identification failure;
sending the feedback information to the first recognition model and/or the second recognition model so that the first recognition model and/or the second recognition model can self-learn through the feedback information.
When the identification result of the commodity to be selected does not have the commodity selected by the customer, the identification result shows that the error occurs, the current image of the commodity with the error is collected according to the function of the user and the selection confirmation result of the user, the current image is used as a learning sample for updating the identification model, the model feature file is updated or the model is input for retraining to improve the identification precision, the precision of the user is higher and higher in the using process, and even the time for inputting the initial commodity of an operator can be saved by the function.
The scheme of the invention can be applied to large-scale shopping places such as business and supermarket shopping places, weighing equipment is not required to be independently deployed, identification and weighing of bulk commodities can be completed through a single device, personnel cost is reduced, cash register efficiency is improved, and compared with the prior art, queuing time can be shortened, and shopping experience is improved. The commodity identification is completed without additionally sticking an RFID label, so that the cost is greatly saved, and the large-batch unfolding is convenient.
Example four
Fig. 5 is a schematic structural diagram of a product identification device according to a fourth embodiment of the present invention. As shown in fig. 5, the apparatus includes:
an image obtaining unit 510, configured to obtain at least one overall image and at least one partial image of a product to be identified;
a model identification result determining unit 520, configured to respectively identify at least one of the whole images and at least one of the local images through a first identification model and a second identification model trained in advance, so as to obtain a first identification result and a second identification result;
a candidate commodity identification result determining unit 530, configured to determine at least one candidate commodity identification result according to the first identification result and the second identification result;
and the target commodity identification result determining unit 540 is configured to select a target commodity identification result from the candidate commodity identification results.
In the fourth embodiment of the present invention, the commodity identification device further includes: a model training unit 550;
a model training unit 550, configured to train the first recognition model by:
acquiring integral image data of at least one sample;
marking the commodity category of the whole image data of each sample through a label to obtain a first commodity identification data set;
and inputting the first commodity identification data set into a preset network model for training until network loss is converged to obtain the first identification model.
In the fourth embodiment of the present invention, the model training unit 550 is configured to train the second recognition model by:
acquiring at least one piece of sample local image data;
labeling commodity areas in each sample local image data through a boundary frame, and labeling commodity categories of each commodity area through a label to obtain a second commodity identification data set;
and inputting the second commodity identification data set into a preset network model for training until the network loss is converged to obtain the second identification model.
In the fourth embodiment of the present invention, the model identification result determining unit 520 is configured to determine the first identification result by:
identifying the whole image through the first identification model to obtain at least one first probability value, wherein each first probability value corresponds to a preset commodity category and the probability that commodities in the first whole image belong to the commodity category;
and taking the first N first probability values with the probability values larger than a preset value as the first identification result, wherein N is a positive integer.
In the fourth embodiment of the present invention, the model identification result determining unit 520 is configured to determine the second identification result by:
determining at least one bounding box containing goods from the local image through the second recognition model;
cutting the local image through the boundary frame to obtain at least one frame diagram to be identified;
identifying each block diagram to be identified, and determining a confidence value of each block diagram to be identified, wherein each confidence value comprises a preset commodity category and a confidence degree of the commodity in the block diagram to be identified, which belongs to the commodity category;
and taking the first M confidence values with the probability values larger than a preset value as the second recognition result, wherein M is a positive integer.
In the fourth embodiment of the present invention, the to-be-selected merchandise identification result determining unit 530 is configured to execute:
weighting and summing the first identification result and the second identification result to obtain a second probability value of each preset commodity type;
and taking the commodities corresponding to the first L second probability values with the probability values higher than the preset value as the identification results of the commodities to be selected.
In the fourth embodiment of the present invention, the target product identification result determining unit 540 is further configured to:
when the target commodity identification result does not exist in the to-be-selected commodity identification result, generating feedback information representing identification failure;
sending the feedback information to the first recognition model and/or the second recognition model so that the first recognition model and/or the second recognition model can self-learn through the feedback information.
The commodity identification device provided by the embodiment of the invention can execute the commodity identification method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
FIG. 6 illustrates a schematic structural diagram of an electronic device 10 that may be used to implement an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM12, and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the article identification method.
In some embodiments, the article identification method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the article identification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the article identification method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A commodity identification method is characterized by comprising the following steps:
acquiring at least one whole image and at least one local image of a commodity to be identified;
respectively identifying at least one integral image and at least one local image through a first identification model and a second identification model which are trained in advance to obtain a first identification result and a second identification result;
determining at least one identification result of the to-be-selected commodity according to the first identification result and the second identification result;
and selecting a target commodity identification result from the to-be-selected commodity identification results.
2. The method of claim 1, wherein the first recognition model is trained by:
acquiring integral image data of at least one sample;
marking the commodity category of the whole image data of each sample through a label to obtain a first commodity identification data set;
inputting the first commodity identification data set into a preset network model for training until network loss is converged to obtain a first identification model;
and/or the presence of a gas in the gas,
the second recognition model is trained in the following way:
acquiring at least one piece of sample local image data;
labeling commodity areas in each sample local image data through a boundary frame, and labeling commodity categories of each commodity area through a label to obtain a second commodity identification data set;
and inputting the second commodity identification data set into a preset network model for training until the network loss is converged to obtain the second identification model.
3. The method of claim 1, wherein the local image is obtained by:
acquiring an image to be cut of the commodity to be identified under at least one angle;
and cutting the image to be cut through the detection frame to obtain the local image.
4. The method of claim 1, wherein the first recognition result is determined by:
identifying the whole image through the first identification model to obtain at least one first probability value, wherein each first probability value corresponds to a preset commodity category and the probability of the commodity in the first whole image belonging to the commodity category;
and taking the first N first probability values with the probability values larger than a preset value as the first identification result, wherein N is a positive integer.
5. The method of claim 1, wherein the second recognition result is determined by:
determining at least one bounding box containing a commodity from the local image through the second recognition model;
cutting the local image through the boundary frame to obtain at least one frame diagram to be identified;
identifying each block diagram to be identified, and determining a confidence value of each block diagram to be identified, wherein each confidence value comprises a preset commodity type and a confidence degree of the commodity in the block diagram to be identified, which belongs to the commodity type;
and taking the first M confidence values with the probability values larger than a preset value as the second recognition result, wherein M is a positive integer.
6. The method according to claim 1, wherein determining at least one candidate item identification result according to the first identification result and the second identification result comprises:
weighting and summing the first identification result and the second identification result to obtain a second probability value of each preset commodity type;
and taking the commodities corresponding to the first L second probability values with the probability values higher than the preset value as the identification results of the commodities to be selected.
7. The method of claim 1, further comprising:
when the target commodity identification result does not exist in the to-be-selected commodity identification result, generating feedback information representing identification failure;
sending the feedback information to the first recognition model and/or the second recognition model so that the first recognition model and/or the second recognition model can self-learn through the feedback information.
8. An article identification device, comprising:
the image acquisition unit is used for acquiring at least one overall image and at least one local image of the commodity to be identified;
the model identification result determining unit is used for respectively identifying at least one integral image and at least one local image through a first identification model and a second identification model which are trained in advance to obtain a first identification result and a second identification result;
the identification result determining unit of the goods to be selected is used for determining at least one identification result of the goods to be selected according to the first identification result and the second identification result;
and the target commodity identification result determining unit is used for selecting a target commodity identification result from the to-be-selected commodity identification results.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the article identification method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the method of article identification of any one of claims 1-7 when executed.
CN202211478072.8A 2022-11-23 2022-11-23 Commodity identification method and device, electronic equipment and computer readable medium Pending CN115761457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211478072.8A CN115761457A (en) 2022-11-23 2022-11-23 Commodity identification method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211478072.8A CN115761457A (en) 2022-11-23 2022-11-23 Commodity identification method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN115761457A true CN115761457A (en) 2023-03-07

Family

ID=85336379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211478072.8A Pending CN115761457A (en) 2022-11-23 2022-11-23 Commodity identification method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN115761457A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117409422A (en) * 2023-12-15 2024-01-16 吉林大学 Oracle retrieval method based on handwriting input

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117409422A (en) * 2023-12-15 2024-01-16 吉林大学 Oracle retrieval method based on handwriting input

Similar Documents

Publication Publication Date Title
US20220270063A1 (en) Produce and bulk good management within an automated shopping environment
CN108922026B (en) Replenishment management method and device for vending machine and user terminal
CN110245580B (en) Method, device and equipment for detecting image and computer storage medium
CN104296852A (en) Self-service weighing method and apparatus for fruit and vegetable commodities
CN111222389B (en) Analysis method and system for commodity on super commodity shelf
CN110750697B (en) Merchant classification method, device, equipment and storage medium
CN110942293B (en) Method, device, storage medium and system for processing article information
US11748787B2 (en) Analysis method and system for the item on the supermarket shelf
CN115761457A (en) Commodity identification method and device, electronic equipment and computer readable medium
CN110826481A (en) Data processing method, commodity identification method, server and storage medium
CN113793081A (en) Storage monitoring method and device, computer readable medium and electronic equipment
CN110009154B (en) Refund prediction method and device, terminal equipment and storage medium
CN111753614A (en) Commodity shelf monitoring method and device
CN114282818A (en) Bright area electronic tag control method for maximizing sales
CN114048383A (en) Information recommendation method and device, electronic equipment and medium
CN113610460A (en) Article packaging method, apparatus, electronic device and computer readable medium
CN113160414A (en) Automatic identification method and device for remaining amount of goods, electronic equipment and computer readable medium
CN111928934A (en) Intelligent reading system, reading method and electronic scale
CN111310618A (en) Article identification method and device, electronic equipment and readable storage medium
CN111833085A (en) Method and device for calculating price of article
CN114078299A (en) Commodity settlement method, commodity settlement device, electronic equipment and medium
CN111159398B (en) Method and device for identifying merchant types
US11727470B2 (en) Optical scanning for weights and measures
CN114758233A (en) Commodity weighing method, device, equipment and storage medium
CN113297887A (en) Weighing method, device and system

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