IP Library › Granted Patent US 12,524,863
Granted Patent B2
US 12,524,863 · App. 18/181,967 · Granted Jan 13, 2026

Product recognition method, model training method, device and electronic device

Inventors: Shuo Li (Beijing, CN); Feng Huang (Beijing, CN); Lei Nie (Beijing, CN); Xuepeng Zhao (Beijing, CN); Luyan Chen (Beijing, CN)
Assignee: Beijing Baidu Netcom Science Technology Co., Ltd.
G06T7/0004G06T2207/20081
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,524,863
App. No.
18/181,967
Granted
Jan 13, 2026
Kind
B2
Abstract

A product recognition method and device, a model training method and device, and an electronic device are provided. The product recognition method includes: obtaining image data of a product; performing defect recognition on the image data based on a first recognition model, to obtain a first recognition result, wherein the first recognition model is configured to recognize a defective product; performing qualification recognition on the image data based on a second recognition model to obtain a second recognition result, wherein the second recognition model is configured to recognize a qualified product; determining a target recognition result of the product based on the first recognition result and the second recognition result.

Claims (57)

1 . A product recognition method, comprising:

obtaining image data of a product;

performing defect recognition on the image data based on a first recognition model, to obtain a first recognition result, wherein the first recognition model is configured to recognize a defective product;

performing qualification recognition on the image data based on a second recognition model, to obtain a second recognition result, wherein the second recognition model is configured to recognize a qualified product, and the second recognition model is a model obtained by unsupervised training;

determining a target recognition result of the product based on the first recognition result and the second recognition result;

adding the image data to a defect product database when the first recognition result indicates that the product is a qualified product and the second recognition result indicates that the product is a defective product, wherein data in the defect product database is configured to optimize the first recognition model.

2 . The method according to claim 1 , wherein determining the target recognition result of the product based on the first recognition result and the second recognition result comprises:

determining that the target recognition result is the first recognition result or the second recognition result when the first recognition result is the same as the second recognition result;

determining that the target recognition result is the first recognition result when the first recognition result indicates that the product is a defective product, and the second recognition result indicates that the product is a qualified product;

determining that the target recognition result is a third recognition result when the first recognition result indicates that the product is a qualified product and the second recognition result indicates that the product is a defective product, wherein the third recognition result is a recognition result that a type of the product is pending.

3 . The method according to claim 1 , wherein the second recognition model is further configured to recognize the defective product, the first recognition model is a model obtained by training an initial recognition model based on image data of a target product;

a recognition result obtained by recognizing the image data of the target product by the second recognition model is that the target product is the defective product;

a recognition result obtained by recognizing the image data of the target product by the initial recognition model is that the target product is the qualified product, the initial recognition model is a model obtained by performing training based on image data of defective products.

4 . The method according to claim 1 , wherein the second recognition model is a model obtained by unsupervised training based on image data of qualified products.

5 . The method according to claim 1 , wherein the first recognition model comprises a first feature extraction layer, a first recognition layer and a second recognition layer, and an input end of the first recognition layer and an input end of the second recognition layer are connected with output ends of the first feature extraction layer;

wherein the first feature extraction layer is configured to extract target features in the image data, and is configured to transmit the target features to the first recognition layer and the second recognition layer, respectively;

the first recognition layer is configured to perform recognition based on the received target features and output a defect location in the image data and output a probability that the product is a defective product; the second recognition layer is configured to perform recognition based on the received target features and output contour information of defects in the image data.

6 . The method according to claim 1 , wherein the second recognition model comprises a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, and a comparison layer, and the second feature extraction layer, the third feature extraction layer, and the fourth feature extraction layer are connected to the comparison layer;

wherein the second feature extraction layer, the third feature extraction layer, and the fourth feature extraction layer are respectively configured to perform feature extraction on the image data, and a scale of a feature extracted by the second feature extraction layer, a scale of a feature extracted by the third feature extraction layer, and a scale of a feature extracted by the fourth feature extraction layer are different; the comparison layer is configured to output a recognition result based on the feature extracted by the second feature extraction layer, the feature extracted by the third feature extraction layer, and the feature extracted by the fourth feature extraction layer.

7 . A model training method, comprising:

obtaining image data of a product;

inputting the image data into an initial recognition model and a second recognition model for recognition, and obtaining a first recognition result outputted by the initial recognition model and a second recognition result outputted by the second recognition model, wherein the initial recognition model is a model for recognizing a defective product, and the second recognition model is a model for recognizing a qualified product, and the second recognition model is a model obtained by unsupervised training;

training the initial recognition model based on the image data to obtain a first recognition model, when the first recognition result indicates that the product is a qualified product and the second recognition result indicates that the product is a defective product.

8 . The method according to claim 7 , wherein training the initial recognition model based on the image data to obtain the first recognition model when the first recognition result indicates that the product is the qualified product and the second recognition result indicates that the product is a defective product comprises:

adding the image data to a defect product database;

generating first training data based on data in the defect product database;

performing supervised training on the initial recognition model based on the first training data, to obtain the first recognition model.

9 . The method according to claim 8 , wherein generating the first training data based on the data in the defect product database comprises:

obtaining first image data from the defect product database, wherein the first image data is any image data in the defect product database;

setting a defect type label to the first image data to obtain the first training data, when the first image data is reviewed and a reviewing result indicates that the first image data is the image data of the defective product.

10 . The method according to claim 9 , wherein after obtaining the first image data from the defect product database, the method further comprises:

reviewing the first image data, and when a result of the reviewing indicates that the first image data is the image data of the qualified product, determining that the first image data as image data that passes inspection.

11 . The method according to claim 7 , wherein before obtaining the image data of the product, the method further comprises:

obtaining second image data, wherein the second image data is image data of the qualified product;

inputting the second image data as training samples into a pre-constructed first initial model for unsupervised training, to obtain the second recognition model.

12 . The method according to claim 7 , wherein before obtaining the image data of the product, the method further comprises:

obtaining third image data, wherein the third image data is image data of the defective product;

setting a defect type label on the third image data to obtain second training data;

inputting the second training data into a pre-constructed second initial model for supervised training, to obtain the initial recognition model.

13 . The method according to claim 11 , wherein the model parameters of the first initial model match with model parameters of a pre-training model, the pre-training model is a model obtained from an open source dataset, or the pre-training model is a model obtained by self-supervised training based on artificial defect types.

14 . The method according to claim 11 , wherein in a process of inputting the second image data into the first initial model for unsupervised training, the first initial model is configured to extract the second image data to obtain a feature set, after inputting the second image data into the pre-constructed first initial model for the unsupervised training to obtain the second recognition model, the method further comprises:

extracting a to-be-recognized feature in test image data based on the second recognition model when the second recognition model receives the test image data;

determining that the test image data is image data of the qualified product when a distance between a feature in the feature set and the to-be-recognized feature is less than a preset value;

determining that the test image data is image data of the defective product when a distance between a feature in the feature set and the to-be-recognized feature is larger than or equal to the preset value.

15 . The method according to claim 14 , wherein the distance is a Mahalanobis distance or a Euclidean distance.

16 . A product recognition device, comprising:

at least one processor, and

a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor executes the product recognition method according to claim 1 .

17 . The product recognition device according to claim 16 , wherein, determining the target recognition result of the product based on the first recognition result and the second recognition result comprises:

determining that the target recognition result is the first recognition result or the second recognition result when the first recognition result is the same as the second recognition result;

determining that the target recognition result is the first recognition result when the first recognition result indicates that the product is a defective product, and the second recognition result indicates that the product is a qualified product;

determining that the target recognition result is a third recognition result when the first recognition result indicates that the product is a qualified product and the second recognition result indicates that the product is a defective product, wherein the third recognition result is a recognition result that a type of the product is pending.

18 . A model training device, comprising:

at least one processor, and

a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor executes the model training method according to claim 7 .

19 . A non-transitory computer-readable storage medium having stored therein computer instructions, wherein the computer instructions are configured to cause a computer to execute the product recognition method according to claim 1 .

20 . A non-transitory computer-readable storage medium having stored therein computer instructions, wherein the computer instructions are configured to cause a computer to execute the model training method according to claim 7 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 10, 2023
From: LI, SHUO; HUANG, FENG; NIE, LEI; ZHAO, XUEPENG; CHEN, LUYAN
To: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Reel/Frame 062947/0957 →
Priority Claims (1)
CN 202210298190.4 · Mar 25, 2022 · national
Continuity (1)
Related Publication 20230214985A1 · Jul 6, 2023
References Cited (38)
US 20150238148A1 · Georgescu · 2015 [cited by examiner]
US 20170103532A1 · Ghesu · 2017 [cited by examiner]
US 20170116497A1 · Georgescu · 2017 [cited by examiner]
US 20180211374A1 · Tanaka · 2018 [cited by examiner]
US 20190155164A1 · Chen et al. · 2019 [cited by applicant]
US 20190244513A1 · Niculescu-Mizil · 2019 [cited by examiner]
US 20200160497A1 · Shah · 2020 [cited by examiner]
US 20200364842A1 · Chaton · 2020 [cited by examiner]
US 20210166381A1 · Yip · 2021 [cited by examiner]
US 20210192723A1 · Fu · 2021 [cited by examiner]
US 20220036533A1 · Xiao et al. · 2022 [cited by applicant]
US 20220138931A1 · Palma · 2022 [cited by examiner]
US 20220230301A1 · Thomasset · 2022 [cited by examiner]
CN 110378869A · 2019 [cited by applicant]
CN 110726724A · 2020 [cited by examiner]
CN 111382785A · 2020 [cited by applicant]
CN 111627015A · 2020 [cited by applicant]
CN 111740991A · 2020 [cited by applicant]
CN 111986178A · 2020 [cited by applicant]
CN 112036514A · 2020 [cited by applicant]
CN 112288034A · 2021 [cited by applicant]
CN 112581463A · 2021 [cited by examiner]
CN 113361603A · 2021 [cited by applicant]
CN 113763305A · 2021 [cited by examiner]
CN 114723658A · 2022 [cited by examiner]
JP 2021174194A · 2021 [cited by applicant]
WO 2021214833A1 · 2021 [cited by applicant]
Guanghua Hu et al. , “Unsupervised fabric defect detection based on a deep convolutional generative adversarial network,” Jul. 17, 2019, Textile Research Journal, 2020, vol. 90(3-4), pp. 247-267. [cited by examiner]
Tian Wang et al.,“A fast and robust convolutional neural network-based defect detection model in product quality control,” Aug. 15, 2017, Int J Adv Manuf Technol (2018) 94, pp. 3465-3468. [cited by examiner]
Wenqiang Liu et al.,“An Automated Defect Detection Approach for Catenary Rod-Insulator Textured Surfaces Using Unsupervised Learning,” Apr. 13, 2020, IEEE Transactions on Instrumentation and Measurement, vol. 69, No. 10… [cited by examiner]
Oumayma Essid et al.,“Automatic detection and classification of manufacturing defects in metal boxes using deep neural networks,” Nov. 9, 2018, PLOS ONE | https://doi.org/10.1371/journal.pone.0203192 Nov. 9, 2018, pp. 1… [cited by examiner]
Sejune Cheon et al.,“Convolutional Neural Network for Wafer Surface Defect Classification and the Detection of Unknown Defect Class,” Mar. 4, 2019, IEEE Transactions on Semiconductor Manufacturing, vol. 32, No. 2, May 2… [cited by examiner]
Robert Skilton et al.,“Visual Detection of Generic Defects in Industrial Components using Generative Adversarial Networks,” Oct. 17, 2019, Proceedings of the 2019 IEEE/ASME, International Conference on Advanced Intellig… [cited by examiner]
Syed Sumera Ershad Ali et al.,“An Eficient Quality Inspection of Food Products Using Neural Network Classification,” May 9, 2019, J. Intell. Syst. 2020; 29(1), pp. 1425-1436. [cited by examiner]
Extended European Search Report issued in Application No. 23160686.4 on Jun. 23, 2023, 8 pages. [cited by applicant]
Chinese Office Action issued in Application No. 202210298190.4 on May 11, 2022. [cited by applicant]
Wenqiang, Liu et al., “An Automated Defect Detection Approach for Catenary Rod-Insulator Textured Surfaces Using Unsupervised Leaming,” University of Edinburgh, Jun. 14, 2020, 13 pages. [cited by applicant]
Siqin Yu, “Dep Generative Model Fusion Based Industrial Visual Defect Detection System,” Beijing University of Posts and Telecommunications, Thesis for Master Degree, Jun. 5, 2020, 76 pages. [cited by applicant]