# US 2021/0092369 A1 · Method and electronic device for analyzing image

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

- Number: US 2021/0092369 A1
- Document ID: US20210092369A1
- Status: Published application
- Kind: A1
- Application number: 17/026,020
- Filed: 2020-09-18
- Published: 2021-03-25
- Earliest claimed: 2019-09-19
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Jaeil JUNG; Junik JANG; Jonghee HONG
- Web page: https://patentgrep.com/patent/US20210092369A1

## CPC

- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/94: Vector quantisation
- G06T 9/002: {using neural networks}
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method for analyzing an image for anomaly detection includes obtaining a first image. The method also includes generating a second image by auto-encoding the first image. The method additionally includes extracting first and second feature vectors from the first and second images, respectively. The method further includes filtering each of the first and second feature vectors by using a filtering vector generated based on first distance values between first respective elements of the first and second feature vectors. Additionally, the method includes determining whether there is an anomaly in the first image based on second distance values between second respective elements of the filtered first and second feature vectors.

## Claims

### Claim 1

A method, performed by an electronic device, of analyzing an image, the method comprising:
obtaining a first image;
generating a second image by auto-encoding the first image;
extracting first and second feature vectors from the first and second images, respectively;
filtering each of the first and second feature vectors by using a filtering vector generated based on first distance values between first respective elements of the first and second feature vectors; and
determining whether there is an anomaly in the first image based on second distance values between second respective elements of the filtered first and second feature vectors.

### Claim 2 (depends on 1)

The method of claim 1, wherein the generating the second image comprises, upon receiving the first image, generating the second image using a first neural network model that reconstructs the first image by encoding the first image and decoding the encoded first image.

### Claim 3 (depends on 1)

The method of claim 1, wherein the extracting the first and second feature vectors comprises, upon receiving the first image or the second image, extracting the first and second feature vectors by using a second neural network model that outputs feature values determined based on correlations between pixel information of the first image or the second image and a preset sized kernel.

### Claim 4 (depends on 1)

The method of claim 1, wherein the filtering the each of the first and second feature vectors comprises:
determining the filtering vector of same dimension as the first and second feature vectors based on the first distance values between the first respective elements of the first and second feature vectors; and
performing element-wise multiplication of the first and second feature vectors by the filtering vector.

### Claim 5 (depends on 4)

The method of claim 4, wherein the determining the filtering vector comprises:
generating the filtering vector to contain the first distance values between the first respective elements of the first and second feature vectors as element values of the filtering vector;
adjusting the element values of the filtering vector based on whether each of the element values of the filtering vector is greater than a preset first threshold; and
determining the filtering vector to contain the adjusted element values as the element values of the filtering vector.

### Claim 6 (depends on 5)

The method of claim 5, wherein the determining the filtering vector comprises:
re-adjusting the element values of the filtering vector based on whether a sum of all the element values of the filtering vector is not greater than a second threshold; and
determining the filtering vector to contain the re-adjusted element values as the element values of the filtering vector.

### Claim 7 (depends on 5)

The method of claim 5, wherein the adjusting the element values of the filtering vector comprises:
adjusting the element values of the filtering vector that are greater than the preset first threshold to 0; and
adjusting the element values of the filtering vector that are not greater than the preset first threshold to 1.

### Claim 8 (depends on 5)

The method of claim 5, wherein the generating the filtering vector comprises:
obtaining a plurality of training images and a plurality of reconstructed images corresponding to the plurality of training images;
combining third distance values between third respective elements of third feature vectors extracted from the plurality of training images and the plurality of reconstructed images corresponding to the plurality of training images, respectively; and
generating the filtering vector to contain the combined third distance values between the third respective elements as the element values of the filtering vector.

### Claim 9 (depends on 1)

The method of claim 1, wherein the determining whether there is the anomaly in the first image comprises:
determining a mean square error (MSE) based on the second distance values between the second respective elements of the filtered first and second feature vectors; and
determining whether there is the anomaly in the first image based on whether the MSE is greater than a preset third threshold.

### Claim 10 (depends on 4)

The method of claim 4, wherein:
the second image is a reconstructed image that is the same dimension as the first image, and
the first feature vector, the second feature vector and the filtering vector are the same dimension and are determined based on a pixel size of the first image.

### Claim 11

An electronic device for analyzing an image, the electronic device comprising:
a memory storing one or more instructions; and
at least one processor,
wherein the at least one processor is configured to execute the one or more instructions to:
obtain a first image;
generate a second image by auto-encoding the first image;
extract first and second feature vectors from the first and second images, respectively;
filter each of the first and second feature vectors by using a filtering vector generated based on first distance values between first respective elements of the first and second feature vectors; and
determine whether there is an anomaly in the first image based on second distance values between second respective elements of the filtered first and second feature vectors.

### Claim 12 (depends on 11)

The electronic device of claim 11, wherein to generate the second image the at least one processor is further configured to: upon receiving the first image, generate the second image using a first neural network model that reconstructs the first image by encoding the first image and decoding the encoded first image.

### Claim 13 (depends on 11)

The electronic device of claim 11, wherein to extract the first and second feature vectors the at least one processor is further configured to upon receiving the first image or the second image, extract the first and second feature vectors by using a second neural network model that outputs feature values determined based on correlations between pixel information of the first image or the second image and a preset sized kernel.

### Claim 14 (depends on 11)

The electronic device of claim 11, wherein the at least one processor is further configured to:
determine the filtering vector of same dimension as the first and second feature vectors based on the first distance values between the first respective elements of the first and second feature vectors; and
perform element-wise multiplication of the first and second feature vectors by the filtering vector.

### Claim 15 (depends on 14)

The electronic device of claim 14, wherein the at least one processor is further configured to:
generate the filtering vector to contain the first distance values between the first respective elements of the first and second feature vectors as element values of the filtering vector;
adjust the element values of the filtering vector based on whether each of the element values of the filtering vector is greater than a preset first threshold; and
determine the filtering vector to contain the adjusted element values as the element values of the filtering vector.

### Claim 16 (depends on 15)

The electronic device of claim 15, wherein the at least one processor is further configured to:
re-adjust the element values of the filtering vector based on whether a sum of all the element values of the filtering vector is not greater than a second threshold; and
determine the filtering vector to contain the re-adjusted element values as the element values of the filtering vector.

### Claim 17 (depends on 15)

The electronic device of claim 15, wherein the at least one processor is further configured to:
adjust the element values of the filtering vector that are greater than the preset first threshold to 0; and
adjust the element values of the filtering vector that are not greater than the preset first threshold to 1.

### Claim 18 (depends on 15)

The electronic device of claim 15, wherein the at least one processor is further configured to:
obtain a plurality of training images and a plurality of reconstructed images corresponding to the plurality of training images;
combine third distance values between third respective elements of third feature vectors extracted from the plurality of training images and the plurality of reconstructed images corresponding to the plurality of training images, respectively; and
generate the filtering vector to contain the combined third distance values between the third respective elements as the element values of the filtering vector.

### Claim 19 (depends on 15)

The electronic device of claim 15, wherein the at least one processor is further configured to:
determine a mean square error (MSE) based on the second distance values between the second respective elements of the filtered first and second feature vectors; and
determine whether there is the anomaly in the first image based on whether the MSE is greater than a preset third threshold.

### Claim 20

A non-transitory computer-readable recording medium comprising one or more instructions for controlling an operation of an electronic device, that when executed by at least one processor of the electronic device, cause the at least one processor to:
obtain a first image;
generate a second image by auto-encoding the first image;
extract first and second feature vectors from the first and second images, respectively;
filter each of the first and second feature vectors by using a filtering vector generated based on first distance values between first respective elements of the first and second feature vectors; and
determine whether there is an anomaly in the first image based on second distance values between second respective elements of the filtered first and second feature vectors.
