KR-20260062373-A - IMAGE ANOMALY DETECTION METHOD AND IMAGE ANOMALY DETECTION DEVICE USING SELF-LEARNING-BASED ARTIFICIAL INTELLIGENCE MODEL
Abstract
An anomaly detection method in an image performed by a processor according to one embodiment may include: a step of generating output images from which anomaly objects have been removed from input images included in the input image sequence by applying an artificial intelligence model trained based on a dataset including a plurality of frame images included in a video and pseudo-anomaly frames generated by adding anomaly patterns to the plurality of frame images; a step of calculating reconstruction errors based on the output images and the input images; a step of determining anomaly images among the input images of the input image sequence based on a comparison result between the reconstruction errors; a step of generating a residual image based on an error between a target anomaly image and a corresponding output image among the anomaly images; and a step of determining the location of anomaly objects in the target anomaly image based on a comparison of pixel values included in the residual image.
Inventors
- 김형원
- 리즈완 알리 샤
- 오딜벡 우르모노브 이크롬조노비치
Assignees
- 주식회사 엠시스랩
- 충북대학교 산학협력단
Dates
- Publication Date
- 20260507
- Application Date
- 20241029
Claims (14)
- In an image anomaly detection method performed by a processor, A step of generating output images from which anomaly objects have been removed from input images included in the input image sequence by applying an artificial intelligence model trained based on a dataset comprising a plurality of frame images included in a video and pseudo-anomaly frames generated by adding anomaly patterns to the plurality of frame images to an input image sequence; A step of calculating reconstruction errors based on the output images and the input images; A step of determining anomaly images among the input images of the input image sequence based on the result of comparison between the reconstruction errors; A step of generating a residual image based on the error between a target abnormal image and a corresponding output image among the above abnormal images; and A step of determining the location of an abnormal object in the target abnormal image based on a comparison of pixel values included in the above residual image. An image anomaly detection method including
- In paragraph 1, The step of determining the above abnormal images is, A step of calculating exponential moving average values based on the above reconstruction errors; A step of setting an exponential moving average value corresponding to a predetermined size among the above exponential moving average values as a threshold value; and Step of determining the images having an exponential moving average value below the threshold value among the above input image sequences as the above abnormal images An image anomaly detection method including
- In paragraph 1, The step of determining the location of the abnormal object in the above target abnormal image is, A step of classifying pixels included in the above residual image based on pixel values; If the number of pixels corresponding to a first pixel value is greater than or equal to a predetermined threshold, a step of filtering out the pixels corresponding to the first pixel value; and A step of determining the location of the anomaly object by determining the pixels corresponding to the second pixel value as anomaly pixels when the number of pixels corresponding to the second pixel value is less than a predetermined threshold. An image anomaly detection method including
- In paragraph 1, The step of determining the location of the abnormal object in the above target abnormal image is, A step of setting an area of a predetermined size centered on a target pixel among the pixels included in the above residual image; A step of extracting an intermediate pixel value among the pixel values of pixels included in an area of a predetermined size set above; A step of changing the pixel value of the anomalous object included in the residual image based on changing the pixel value of the target pixel to the extracted intermediate pixel value. An image anomaly detection method including further
- In paragraph 1, The step of determining the location of the abnormal object in the above target abnormal image is, A step of determining the pixel corresponding to the maximum pixel value among the pixels included in an area of a predetermined size on the residual image as the center pixel of the abnormal object; and A step of adjusting the size of an area containing an anomalous object based on the location of pixels having pixel values exceeding a predetermined threshold pixel value among the pixels included in the area of the predetermined size and the center pixel. An image anomaly detection method including
- In paragraph 1, The step of determining the location of the abnormal object in the above target abnormal image is, A step of receiving the above target abnormal image and a previous abnormal image taken at a time earlier than the above target abnormal image; and A step of determining the location of the abnormal object based on a comparison result between a first region containing the abnormal object in the target abnormal image and a second region containing the abnormal object in the previous abnormal image. An image anomaly detection method including
- In paragraph 6, The step of determining the location of the abnormal object based on the comparison result between the first region and the second region is, A step of calculating the ratio between the intersection area of the first area and the second area and the union area of the first area and the second area; If the above ratio is greater than or equal to a predetermined threshold ratio, the step of replacing the first region with the second region; and If the above ratio is less than a predetermined threshold ratio, the step of updating the second region to the first region. An image anomaly detection method including
- In paragraph 1, A step of generating a dataset including the plurality of frame images and the pseudo-abnormal frames; and A step of training the artificial intelligence model including an autoencoder based on the above dataset An image anomaly detection method including further
- In paragraph 8, The step of generating the above dataset is, A step of generating a first pseudo-ideal frame by adding a shape of a predetermined form to a first frame image among the plurality of frame images; A step of generating a second pseudo-ideal frame by removing data corresponding to a portion of the second frame image among the plurality of frame images; and A step of generating a training dataset including the first pseudo-abnormal frame, the second pseudo-abnormal frame, and the plurality of frame images. An image anomaly detection method including
- In paragraph 8, The step of generating the above dataset is, A step of labeling a frame among the above pseudo-abnormal frames in which the above abnormal pattern has not been added as a normal frame; and For a frame containing multiple abnormal patterns among the above pseudo-abnormal frames, a step of labeling the locations of the multiple abnormal patterns on the frame. An image anomaly detection method including
- In paragraph 8, The step of training the above artificial intelligence model is, A step of generating prediction results indicating whether each of the frame images included in the dataset corresponds to an anomalous image, based on inputting the above dataset into the artificial intelligence model; A step of calculating the prediction accuracy of the artificial intelligence model based on the comparison result of the above prediction results and the predetermined correct answer result; A step of updating the weight parameters of the artificial intelligence model based on the result of comparing the above prediction accuracy and a predetermined threshold accuracy; and A step of generating updated prediction results based on inputting the dataset into an artificial intelligence model with updated weight parameters. An image anomaly detection method including
- In Paragraph 11, The step of updating the weight parameters of the above artificial intelligence model is, If the above prediction accuracy is less than the above predetermined threshold accuracy, the weight parameters of the artificial intelligence model are updated, and Step of stopping the update of weight parameters of the artificial intelligence model when the above prediction accuracy is greater than or equal to the above predetermined threshold accuracy An image anomaly detection method including further
- A computer-readable storage medium storing one or more computer programs comprising instructions for performing the method of any one of claims 1 to 12.
- In an image anomaly detection device, An image acquisition unit that acquires a video of a pre-designated space captured during a predetermined time; A processor that receives the video from the image acquisition unit, applies an artificial intelligence model trained on a dataset including a plurality of frame images included in the video and pseudo-anomaly frames generated by adding anomaly patterns to the plurality of frame images, to an input image sequence to generate output images from which anomaly objects have been removed from the input images included in the input image sequence, calculates reconstruction errors based on the output images and the input images, determines anomaly images among the input images of the input image sequence based on the result of comparison between the reconstruction errors, generates a residual image based on the error between a target anomaly image and a corresponding output image among the anomaly images, and determines the location of anomaly objects in the target anomaly image based on a comparison of pixel values included in the residual image; and A memory that stores the video received from the above image acquisition unit and instructions for operating the above processor. An image anomaly detection device including
Description
Image Anomaly Detection Method and Image Anomaly Detection Device Using Self-Learning Based Artificial Intelligence Model A technology for detecting anomalies in images based on an artificial intelligence model is disclosed below. In the field of computer vision, technologies for detecting anomalies in images are primarily utilized to automatically identify ideal situations or exceptional events within specific environments or systems. Initially, anomaly detection techniques were implemented using rule-based approaches that detected patterns deviating from predefined criteria. However, these methods have limitations in handling complex situations and struggle to adapt to various environmental changes. To overcome this, approaches utilizing machine learning and deep learning technologies have recently garnered attention. In particular, unsupervised learning-based technologies that detect abnormal patterns by learning solely from normal data are being widely researched. FIG. 1 illustrates an image anomaly detection device according to one embodiment. FIG. 2 is a flowchart of an image anomaly detection method performed by an electronic device according to one embodiment. FIG. 3 is a block diagram schematically illustrating the process of an electronic device according to one embodiment training an AI model for abnormal object detection and the process of detecting abnormal objects in an input image based on the trained AI model. FIG. 4 shows a schematic flowchart of the operation of an image anomaly detection device according to one embodiment. FIG. 5 is a flowchart for specifically explaining how an electronic device according to one embodiment trains an artificial intelligence model. FIG. 6 is a flowchart for specifically explaining how an electronic device according to one embodiment classifies abnormal images in an input image sequence. FIG. 7 is a flowchart for specifically explaining a method for an electronic device according to one embodiment to accurately detect the location of an abnormal object on an abnormal image. FIG. 8 is a flowchart illustrating a method for verifying the performance of an artificial intelligence model trained to detect abnormal objects in an input image using an electronic device according to one embodiment. Specific structural or functional descriptions of the embodiments are disclosed for illustrative purposes only and may be modified and implemented in various forms. Accordingly, actual implementations are not limited to the specific embodiments disclosed, and the scope of this specification includes modifications, equivalents, or substitutions included in the technical concept described by the embodiments. Terms such as "first" or "second" may be used to describe various components, but these terms should be interpreted solely for the purpose of distinguishing one component from another. For example, the first component may be named the second component, and similarly, the second component may be named the first component. When it is stated that a component is "connected" to another component, it should be understood that it may be directly connected to or coupled with that other component, or that there may be other components in between. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this specification, terms such as "comprising" or "having" are intended to specify the existence of the described features, numbers, steps, actions, components, parts, or combinations thereof, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof. Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by those skilled in the art. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an ideal or overly formal sense unless explicitly defined in this specification. Hereinafter, embodiments will be described in detail with reference to the attached drawings. In the description with reference to the attached drawings, identical components are given the same reference numeral regardless of the drawing number, and redundant descriptions thereof will be omitted. In the field of computer vision, there is an increasing trend of using artificial intelligence models to detect abnormal objects in images. However, to train an AI model to detect abnormal objects in input images, a training dataset containing labeled normal images and abnormal images is required. In particular, unlike normal images, abnormal images are rarely obtained in real-life applications such as smart factories or safety monitoring. Therefore, collecting abnormal images can be time-consuming and costly. Consequently, instead of collecti