Search

US-12620202-B2 - Out-of-distribution detection system and method based on feature map of convolutional neural network

US12620202B2US 12620202 B2US12620202 B2US 12620202B2US-12620202-B2

Abstract

The present invention relates to a system and method for calculating a feature norm on the basis of a feature map of a convolutional neural network and detecting an out-of-distribution object and image on the basis of the calculated feature norm. An out-of-distribution detection system based on a feature map of a convolutional neural network according to the present invention includes a block selection module that selects a convolutional block for out-of-distribution detection among a plurality of convolutional blocks constituting a learned convolutional neural network, and an out-of-distribution detection module that acquires a feature map of a test image from the convolutional block selected by the block selection module, and calculates a feature norm to determine whether or not the test image is an out-of-distribution image.

Inventors

  • Kyoobin Lee
  • Yeonguk YU
  • Sungho Shin

Assignees

  • GWANGJU INSTITUTE OF SCIENCE AND TECHNOLOGY

Dates

Publication Date
20260505
Application Date
20231122
Priority Date
20230118

Claims (20)

  1. 1 . An out-of-distribution detection system based on a feature map of a convolutional neural network, comprising: a block selection module configured to select a convolutional block for out-of-distribution detection among a plurality of convolutional blocks constituting a learned convolutional neural network; and an out-of-distribution detection module configured to acquire a feature map of a test image from the convolutional block selected by the block selection module, and calculate a feature norm to determine whether or not the test image is an out-of-distribution image, wherein the block selection module converts an in-distribution image used in training of the learned convolutional neural network into a jigsaw puzzle to generate a jigsaw puzzle image, and selects the convolutional block for out-of-distribution detection using the in-distribution image and the jigsaw puzzle image.
  2. 2 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 1 , wherein the block selection module includes a jigsaw puzzle generation unit configured to convert an in-distribution image used for training of the learned convolutional neural network into a jigsaw puzzle image to generate a jigsaw puzzle image; a feature map acquisition unit configured to acquire a feature map of the in-distribution image and a feature map of the jigsaw puzzle image from a plurality of convolutional blocks constituting the learned convolutional neural network; a feature norm calculation unit configured to calculate a feature norm from the feature map of the in-distribution image for each of the plurality of convolutional blocks and calculate a feature norm from the feature map of the jigsaw puzzle image; and a block selection unit configured to select a convolutional block for detecting an out-of-distribution from among the plurality of convolutional blocks, on the basis of a ratio of the feature norm of the in-distribution image to the feature norm of the jigsaw puzzle image.
  3. 3 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 2 , wherein the jigsaw puzzle generation unit divides the in-distribution image into a plurality of patch units and then randomly mixes the patch units to generate the jigsaw puzzle image.
  4. 4 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 2 , wherein the feature norm calculation unit calculates norms of individual activation maps included in the feature map of the in-distribution image, and averages the norms of the individual activation maps of the in-distribution image to calculate the feature norm of the in-distribution image for each convolutional block, and calculates norms of individual activation maps included in the feature map of the jigsaw puzzle image, and averages the norms of the individual activation maps of the jigsaw puzzle image to calculate the feature norm of the jigsaw puzzle image for each convolutional block.
  5. 5 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 4 , wherein the norm is a Frobenius norm.
  6. 6 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 2 , wherein the block selection unit selects a convolutional block with a maximum ratio of the feature norm of the in-distribution image to the feature norm of the jigsaw puzzle image as the convolutional block for detecting an out-of-distribution.
  7. 7 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 6 , wherein the block selection unit selects a deep convolutional block as a convolutional block for detecting an out-of-distribution.
  8. 8 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 2 , wherein the out-of-distribution detection module includes a feature map acquisition unit configured to acquire the feature map of the test image from the selected convolutional block when the test image is input to the learned convolutional neural network; a feature norm calculation unit configured to calculate a feature norm from the feature map of the test image; and an out-of-distribution detection unit configured to compare the feature norm of the test image calculated by the feature norm calculation unit with a preset threshold value to determine whether the test image is an out-of-distribution image.
  9. 9 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 8 , wherein the feature norm calculation unit calculates the norms of the individual activation maps included in the feature map of the test image, and averages the norms of the individual activation maps of the test image to calculate the feature norm of the test image.
  10. 10 . The out-of-distribution detection system based on a feature map of a convolutional neural network of claim 9 , wherein the norm is a Frobenius norm.
  11. 11 . An out-of-distribution detection method based on a feature map of a convolutional neural network, comprising: a 10th step of selecting, by a computer system, a convolutional block for out-of-distribution detection among a plurality of convolutional blocks constituting a learned convolutional neural network; and a 20th step of acquiring, by the computer system, a feature map of a test image from the convolutional block selected in the 10th step, and calculating a feature norm to determine whether or not the test image is an out-of-distribution image, wherein the 10th step includes converting an in-distribution image used in training of the learned convolutional neural network into a jigsaw puzzle to generate a jigsaw puzzle image, and selecting the convolutional block for out-of-distribution detection using the in-distribution image and the jigsaw puzzle image.
  12. 12 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 11 , wherein the 10th step includes an 11th step of converting an in-distribution image used for training of the learned convolutional neural network into a jigsaw puzzle image to generate a jigsaw puzzle image; a 12th step of acquiring a feature map of the in-distribution image and a feature map of the jigsaw puzzle image from a plurality of convolutional blocks constituting the learned convolutional neural network; a 13th step of calculating a feature norm from the feature map of the in-distribution image for each of the plurality of convolutional blocks and calculating a feature norm from the feature map of the jigsaw puzzle image; and a 14th step of selecting a convolutional block for detecting an out-of-distribution from among the plurality of convolutional blocks, on the basis of a ratio of the feature norm of the in-distribution image to the feature norm of the jigsaw puzzle image.
  13. 13 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 12 , wherein the 11th step includes dividing the in-distribution image into a plurality of patch units and then randomly mixing the patch units to generate the jigsaw puzzle image.
  14. 14 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 12 , wherein the 13th step includes calculating norms of individual activation maps included in the feature map of the in-distribution image, and averaging the norms of the individual activation maps of the in-distribution image to calculate the feature norm of the in-distribution image for each convolutional block; and calculating norms of individual activation maps included in the feature map of the jigsaw puzzle image, and averaging the norms of the individual activation maps of the jigsaw puzzle image to calculate the feature norm of the jigsaw puzzle image for each convolutional block.
  15. 15 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 14 , wherein the norm is a Frobenius norm.
  16. 16 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 12 , wherein the 14th step includes selecting a convolutional block with a maximum ratio of the feature norm of the in-distribution image to the feature norm of the jigsaw puzzle image as the convolutional block for detecting an out-of-distribution.
  17. 17 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 16 , wherein the 14th step includes selecting a deep convolutional block as a convolutional block for detecting an out-of-distribution.
  18. 18 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 11 , wherein the 20th step includes a 21st step of acquiring the feature map of the test image from the selected convolutional block when the test image is input to the learned convolutional neural network; a 22nd step of calculating a feature norm from the feature map of the test image; and a 23rd step of comparing the feature norm of the test image calculated in the 22nd step with a preset threshold value to determine whether the test image is an out-of-distribution image.
  19. 19 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 18 , wherein the 22nd step includes calculating the norms of the individual activation maps included in the feature map of the test image, and averaging the norms of the individual activation maps of the test image to calculate the feature norm of the test image.
  20. 20 . The out-of-distribution detection method based on a feature map of a convolutional neural network of claim 19 , wherein the norm is a Frobenius norm.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS The present application claims priority to Korean Patent Application No. 10-2023-0007306, filed Jan. 18, 2023, the entire contents of which is incorporated herein for all purposes by this reference. TECHNICAL FIELD The present invention relates to an out-of-distribution (OOD) detection system and method based on a feature map of a convolutional neural network, and more specifically, to a system and method for calculating a feature norm on the basis of a feature map of a convolutional neural network and detecting an out-of-distribution object and image on the basis of the calculated feature norm. BACKGROUND Recently, a deep learning industry is playing a key role when a network provides intelligent services. This deep learning industry is being applied to various fields such as healthcare, robots, autonomous driving, medical diagnosis, and industrial inspection. In general, a deep learning model is trained in a closed environment and cannot detect an out-of-distribution object or image for which the deep learning model does not have information at the time of training. Therefore, when the out-of-distribution image is input to the deep learning model, class classification is not performed and it should be recognized that there is no information. However, since the deep learning model tends to have overconfidence about an output of the deep learning model, the deep learning model classifies an out-of-distribution image input into a specific class, and such an overconfident neural network reduces the reliability of the deep learning model. Accordingly, a technology for classifying and detecting an out-of-distribution in a deep learning model is needed. As an out-of-distribution detection technology of the related art, related art 1 proposed by Hendrycks, et al., “Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In Proceedings of International Conference on Learning Representations, 2017” proposes a technology for determining to be an out-of-distribution when a maximum value (maximum softmax probability) in a test output distribution of a deep learning model does not reach a certain level. However, such related art 1 has a problem of low detection performance due to an overconfidence prediction problem. Related art 1 may be referred to as an MSP (maximum softmax probability) technology. Related art 2 proposed by Shiyu Liang, et al., “Shiyu Liang, Yixuan Li, and R Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In 6th International Conference on Learning Representations, ICLR 2018, 2018” proposes a technology for smoothing a test output distribution of a deep learning model by applying temperature scaling and input preprocessing, and determining to be an out-of-distribution when a maximum value does not reach a certain level. In related art 2, it is very important to select an appropriate value for a temperature scaling parameter as a hyper parameter, but there is a problem that examples of out-of-distribution samples are needed to set the hyper parameter. Related art 2 may be referred to as an ODIN (Out-of-DIstribution detector for neural networks) technology. Related art 3 proposed by Ki-Min Lee, et al., “Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. Advances in neural information processing systems, 31, 2018.” proposes a technology for calculating a feature distribution of a deep learning model for each learned category in advance and then, determining to be an out-of-distribution when a Mahalanobis distance between an input and the feature distribution is greater than a specific value. This related art 3 has excellent detection performance for very small-sized (32×32) images, but has a problem in that detection performance for large-sized (224×224) images is very poor. Related art 3 may be referred to as a MAHA technology. (Prior Document 1) Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In Proceedings of International Conference on Learning Representations, 2017.(Prior literature 2) Shiyu Liang, Yixuan Li, and R Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In 6th International Conference on Learning Representations, ICLR 2018, 2018.(Prior Document 3) Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting an out-of-distribution samples and adversarial attacks. Advances in neural information processing systems, 31, 2018. SUMMARY An object of the present invention is to provide an out-of-distribution detection system and method that are applied to a deep learning model and have excellent performance for classifying and detecting an in-distribution image and an out-of-distribution image. Another