Commodity authenticity identification method and system based on convolutional network, and computer medium
Through image recognition technology based on convolutional neural networks, two convolutional neural networks are used to calculate the similarity between product images and real images, and combined with folder name matching, the accuracy and efficiency of product authenticity identification in the existing technology are solved. problem, achieving fast and accurate judgment of product authenticity.
Patent Information
- Application Number
- CN202310342610.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology lacks a product authenticity identification solution based on image recognition technology, making it difficult for users to accurately identify counterfeit and shoddy products, and reliance on naked eye identification leads to misjudgment and low efficiency.
An image recognition method based on convolutional neural networks is used to collect product images, calculate the similarity with real product images, use two convolutional neural networks to extract features and calculate the similarity, and combine folder name matching to improve matching efficiency. Output the recognition results.
It greatly improves the accuracy and speed of product authenticity judgment, reduces computing resource consumption and time, reduces user misjudgment rate, and provides an efficient intelligent judgment system.
Smart Images

Figure CN118735531A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition in the field of computer vision, and more specifically, to a method, system and computer medium for identifying the authenticity of goods based on a convolutional neural network. Background Art
[0003] With the development of computer vision, image recognition technology has also developed rapidly and has been applied to many scenarios, such as face recognition, handwriting recognition, object recognition, etc. The recognition accuracy of various targets has also been improved to a very high standard. However, there is no solution in the prior art to use image recognition technology for product authenticity identification.
[0004] Based on the development of image recognition technology, it is completely feasible to apply image recognition to authenticity identification. Because there are always various minor differences between the packaging of authentic and fake items, such as differences in product text, product images, or other minor differences that are not easily perceived by the naked eye, these can be compared using image recognition technology, and authenticity can be determined based on the differences.
[0005] A convolutional neural network is a neural network model specifically used for image recognition. It uses multiple layers such as convolutional layers, pooling layers, and fully connected layers. It can extract higher-level feature representations from the input image data and is used in image classification, object detection, face recognition, autonomous driving and other fields.
[0006] Therefore, there is an urgent need in the art for a commodity authenticity identification method, system and computer-readable medium based on image recognition technology, more specifically, based on a convolutional neural network. Summary of the invention
[0007] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description given later.
[0008] In response to the above problems, this application proposes a method for identifying the authenticity of goods based on convolutional neural networks. On the one hand, this method allows users to no longer rely entirely on the naked eye to determine whether the goods are counterfeit or shoddy. Users only need to take out their mobile phones to take pictures of the goods to determine the authenticity, thereby freeing the user's eyes and providing convenience for the user's life. On the other hand, the accuracy of the human eye will always have misjudgment behavior or be unable to distinguish many subtle differences. Many merchants use the user's naked eye to design counterfeit and shoddy goods, such as "Yueli Yue", "Kangshuai Fu", "Lei Bi", etc., and for example, the size difference of a few millimeters of text or pictures outside the range that the human eye can recognize. Users will buy pirated or counterfeit goods because they do not notice the difference, resulting in economic losses. The intelligent discrimination system relies on the machine's image recognition technology, which greatly improves the accuracy and speed of judgment compared to the naked eye.
[0009] According to a first aspect of the present application, a method for identifying the authenticity of a commodity based on a convolutional neural network is provided, the method comprising the following steps:
[0010] Collect images of products;
[0011] Upload images of your products;
[0012] The name of the product submitted;
[0013] Match the image folder based on the product name;
[0014] Calculating the similarity of images of products; and
[0015] Output the recognition result.
[0016] According to a preferred embodiment of the present application, collecting and uploading images of commodities includes collecting images using a camera, a mobile phone or other collecting devices and uploading the images to a system server backend.
[0017] According to a preferred embodiment of the present application, calculating the similarity of the product image includes: calculating the similarity between the product image and each image in the folder; and averaging all similarities to obtain the similarity of the product image.
[0018] According to a preferred embodiment of the present application, if the similarity exceeds a predetermined threshold, the product is judged to be authentic and the recognition result is output as true; otherwise, the product is judged to be false and the recognition result is output as false.
[0019] According to a preferred embodiment of the present application, calculating the similarity of the images of the commodities includes: calculating the similarity of the images of the commodities using two convolutional networks.
[0020] According to a preferred embodiment of the present application, using two convolutional networks to calculate the similarity of product images includes: using the image of the product and the real product image as input to the two convolutional networks respectively; using the two convolutional networks to extract features of the product image and the real product image respectively; and calculating the similarity of the product image and the real product image based on the loss function.
[0021] According to the second aspect of the present application, a system for identifying the authenticity of goods based on a convolutional neural network is provided, the system comprising the following modules:
[0022] A product image acquisition module, used to acquire images of products;
[0023] The product image upload module is used to upload the product image to the server backend of the system;
[0024] The product name submission module is used to submit the product name to the server backend of the system;
[0025] A text matching module is used to match the image folder where the product is located based on its name;
[0026] An image similarity calculation module, used to calculate the similarity of product images; and
[0027] The result output module is used to output the recognition results.
[0028] According to a third aspect of the present application, a computer readable medium having computer instructions stored thereon is provided, and when the instructions are executed by a computer, the method as described above is executed.
[0029] To achieve the foregoing and related ends, the one or more aspects include the features fully described below and particularly pointed out in the appended claims. The following description and drawings set forth in detail certain illustrative features of the one or more aspects. However, these features are merely indicative of several of the various ways in which the principles of the various aspects may be employed, and this description is intended to cover all such aspects and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to understand in detail the manner in which the above-stated features of the present application are used, a more specific description of the above briefly summarized contents may be made with reference to various aspects, some of which are illustrated in the accompanying drawings. However, it should be noted that the accompanying drawings illustrate only certain typical aspects of the present application and should not be considered to limit its scope, as the present description may allow for other equally effective aspects.
[0031] In the attached picture:
[0032] Figure 1 is a flow chart illustrating a method 100 for identifying authenticity of goods based on a convolutional neural network according to an embodiment of the present application;
[0033] Figure 2 It is based on the explanation Figure 1 A network diagram of image similarity calculation performed by the method 100; and
[0034] Figure 3 It is a structural block diagram illustrating a product authenticity identification system 300 based on a convolutional neural network according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] The detailed description set forth below in conjunction with the accompanying drawings is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein may be practiced. This detailed description includes specific details to provide a thorough understanding of the various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well-known components are shown in block diagram form in order to avoid diluting such concepts.
[0036] It is to be understood that other embodiments will be apparent based on the present disclosure, and that system, structural, process, or mechanical changes may be made without departing from the scope of the present disclosure. Figure 1 and 3 , aspects are described with reference to one or more components and one or more methods that can perform the actions or functions described herein. In one aspect, the term "module" as used herein can be one of the parts that make up a system, can be hardware or software or some combination thereof, and can be divided into other components. Although the following Figure 1 The operations described in the present invention are presented in a particular order and / or as being performed by example components, but it should be understood that the order of these actions and the components performing the actions may vary depending on the implementation. In addition, it should be understood that the following actions or functions may be performed by a specially programmed processor, a processor executing specially programmed software or computer-readable media, or by any other combination of hardware components and / or software components capable of performing the described actions or functions.
[0037] The present invention realizes a counterfeit and shoddy goods discrimination system by utilizing the image recognition technology of a convolutional neural network and a pre-stored object image library.
[0038] The system uses the image recognition and matching algorithm implemented by the convolutional neural network to calculate the similarity between the input product image and the images in the product image library pre-stored by the system. If the image similarity is high and exceeds the threshold set by the system, the product is judged to be authentic. If the image similarity is lower than the threshold, the product is judged to be fake.
[0039] There are many methods for calculating image similarity in the prior art. These methods are mainly divided into two methods: traditional matching methods and matching methods based on deep learning. Traditional matching methods can be implemented using openCV, but the recognition of traditional methods is limited. In order to further improve the accuracy of image similarity calculation, the solution of this application uses a deep learning network to implement it.
[0040] In view of the fact that the appearance of counterfeit and shoddy goods is very similar to that of genuine goods, in order to reduce the amount of calculation, this application combines two convolutional neural networks together, and they share network weights. Figure 2 FIG. 4 shows a network diagram of an image similarity calculation process using the method 100 according to the present application.
[0041] like Figure 2 As shown in , the genuine image and the image to be matched are used as the two inputs of the network. The two input images are assigned to network 1 and network 2 respectively, and the features of the two images are extracted using two convolutional neural networks (see the following formula (2)). Finally, the similarity of the back vectors of the two networks, that is, the similarity of the two input images, can be evaluated by calculating the loss function loss (see the following formula (3)).
[0042] The cosine similarity calculation method is used to calculate the similarity of two pictures:
[0043]
[0044] Where x and y are the feature values extracted from the two images through the convolutional neural network.
[0045] The calculation formula for the final extracted convolution feature value (i.e. x and y mentioned in the above formula) is as follows:
[0046]
[0047] Where X is the input matrix after the image is discretized, W is the convolution matrix, s is the final extracted convolution eigenvalue, m and n are the coordinates of the center point of the convolution kernel, and w is the coordinate of the convolution matrix W.
[0048] The loss function used for network training is as follows:
[0049]
[0050] Among them, Y = {0, 1} indicates whether the sample pair is similar, Y = 0 indicates that the sample pair is similar, and Y = 1 indicates that the sample pair is not similar; m refers to the mean square error; N is batch_size: it indicates the number of data (or samples) passed to the program for training at a single time.
[0051] in:
[0052]
[0053] The number of genuine sample data sets must be large enough to obtain relatively accurate results, but it is very time-consuming to match the pictures uploaded by users with all the pictures in the data set. In order to improve the matching speed, this system adds a data set classification preprocessing step. The data sets of the same product are placed in the same folder, and the folder is named after the product. In this way, when matching, the system does not need to match all the pictures in the data set, but only needs to accurately match the data set of the uploaded picture. When users upload pictures, they need to submit the product name, and then the system will identify it, which can greatly shorten the matching time.
[0054] Figure 3 The structural block diagram of a product authenticity identification system 300 based on a convolutional neural network according to an embodiment of the present application is explained in FIG.
[0055] like Figure 3 As shown in the figure, the system mainly includes the following modules:
[0056] A product image acquisition module, used to acquire images of products;
[0057] The product image upload module is used to upload the product image to the server backend of the system;
[0058] The product name submission module is used to submit the product name to the server backend of the system;
[0059] A text matching module is used to match the image folder where the product is located based on its name;
[0060] An image similarity calculation module, used to calculate the similarity of product images; and
[0061] The result output module is used to output the recognition results.
[0062] The following is combined with Figure 1 -3 and the specific implementation methods of the present application to describe the solution of the present application in detail.
[0063] Taking "Yue Li Yue" and "Oreo" cookies as examples, the specific implementation process of method 100 is described in detail. The specific process is as shown in the attached figure. Figure 1 as shown in .
[0064] Step 1: Collect product images
[0065] Users can call up the camera function in the system or use their personal mobile phones to take photos of "Yueliyue" products.
[0066] Step 2: Upload product images
[0067] After taking the photo, the system uploads the photo to the system server background.
[0068] Step 3: Submit product name
[0069] The user submits the product name to the system server backend, which collects the data entered by the user to extract the product name.
[0070] Step 4: Text matching
[0071] Because the user submitted the product name "Oreo", only all images in the "Oreo" folder are matched.
[0072] Step 5: Calculate image similarity
[0073] The "Yue Li Yue" photo obtained by taking a photo is matched with all the photos in the "Oreo" folder, and all the similarities obtained are averaged to obtain the final similarity. Obviously, the final similarity is less than the threshold set by the system, so the product is judged to be fake.
[0074] Step 6: Output recognition results
[0075] The system outputs the recognition result to the user, that is, "the product is fake."
[0076] Therefore, by using two convolutional neural network designed network models to process genuine images and images to be identified respectively, the authenticity of the objects can be identified quickly and accurately.
[0077] In addition, the previous comparison method matches the image to be identified with all images in the database, which increases the calculation time. The system and method of the present application adds a folder name matching step, classifies the product images by folder, and before performing image similarity matching, first determines the target folder, and then performs similarity matching with the images in the folder to obtain the final discrimination result. Therefore, it is only necessary to match the images in one folder of the image to be identified, which can shorten the matching time and improve the accuracy.
[0078] In summary, compared with the prior art, the commodity authenticity identification method based on convolutional neural network disclosed in this application has the following technical advantages:
[0079] First, using two convolutional neural networks can greatly reduce the amount of calculation required for comparison, thereby saving resources and improving computing efficiency;
[0080] Second, the solution of the present application adds a folder matching step, thereby greatly saving computing time.
[0081] According to various aspects, elements, or any part of elements, or any combination of elements of the present disclosure, a "processing system" including one or more processors can be implemented. Examples of processors include: microprocessors, microcontrollers, digital signal processors (DSPs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform various functionalities described throughout the present disclosure. One or more processors in a processing system can execute software. Software should be broadly interpreted as meaning instructions, instruction sets, codes, code segments, program codes, programs, subroutines, software modules, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether it is described in software, firmware, middleware, microcode, hardware description language, or other terms. Software may reside on a computer-readable medium. The computer-readable medium may be a non-transient computer-readable medium. As examples, non-transitory computer-readable media include: magnetic storage devices (e.g., hard disks, floppy disks, magnetic strips), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs)), smart cards, flash memory devices (e.g., memory cards, memory sticks, key drives), random access memory (RAM), read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, removable disks, and any other suitable medium for storing software and / or instructions that can be accessed and read by a computer. As examples, computer-readable media may also include carrier waves, transmission lines, and any other suitable medium for transmitting software and / or instructions that can be accessed and read by a computer. The computer-readable medium may reside in the processing system, be external to the processing system, or be distributed across multiple entities including the processing system. The computer-readable medium may be implemented in a computer program product. As examples, a computer program product may include a computer-readable medium in packaging materials. Those skilled in the art will recognize how to best implement the described functionality presented throughout this disclosure depending on the specific application and the overall design constraints imposed on the overall system.
[0082] It should be understood that the specific order or hierarchy of steps in the disclosed methods is an illustration of an exemplary process. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the methods or methodologies described herein may be rearranged. The attached method claims present elements of the various steps in a sample order and are not meant to be limited to the specific order or hierarchy presented unless specifically stated herein.
[0083] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the universal principles defined herein may be applied to other aspects. Therefore, the claims are not intended to be limited to the various aspects shown herein, but should be granted the full scope consistent with the language of the claims, wherein the singular reference to the element is not intended to mean "there is and only one" (unless specifically stated) but "one or more". Unless specifically stated otherwise, the term "some" refers to one or more. The phrase "at least one" quoting a list of items refers to any combination of these items, including a single member. As an example, "at least one of a, b or c" is intended to cover: at least one a; at least one b; at least one c; at least one a and at least one b; at least one a and at least one c; at least one b and at least one c; and at least one a, at least one b and at least one c. The elements of the various aspects described throughout this disclosure are all structurally and functionally equivalent schemes currently or hereafter known to those of ordinary skill in the art, and are expressly incorporated herein by reference, and are intended to be covered by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims.
Claims
1. A method for identifying the authenticity of goods based on a convolutional neural network, the method comprising the following steps: capturing an image of the product; Upload images of the said product; Submit the name of the product in question; Match the image folder where the product is located based on its name; Calculating the similarity of the images of the product; and Output the recognition result.
2. The method according to claim 1, characterized in that Collecting and uploading the image of the product includes using a camera, a mobile phone or other collecting devices to collect the image and uploading the image to the system server backend.
3. The method according to claim 1, characterized in that Calculating the similarity of the images of the product includes: Calculating the similarity between the image of the product and each image in the folder; and All similarities are averaged to obtain the similarity of the images of the product.
4. The method according to claim 1, characterized in that If the similarity exceeds a predetermined threshold, the product is judged to be authentic, and an identification result is output as true; Otherwise, the product is judged to be fake, and the recognition result is output as false.
5. The method according to claim 1, characterized in that Calculating the similarity of the images of the product includes: Two convolutional networks are used to calculate the similarity of the images of the products.
6. The method according to claim 5, characterized in that Using two convolutional networks to calculate the similarity of the product images includes: Using the product image and the real product image as inputs to the two convolutional networks respectively; Using the two convolutional networks to respectively extract features of the product image and the real product image; The similarity between the product image and the real product image is calculated based on the loss function.
7. A system for identifying the authenticity of goods based on a convolutional neural network, the system comprising the following modules: A commodity image acquisition module, used to acquire images of the commodity; A product image uploading module, used to upload the product image to the server backend of the system; A commodity name submission module, used to submit the name of the commodity to the server backend of the system; A text matching module, used for matching the image folder where the product is located based on its name; An image similarity calculation module, used to calculate the similarity of the images of the product; as well as The result output module is used to output the recognition results.
8. The system according to claim 7, characterized in that The image similarity calculation module is also used for: Calculating the similarity between the image of the product and each image in the folder; and All similarities are averaged to obtain the similarity of the images of the product.
9. The system according to claim 7, characterized in that The system uses two convolutional networks to calculate the similarity of the product images, including: Using the product image and the real product image as inputs to the two convolutional networks respectively; Using the two convolutional networks to respectively extract features of the product image and the real product image; The similarity between the product image and the real product image is calculated based on the loss function.
10. A computer readable medium having computer instructions stored thereon, wherein when the instructions are executed by a computer, the method according to any one of claims 1 to 6 is performed.
