# US 2023/0066499 A1 · Method for establishing defect detection model and electronic apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0066499 A1
- Document ID: US20230066499A1
- Status: Published application
- Kind: A1
- Application number: 17/500,946
- Filed: 2021-10-14
- Published: 2023-03-02
- Earliest claimed: 2021-08-27
- Assignees: Wistron Corporation
- Applicants: Wistron Corporation
- Inventors: Jia-Hong Zhang; Shih-Yi Chao
- Web page: https://patentgrep.com/patent/US20230066499A1

## CPC

- G06N 20/00: Machine learning
- G10L 25/51: for comparison or discrimination
- G05B 23/024: {Quantitative history assessment, e.g. mathematical relationships between available data; Functions therefor; Principal component analysis [PCA]; Partial least square [PLS]; Statistical classifiers, e.g. Bayesian networks, linear regression or correlation analysis; Neural networks}
- G06N 3/045: Combinations of networks
- G06N 3/09: Supervised learning
- G10L 25/27: characterised by the analysis technique
- H04R 29/008: {Visual indication of individual signal levels (visual indication of stereophonic sound image H04S7/40)}
- G06Q 10/06395: {Quality analysis or management}
- G10L 25/18: the extracted parameters being spectral information of each sub-band
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)
- H04R: LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; ELECTRIC HEARING AIDS; PUBLIC ADDRESS SYSTEMS (producing sounds with frequency not determined by supply frequency G10K)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

A method for establishing a defect detection model and an electronic apparatus are provided. A first classification model is established based on a training sample set including a plurality of training samples. The training samples are respectively input to the first classification model to obtain a classification result of each training sample. A plurality of outlier samples that are classified incorrectly are obtained from the training samples based on the classification result. A part of outlier samples that are classified incorrectly is deleted from the training samples, and the remaining training samples are used as an optimal sample set. A second classification model is established based on the optimal sample set so as to perform a defect detection through the second classification model.

## Claims

### Claim 1

A method of establishing a defect detection model, comprising:
establishing a first classification model based on a training sample set, wherein the training sample set comprises a plurality of training samples;
inputting the plurality of training samples into the first classification model respectively to obtain classification results of the respective training samples;
obtaining a plurality of outlier samples that are classified incorrectly from the plurality of training samples based on the classification result;
deleting a part of the plurality of outlier samples that are classified incorrectly from the plurality of training samples, and using the remaining training samples as an optimal sample set; and
establishing a second classification model based on the optimal sample set, so as to perform a defect detection through the second classification model.

### Claim 2 (depends on 1)

The method of establishing the defect detection model according to claim 1, wherein the plurality of training samples are each marked with a positive sample label or a negative sample label, and the classification result comprises a first score corresponding to the positive sample label and a second score corresponding to the negative sample label,
wherein the step of obtaining the plurality of outlier samples that are classified incorrectly from the plurality of training samples based on the classification result comprises:
determining whether each of the plurality of training samples is classified incorrectly based on the classification result;
determining the plurality of training samples marked with the positive sample label and having the second score greater than the first score in the classification result as the plurality of outlier samples that are classified incorrectly; and
determining the plurality of training samples marked with the negative sample label and having the first score greater than the second score in the classification result as the plurality of outlier samples that are classified incorrectly.

### Claim 3 (depends on 2)

The method of establishing the defect detection model according to claim 2, wherein after determining whether each of the plurality of training samples is classified incorrectly, the method further comprises:
classifying the plurality of training samples marked with the positive sample label and having the second score greater than first score in the classification result into a first error group; and
classifying the plurality of training samples marked with the negative sample label and having the first score greater than the second score in the classification result into a second error group;
wherein the step of deleting the part of the plurality of outlier samples that are incorrectly classified from the plurality of training sample comprises:
sorting the plurality of outlier samples comprised in the first error group based on the second score, and deleting a specified proportion of the plurality of outlier samples from the first error group in an order from high score to low score after sorting; and
sorting the plurality of outlier samples comprised in the second error group based on the first score, and deleting the specified proportion of the plurality of outlier samples from the second error group in the order from high score to low score after sorting.

### Claim 4 (depends on 1)

The method of establishing the defect detection model according to claim 1, wherein the plurality of training samples are each marked with a positive sample label or a negative sample label, and the classification result comprises a first score corresponding to the positive sample label and a second score corresponding to the negative sample label,
wherein the step of deleting the part of the plurality of outlier samples that are incorrectly classified from the plurality of training samples comprises:
deleting the outlier sample marked with the positive sample label and having the second score greater than a preset threshold; and
deleting the outlier sample marked with the negative sample label and having the first score greater than the preset threshold.

### Claim 5 (depends on 1)

The method of establishing the defect detection model according to claim 1, wherein the step of establishing the first classification model based on the training sample set comprises:
using a contrastive learning to train the first classification model, wherein the contrastive learning comprises the following steps:
(a1) taking the plurality of training samples marked with a positive sample label and the plurality of training samples marked with a negative sample label randomly from the training sample set;
(a2) performing similarity comparison on the plurality of training samples taken in step (a1), thereby adjusting parameters of the first classification model; and
(a3) repeating the above steps (a1) and (a2) until an accuracy of the first classification model in classifying the plurality of training samples is higher than a specified value.

### Claim 6 (depends on 5)

The method of establishing the defect detection model according to claim 5, wherein in step (a1), the number of the training sample marked with the positive sample label is one or two, and the number of the training sample marked with the negative sample label is one.

### Claim 7 (depends on 1)

The method of establishing the defect detection model according to claim 1, wherein the step of establishing the second classification model based on the optimal sample set comprises:
using a contrastive learning to train the second classification model, wherein the contrastive learning comprises the following steps:
(b1) taking the plurality of training samples marked with a positive sample label and the plurality of training samples marked with a negative sample label randomly from the optimal sample set;
(b2) performing similarity comparison on the plurality of training samples taken in step (b1), thereby adjusting parameters of the second classification model; and
(b3) repeating the above steps (b1) and (b2) until a leak rate of the second classification model in classifying the plurality of training sample is less than or equal to a specified ratio.

### Claim 8 (depends on 7)

The method of establishing the defect detection model according to claim 7, wherein in step (b1), the number of the training sample marked with the positive sample label is one or two, and the number of the training sample marked with the negative sample label is one.

### Claim 9 (depends on 1)

The method of establishing the defect detection model according to claim 1, wherein each of the plurality of training samples is a spectrogram, and the method for establishing the defect detection model further comprises:
collecting a plurality of audio signals, wherein each of the plurality of audio signals has been marked with a positive sample label or a negative sample label;
performing a Fourier transform on each of the plurality of audio signals; and
converting each of the plurality of audio signals after undergoing the Fourier transform into the spectrogram, and adding the spectrogram and the corresponding positive sample label or the negative sample label thereof to the training sample set.

### Claim 10 (depends on 9)

The method of establishing the defect detection model according to claim 9, further comprising:
performing a data augmentation processing on each of the spectrograms in the training sample set.

### Claim 11 (depends on 1)

The method of establishing the defect detection model according to claim 1, wherein after the second classification model is established, the method further comprises:
receiving a recorded audio file;
converting the recorded audio file into a spectrogram;
inputting the spectrogram into the second classification model to obtain a prediction result, thereby determining whether there is abnormal sound in the recorded audio file; and
outputting a report to a user interface based on the prediction result.

### Claim 12

An electronic apparatus, comprising:
a storage device comprising a training sample set and a plurality of modules, wherein the training sample set comprises a plurality of training samples; and
a processor coupled to the storage device, and configured to execute the module to perform the following operations:
establishing a first classification model based on the training sample set;
inputting the plurality of training samples into the first classification model respectively to obtain classification results of the respective training samples;
obtaining a plurality of outlier samples that are classified incorrectly from the plurality of training samples based on the classification result;
deleting a part of the plurality of outlier samples that are classified incorrectly from the plurality of training samples, and using the remaining training samples as an optimal sample set; and
establishing a second classification model based on the optimal sample set to perform a defect detection based on the second classification model.

### Claim 13 (depends on 12)

The electronic apparatus according to claim 12, wherein the plurality of training samples are each marked with a positive sample label or a negative sample label, and the classification result comprises a first score corresponding to the positive sample label and a second score corresponding to the negative sample label,
wherein the processor is configured to:
determine whether each of the plurality of training samples is classified incorrectly based on the classification result;
determine the plurality of training samples marked with the positive sample label and having the second score greater than the first score in the classification result as the plurality of outlier samples that are classified incorrectly; and
determine the plurality of training samples marked with the negative sample label and having the first score greater than the second score in the classification result as the plurality of outlier samples that are classified incorrectly.

### Claim 14 (depends on 13)

The electronic apparatus according to claim 13, wherein the processor is configured to:
classify the plurality of training samples marked with the positive sample label and having the second score greater than first score in the classification result into a first error group;
classify the plurality of training samples marked with the negative sample label and having the first score greater than the second score in the classification result into a second error group;
sort the plurality of outlier samples comprised in the first error group based on the second score, and delete a specified proportion of the plurality of outlier samples from the first error group in an order from high score to low score after sorting; and
sort the plurality of outlier samples comprised in the second error group based on the first score, and delete the specified proportion of the plurality of outlier samples from the second error group in the order from high score to low score after sorting.

### Claim 15 (depends on 12)

The electronic apparatus according to claim 12, wherein the plurality of training samples are each marked with a positive sample label or a negative sample label, and the classification result comprises a first score corresponding to the positive sample label and a second score corresponding to the negative sample label,
wherein the processor is configured to:
delete the outlier sample marked with the positive sample label and having the second score greater than a preset threshold; and
delete the outlier sample marked with the negative sample label and having the first score greater than the preset threshold.

### Claim 16 (depends on 12)

The electronic apparatus according to claim 12, wherein the processor is configured to use a contrastive learning to train the first classification model and the second classification model respectively.

### Claim 17 (depends on 12)

The electronic apparatus according to claim 12, wherein each of the plurality of training samples is a spectrogram, and the processor is configured to:
collect a plurality of audio signals, wherein each of the plurality of audio signals has been marked with a positive sample label or a negative sample label;
perform a Fourier transform on each of the plurality of audio signals; and
convert each of the plurality of audio signals after undergoing the Fourier transform into the spectrogram, and add the spectrogram and the corresponding positive sample label or the negative sample label thereof to the training sample set.

### Claim 18 (depends on 17)

The electronic apparatus according to claim 17, wherein processor is configured to:
perform a data augmentation processing on each of the spectrograms in the training sample set.

### Claim 19 (depends on 12)

The electronic apparatus according to claim 12, wherein the processor is configured to:
receive a recorded audio file;
convert the recorded audio file into a spectrogram;
input the spectrogram into the second classification model to obtain a prediction result, thereby determining whether there is abnormal sound in the recorded audio file; and
output a report to a user interface based on the prediction result.
