KR20220061632A - Self-attention module and normalization method using the same - Google Patents

Self-attention module and normalization method using the same Download PDF

Info

Publication number
KR20220061632A
KR20220061632A KR1020200147822A KR20200147822A KR20220061632A KR 20220061632 A KR20220061632 A KR 20220061632A KR 1020200147822 A KR1020200147822 A KR 1020200147822A KR 20200147822 A KR20200147822 A KR 20200147822A KR 20220061632 A KR20220061632 A KR 20220061632A
Authority
KR
South Korea
Prior art keywords
map
pixel
concentration
value
self
Prior art date
Application number
KR1020200147822A
Other languages
Korean (ko)
Other versions
KR102562731B1 (en
Inventor
심현정
이승호
Original Assignee
연세대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 연세대학교 산학협력단 filed Critical 연세대학교 산학협력단
Priority to KR1020200147822A priority Critical patent/KR102562731B1/en
Publication of KR20220061632A publication Critical patent/KR20220061632A/en
Application granted granted Critical
Publication of KR102562731B1 publication Critical patent/KR102562731B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • G06N3/0472

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

The present invention may provide a self-attention module and a normalization method using the same. The self-attention module includes: an attention map acquiring unit to receive a three-dimensional (3D) feature map output in a previous layer of two adjacent layers of an artificial neural network including a plurality of layers and to perform average pooling for a channel wise pixel value to acquire a two-dimensional attention map; a drop mask acquiring unit to compare a pixel value of each pixel of the attention map with a preset threshold value, and to allocate a binary value to the each pixel based on the comparison result to generate a drop mask; an importance map acquiring unit to acquire an importance map by normalizing the pixel value of the each pixel of the attention map to a value in a preset range; a stochastic random selecting unit to randomly select one of a drop mask and the importance map according to a preset probability ratio and outputs the selected one as a final map; and a feature map coupling unit to acquire a normalized feature map by weighting each pixel of the feature map with a pixel value provided at a position corresponding to the final map, and to transmit the acquired normalized feature map to a next layer of the two adjacent layers. The artificial neural network is not excessively concentrated on only a feature part, and carefully identifies the object through a whole region of the object. Accordingly, the object and the object region are accurately discriminated.

Description

자기 집중 모듈 및 이를 이용한 정규화 방법{Self-attention module and normalization method using the same}Self-attention module and normalization method using the same

본 발명은 자기 집중 모듈 및 이를 이용한 정규화 방법에 관한 것으로, 인공 신경망의 약지도 학습을 위한 자기 집중 모듈 및 이를 이용한 정규화 방법에 관한 것이다.The present invention relates to a self-focusing module and a regularization method using the same, and to a self-focusing module for weak map learning of an artificial neural network and a regularization method using the same.

딥러닝 기술이 고도화됨에 따라 인공 신경망이 이미지 비전 분야에서 높은 성능을 보이고 있다. 이미지 비전 분야에서도 이미지로부터 물체의 위치를 경계 상자(bounding box) 형태로 탐지하는 객체 위치 탐지(object localization) 기술과 의미적 단위에 따라 영상을 분할하는 의미적 분할(semantic segmentation) 기술은 영상 편집과 같은 다양한 용도로 활용될 수 있어 활발하게 연구가 진행되고 있다.As deep learning technology advances, artificial neural networks are showing high performance in image vision field. Even in the field of image vision, object localization technology, which detects the position of an object from an image in the form of a bounding box, and semantic segmentation technology, which divides images according to semantic units, As it can be used for various purposes, such as, research is being actively conducted.

도 1은 인공 신경망을 이용한 객체 위치 탐지와 의미적 분할 기술을 설명하기 위한 도면이다.1 is a diagram for describing an object location detection and semantic segmentation technique using an artificial neural network.

도 1에서 (a)는 입력 이미지이고, (b)는 객체 위치 탐지 기법에 따라 도출된 객체 영역을 나타내며, (c)는 의미적 분할 기법에 따라 이미지에서 서로 다른 의미로 분석된 영역이 분할된 이미지를 나타낸다.In FIG. 1, (a) is an input image, (b) is an object region derived according to an object location detection technique, and (c) is an image in which regions analyzed with different meanings are divided according to the semantic segmentation technique. represents an image.

도 1의 (b)에 도시된 바와 같이, 객체 위치 탐지 기법은 이미지에서 미리 학습된 객체의 존재 여부를 탐색하여, 탐색된 객체가 포함된 영역을 경계 박스 형태로 추출하는 기술을 나타낸다. 이때 객체 위치 탐지 기법은 경계 박스의 모서리 좌표값을 추출하도록 구성될 수 있다.As shown in (b) of FIG. 1 , the object location detection technique refers to a technique of extracting a region including the searched object in the form of a bounding box by searching for the existence of a pre-learned object in an image. In this case, the object location detection technique may be configured to extract the edge coordinates of the bounding box.

그리고 의미적 분할 기법은 (c)와 같이, 학습된 방식에 따라 이미지에 포함된 각 객체를 식별하여, 각 객체에 해당하는 영역을 분류하고, 분류된 영역을 구분하여 표시하는 기술로서, (c)에서는 이미지를 고양이, 들판, 산 및 하늘로 의미적으로 구분되어 표시된 예를 나타내었다.And as shown in (c), the semantic segmentation technique identifies each object included in the image according to the learned method, classifies the area corresponding to each object, and displays the classified area by dividing, (c) ) shows an example in which images are semantically divided into cats, fields, mountains, and sky.

이러한 딥러닝의 성과에도 불구하고 이미지의 객체 위치 탐지 및 의미적 분할 방법을 현실 환경에 적용하기 위해서는 인공 신경망이 이미지에서 각 객체를 식별할 수 있도록 대량의 학습 데이터를 이용하여 미리 지도 학습(supervised leaning)되어야 한다. 이때 학습 데이터는 이미지의 각 객체가 미리 구분되고 레이블링되어야 한다. 그러나 학습 데이터는 이미지에서 픽셀 단위 레이블링이 필요하고, 레이블링은 수작업 등으로 이루어지므로 높은 비용으로 인한 학습 데이터 부족 및 클래스의 다양성 부족 문제가 발생한다. Despite these achievements of deep learning, in order to apply the method of object location detection and semantic segmentation of images to the real environment, supervised learning (supervised learning) using a large amount of training data is used so that the artificial neural network can identify each object in the image. ) should be In this case, each object of the image should be classified and labeled in advance in the training data. However, since the training data requires pixel-level labeling in the image, and the labeling is done manually, there is a problem of lack of training data and lack of class diversity due to high cost.

따라서 고비용이 소요되는 학습 데이터를 대량으로 획득하기 어려운 현실 환경에서 딥러닝 모델을 적용하기 위해, 현재는 이미지 수준의 레이블을 활용한 약지도 학습(weakly supervised leaning) 방식이 대안으로 제안되었다. 약지도 학습에서는 각 이미지에 포함된 객체의 영역을 정확하게 구분하여 레이블링되지 않고, 단순히 이미지에 포함된 객체의 종류만이 레이블링된 이미지를 학습데이터로 이용할 수 있어, 부족한 픽셀 수준의 레이블 문제를 해결하고 객체 위치 탐지 및 의미적 분할에서 확장성 있는 신경망 도입을 가능하도록 한다. 즉 약지도 학습에서는 각 객체에 대한 식별자인 클래스 정보만을 제공할 뿐, 위치 정보가 제공되지 않은 이미지를 이용하여 학습되도록 한다.Therefore, in order to apply a deep learning model in a real environment where it is difficult to acquire large amounts of expensive training data, a weakly supervised leaning method using image-level labels has been proposed as an alternative. In weakly supervised learning, it is not possible to accurately classify and label the area of the object included in each image, and only the type of object included in the image can use the labeled image as training data, solving the problem of insufficient pixel-level labeling and It enables the introduction of scalable neural networks in object location detection and semantic segmentation. That is, in weak-supervised learning, only class information, which is an identifier for each object, is provided, and the learning is performed using an image to which location information is not provided.

이때 약지도 학습은 클래스 정보만 활용하기 때문에 이미지 분류 학습의 결과로 도출해낼 수 있는 클래스 활성화맵(class activation map)을 활용하여 객체의 위치 및 형태를 탐지한다. 여기서 인공 신경망에서 클래스 활성화맵은 객체를 식별하고, 객체 영역을 구분하기 위해 주의를 기울여야하는 영역이 표시되는맵을 의미한다.At this time, since weak supervised learning uses only class information, the position and shape of an object are detected using a class activation map that can be derived as a result of image classification learning. Here, in the artificial neural network, the class activation map refers to a map in which an area requiring attention to identify an object and classify an object area is displayed.

도 2는 약지도 학습에서 클래스 활성화맵의 일 예를 나타낸다.2 shows an example of a class activation map in weak supervised learning.

도 2에서 (a)는 입력 이미지이고, (b)는 클래스 활성화맵을 나타낸다.In FIG. 2, (a) is an input image, and (b) is a class activation map.

도 2의 (b)를 살펴보면, 약지도 학습에 의해 학습된 클래스 활성화맵은 객체의 전체 영역에 대해 주의를 집중하기 보다는, 객체를 구분하기에 용이한 희소한 분포를 갖는 특징적(discriminative)인 영역에만 집중하도록 학습된다.Referring to FIG. 2(b), the class activation map learned by weak supervised learning is a characteristic region having a sparse distribution that is easy to distinguish objects rather than focusing attention on the entire region of the object. learn to focus only on

(b)와 같은 클래스 활성화맵의 경우, 객체 식별이 특정 영역에 과도하게 집중되고 나머지 영역은 무시하는 경향이 있다. 이는 객체의 전체적인 윤곽, 즉 객체 영역에 대한 특징이 무시되는 성향이 나타나게 되어, 객체 식별 오류가 발생할 가능성이 존재할 뿐만 아니라, 객체 영역을 식별하기 어렵게 한다. 그러므로 객체가 식별된 특징 영역으로부터 전체적인 객체 영역을 판별하기 위해서 객체 영역을 확장하는 경우에 많은 연산량을 요구하는 문제가 있다.In the case of the class activation map as in (b), object identification tends to be excessively focused on a specific area and ignores the rest. This tends to ignore the overall outline of the object, that is, the characteristic of the object area, and thus there is a possibility that an object identification error may occur and it is difficult to identify the object area. Therefore, there is a problem in that a large amount of computation is required when the object region is extended in order to determine the entire object region from the characteristic region where the object is identified.

이에 인공 신경망의 약지도 학습 시에 객체 특징이 강하게 나타나는 특정 영역에 과도하게 집중하지 않고, 객체 영역 전체가 일정 수준 범위에서 고르게 집중될 수 있도록 학습이 수행될 필요가 있다.Accordingly, it is necessary to perform learning so that the entire object area can be evenly focused in a certain level range without excessively focusing on a specific area where the object characteristics are strongly displayed during weak supervised learning of the artificial neural network.

한국 등록 특허 제10-1169340호 (2012.07.23 등록)Korean Patent Registration No. 10-1169340 (Registered on July 23, 2012)

본 발명의 목적은 인공 신경망의 약지도 학습 시에 추가되어 인공 신경망이 전체 객체 영역에 주의하여 객체를 식별하고 객체 영역을 검출할 수 있도록 하는 자기 집중 모듈 및 이를 이용한 정규화 방법을 제공하는데 있다.An object of the present invention is to provide a self-focusing module and a regularization method using the same, which are added during weak map learning of an artificial neural network so that the artificial neural network can identify an object and detect an object region by paying attention to the entire object region.

본 발명의 다른 목적은 학습 시에 객체의 가장 특징적인 영역을 기지정된 확률 빈도로 마스킹하여 제거함으로써, 객체의 특정 영역에 대해 과도하게 집중되는 것을 방지할 수 있는 자기 집중 모듈 및 이를 이용한 정규화 방법을 제공하는데 있다.Another object of the present invention is to provide a self-concentration module capable of preventing excessive concentration on a specific area of an object by masking and removing the most characteristic area of the object with a predetermined probability frequency during learning and a regularization method using the same is to provide

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 자기 집중 모듈은 다수의 레이어를 포함하는 인공 신경망의 인접한 두 레이어 중 이전 레이어에서 출력되는 3차원의 특징맵을 인가받아 채널 방향의 픽셀값에 대한 평균 풀링을 수행하여 2차원의 집중맵을 획득하는 집중맵 획득부; 상기 집중맵의 각 픽셀의 픽셀값을 기설정된 문턱값과 비교하고, 비교 결과에 따라 각 픽셀에 이진값을 할당하여 드롭 마스크를 생성하는 드롭 마스크 획득부; 상기 집중맵의 각 픽셀의 픽셀값을 기지정된 범위의 값으로 정규화하여 중요도맵을 획득하는 중요도맵 획득부; 상기 드롭 마스크와 상기 중요도맵 중 하나를 기지정된 확률 비율에 따라 랜덤하게 선택하여 최종맵으로 출력하는 확률적 랜덤 선택부; 및 상기 특징맵의 각 픽셀에 상기 최종맵의 대응하는 위치의 픽셀값을 가중하여 정규화 특징맵을 획득하고, 획득된 정규화 특징맵을 인접한 두 레이어 중 다음 레이어로 전달하는 특징맵 결합부를 포함한다.In order to achieve the above object, a self-focusing module according to an embodiment of the present invention receives a three-dimensional feature map output from a previous layer among two adjacent layers of an artificial neural network including a plurality of layers, and adjusts the pixel values in the channel direction. a concentration map acquisition unit that obtains a two-dimensional concentration map by performing average pooling; a drop mask obtaining unit that compares a pixel value of each pixel of the concentration map with a preset threshold value, and allocates a binary value to each pixel according to the comparison result to generate a drop mask; an importance map obtaining unit for obtaining an importance map by normalizing a pixel value of each pixel of the concentration map to a value within a predetermined range; a probabilistic random selection unit for randomly selecting one of the drop mask and the importance map according to a predetermined probability ratio and outputting it as a final map; and a feature map combiner for obtaining a normalized feature map by weighting each pixel of the feature map with a pixel value at a corresponding position in the final map, and transferring the obtained normalized feature map to a next one of two adjacent layers.

상기 드롭 마스크 획득부는 상기 집중맵의 전체 픽셀 수에서 최대 픽셀값의 최상위 자리의 값과 동일한 최상위 자리의 값을 갖는 픽셀의 수의 비에 따라 상기 문턱값을 가변하여 설정할 수 있다.The drop mask obtaining unit may vary and set the threshold value according to a ratio of the number of pixels having the same most significant value as the most significant value of the maximum pixel value in the total number of pixels of the concentration map.

상기 중요도맵 획득부는 시그모이드 활성화 함수를 적용하여 상기 집중맵의 각 픽셀의 픽셀값을 정규화할 수 있다.The importance map obtaining unit may apply a sigmoid activation function to normalize a pixel value of each pixel of the concentration map.

상기 자기 집중 모듈은 상기 인공 신경망이 약지도 학습이 수행되는 경우에 다수의 레이어 중 인접한 두 레이어 사이에 삽입 배치되고, 학습 완료 이후에는 제거될 수 있다.The self-concentration module may be inserted between two adjacent layers among a plurality of layers when the artificial neural network performs weakly supervised learning, and may be removed after learning is completed.

상기 인공 신경망은 입력되는 이미지에서 학습된 객체의 위치를 탐색하는 객체 위치 탐색 장치 또는 객체별 영역을 식별하여 구분하는 의미적 영역 분할 장치로 이용될 수 있다.The artificial neural network may be used as an object location search apparatus for searching the location of a learned object from an input image or a semantic area division apparatus for identifying and classifying areas for each object.

상기 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 자기 집중 모듈을 이용한 정규화 방법은 다수의 레이어를 포함하는 인공 신경망의 인접한 두 레이어 중 이전 레이어에서 출력되는 3차원의 특징맵을 인가받아 채널 방향의 픽셀값에 대한 평균 풀링을 수행하여 2차원의 집중맵을 획득하는 단계; 상기 집중맵의 각 픽셀의 픽셀값을 기설정된 문턱값과 비교하고, 비교 결과에 따라 각 픽셀에 이진값을 할당하여 드롭 마스크를 생성하는 단계; 상기 집중맵의 각 픽셀의 픽셀값을 기지정된 범위의 값으로 정규화하여 중요도맵을 획득하는 단계; 상기 드롭 마스크와 상기 중요도맵 중 하나를 기지정된 확률 비율에 따라 랜덤하게 선택하여 최종맵으로 출력하는 단계; 및 상기 특징맵의 각 픽셀에 상기 최종맵의 대응하는 위치의 픽셀값을 가중하여 정규화 특징맵을 획득하고, 획득된 정규화 특징맵을 인접한 두 레이어 중 다음 레이어로 전달하는 단계를 포함한다.In a normalization method using a self-focusing module according to another embodiment of the present invention for achieving the above object, a three-dimensional feature map output from a previous layer among two adjacent layers of an artificial neural network including a plurality of layers is applied, and the channel direction obtaining a two-dimensional concentration map by performing average pooling on pixel values of ; generating a drop mask by comparing a pixel value of each pixel of the concentration map with a preset threshold value and assigning a binary value to each pixel according to the comparison result; obtaining an importance map by normalizing a pixel value of each pixel of the concentration map to a value within a predetermined range; randomly selecting one of the drop mask and the importance map according to a predetermined probability ratio and outputting it as a final map; and obtaining a normalized feature map by weighting each pixel of the feature map with a pixel value of a corresponding position in the final map, and transferring the obtained normalized feature map to a next layer among two adjacent layers.

따라서, 본 발명의 실시예에 따른 자기 집중 모듈 및 이를 이용한 정규화 방법은 학습 시에 특징맵을 인가받아, 자기 집중맵을 생성하여 객체의 가장 특징적인 영역을 판별하고, 판별된 영역을 기지정된 확률 빈도로 마스킹하여 해당 영역에 대한 집중도를 저하시킴으로써 전체 객체 영역에서 가장 특징적인 영역과 나머지 영역 사이의 집중도 편차가 저감되도록 할 수 있다. 그러므로 특정 영역과 비특징 영역의 집중도 비중이 일정 수준 이내가 되도록 정규화하여 인공 신경망이 특징 부분에만 과도하게 집중하지 않고, 객체 전체 영역에도 주의하여 객체를 식별하도록 하므로, 정확하게 객체와 객체 영역을 정확하게 식별하도록 할 수 있다.Accordingly, the self-concentration module and the normalization method using the same according to an embodiment of the present invention receive a feature map during learning, generate a self-concentration map, determine the most characteristic area of the object, and determine the determined area with a predetermined probability By masking with frequency to decrease the concentration of the corresponding area, it is possible to reduce the concentration deviation between the most characteristic area and the remaining areas in the entire object area. Therefore, by normalizing the concentration ratio of a specific region and non-feature region to be within a certain level, the artificial neural network does not focus excessively on the feature part and identifies the object paying attention to the entire object region, so that the object and the object region are accurately identified can make it

도 1은 인공 신경망을 이용한 객체 위치 탐지와 의미적 분할 기술을 설명하기 위한 도면이다.
도 2는 약지도 학습에서 클래스 활성화맵의 일 예를 나타낸다.
도 3은 본 발명의 일 실시예에 따른 자기 집중 모듈의 개략적 구조를 나타낸다.
도 4는 도 3의 자기 집중 모듈의 구성별 동작을 설명하기 위한 도면이다.
도 5는 도 3의 자기 집중맵 획득부(110)에서 획득된 자기 집중맵의 일 예를 나타낸다.
도 6은 도 3의 드롭 마스크 획득부와 중요도맵 획득부에서 획득되는 드롭 마스크와 중요도맵의 일 예를 나타낸다.
도 7은 본 실시예에 따른 자기 집중 모듈 적용 여부에 따른 클래스 활성화맵과 객체 위치 탐지 결과의 차이를 비교한 도면이다.
도 8은 본 발명의 일 실시예에 따른 자기 집중 모듈을 이용한 정규화 방법을 나타낸다.
1 is a diagram for describing an object location detection and semantic segmentation technique using an artificial neural network.
2 shows an example of a class activation map in weak supervised learning.
3 shows a schematic structure of a magnetic concentration module according to an embodiment of the present invention.
FIG. 4 is a view for explaining the operation of each configuration of the magnetic concentration module of FIG. 3 .
FIG. 5 shows an example of a self-concentration map obtained by the self-concentration map obtaining unit 110 of FIG. 3 .
6 illustrates an example of the drop mask and importance map obtained by the drop mask acquirer and the importance map acquirer of FIG. 3 .
7 is a diagram comparing a difference between a class activation map and an object location detection result according to whether or not a self-focusing module is applied according to the present embodiment.
8 illustrates a normalization method using a magnetic concentration module according to an embodiment of the present invention.

본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도면 및 첨부 도면에 기재된 내용을 참조하여야만 한다. In order to fully understand the present invention, the operational advantages of the present invention, and the objects achieved by the practice of the present invention, reference should be made to the accompanying drawings illustrating preferred embodiments of the present invention and the contents described in the accompanying drawings.

이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로써, 본 발명을 상세히 설명한다. 그러나, 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며, 설명하는 실시예에 한정되는 것이 아니다. 그리고, 본 발명을 명확하게 설명하기 위하여 설명과 관계없는 부분은 생략되며, 도면의 동일한 참조부호는 동일한 부재임을 나타낸다. Hereinafter, the present invention will be described in detail by describing preferred embodiments of the present invention with reference to the accompanying drawings. However, the present invention may be embodied in various different forms, and is not limited to the described embodiments. In addition, in order to clearly explain the present invention, parts irrelevant to the description are omitted, and the same reference numerals in the drawings indicate the same members.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라, 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "...부", "...기", "모듈", "블록" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. Throughout the specification, when a part "includes" a certain component, it does not exclude other components, unless otherwise stated, meaning that other components may be further included. In addition, terms such as "...unit", "...group", "module", and "block" described in the specification mean a unit that processes at least one function or operation, which is hardware, software, or hardware. and a combination of software.

도 3은 본 발명의 일 실시예에 따른 자기 집중 모듈의 개략적 구조를 나타내고, 도 4는 도 3의 자기 집중 모듈의 구성별 동작을 설명하기 위한 도면이다.3 shows a schematic structure of a magnetic concentration module according to an embodiment of the present invention, and FIG. 4 is a diagram for explaining the operation of each configuration of the magnetic concentration module of FIG. 3 .

본 실시예에 따른 자기 집중 모듈(100)은 약지도 학습이 수행되는 인공 신경망의 학습 시에 결합되는 구성으로, 다수의 레이어를 포함하는 인공 신경망에서 레이어 사이에 배치 결합될 수 있다.The self-concentration module 100 according to the present embodiment is configured to be coupled during learning of an artificial neural network in which weakly supervised learning is performed, and may be arranged and combined between layers in an artificial neural network including a plurality of layers.

도 3을 참조하면, 본 실시예의 자기 집중 모듈(100)은 집중맵 획득부(110), 드롭 마스크 획득부(120), 중요도맵 획득부(130), 확률적 랜덤 선택부(140) 및 특징맵 결합부(150)를 포함할 수 있다.Referring to FIG. 3 , the self-concentration module 100 of the present embodiment includes a concentration map acquisition unit 110 , a drop mask acquisition unit 120 , an importance map acquisition unit 130 , a probabilistic random selection unit 140 , and features. It may include a map combiner 150 .

인공 신경망의 다수의 레이어 각각은 입력 이미지 또는 이전 배치된 레이어에서 출력되는 특징맵을 인가받아 기지정된 연산을 수행하도록 구성된 연산 레이어이며, 이미지 처리에 주로 이용되는 대표적인 인공 신경망인 컨볼루션 신경망(Convolutional Neural Network: 이하 CNN)의 경우, 각 레이어는 컨볼루션 연산을 수행한다. 이에 여기서도 자기 집중 모듈(100)이 인공 신경망의 학습시에 컨볼루션 레이어 사이에 배치되는 것으로 가정하여 설명한다.Each of the plurality of layers of the artificial neural network is an operation layer configured to perform a predetermined operation by receiving an input image or a feature map output from a previously placed layer, and a convolutional neural network, a representative artificial neural network mainly used for image processing. Network: In the case of CNN), each layer performs a convolution operation. Therefore, here as well, it is assumed that the self-focusing module 100 is disposed between convolutional layers when learning the artificial neural network.

도 3 및 도 4를 참조하여, 자기 집중 모듈(100)의 각 구성을 설명하면, 집중맵 획득부(110)는 이전 배치된 레이어에서 추출된 특징맵(F)을 입력으로 인가받는다. 여기서 입력되는 특징맵(F)은 이전 배치된 레이어가 입력된 이미지 또는 이전 레이어에서 출력된 특징맵(F)에 대해 현재까지 학습된 방식에 따라 연산을 수행한 결과로서, RH × W × C (여기서 H는 높이, W는 폭, C는 채널 수)의 3차원 크기를 갖는 맵이다.Referring to FIGS. 3 and 4 , each configuration of the self-concentration module 100 will be described. The concentration map acquisition unit 110 receives a feature map F extracted from a previously disposed layer as an input. Here, the input feature map (F) is the result of performing an operation according to the method learned so far on the image in which the previously placed layer is input or the feature map (F) output from the previous layer, R H × W × C (here, H is the height, W is the width, C is the number of channels) It is a map having a three-dimensional size.

집중맵 획득부(110)는 특징맵(F)이 인가되면, 특징맵(F)의 채널(C)축 방향으로 채널별 평균 풀링(channelwise average pooling) 연산하여, 3차원의 특징맵(F)을 채널 축 방향으로 압축하여 RH × W 크기의 2차원의 집중맵(attention map)(Matt)을 획득한다.When the feature map F is applied, the concentrated map acquisition unit 110 performs a channelwise average pooling operation in the channel (C) axis direction of the feature map (F) to obtain a three-dimensional feature map (F). is compressed in the channel axis direction to obtain a two-dimensional attention map (M att ) of size R H × W.

이때, 집중맵(Matt)에서 각 픽셀의 세기는 이전 배치되어 특징맵을 출력하는 레이어가 일정 수준이상 학습이 된 상태이라면, 각 픽셀의 세기는 배치된 레이어의 학습 수준에 따른 특징 추출 능력(객체 식별 능력)에 비례하여 나타나는 것으로 볼 수 있다. 따라서 이전 레이어가 충분하게 학습된 상태라면, 특징맵에서 각 픽셀의 세기를 나타내는 픽셀값은 객체 특징을 가장 잘 나타내는 영역에 집중적으로 더 큰값으로 나타나게 된다.At this time, if the intensity of each pixel in the concentration map (M att ) is in a state in which a layer that has been previously placed and outputs a feature map has been trained at a certain level or more, the intensity of each pixel is determined by the feature extraction ability ( It can be seen that it appears in proportion to the object identification ability). Therefore, if the previous layer has been sufficiently learned, the pixel value representing the intensity of each pixel in the feature map appears as a larger value intensively in the region that best represents the object feature.

도 5는 도 3의 자기 집중맵 획득부(110)에서 획득된 자기 집중맵의 일 예를 나타낸다.FIG. 5 shows an example of a self-concentration map obtained by the self-concentration map obtaining unit 110 of FIG. 3 .

도 5에 도시된 바와 같이, 인공 신경망이 정상적으로 학습이 완료되어, 새에 대한 이미지로부터 이전 레이어가 정상적으로 특징을 추출한 경우, 추출한 특징 영역을 강조한 집중맵(Matt)에서는 새의 특징이 잘 나타나는 일부 영역들에 큰 픽셀값을 갖는 픽셀이 집중되어 나타남을 알 수 있다.As shown in FIG. 5 , when the artificial neural network is normally trained and features are normally extracted from the previous layer from the image of the bird, a part in which the features of the bird are well displayed in the concentration map (M att ) emphasizing the extracted feature area. It can be seen that pixels having a large pixel value are concentrated in the regions.

집중맵 획득부(110)는 획득된 집중맵(Matt)을 드롭 마스크 획득부(120)와 중요도맵 획득부(130)로 전달한다.The concentration map acquirer 110 transmits the acquired concentration map M att to the drop mask acquirer 120 and the importance map acquirer 130 .

드롭 마스크 획득부(120)는 집중맵(Matt)을 인가받고, 인가된 집중맵(Matt)의 각 픽셀값이 기지정된 문턱값 이상인지 여부를 나타내는 드롭 마스크(Mdrop)를 생성한다. 일 예로 드롭 마스크 획득부(120)는 집중맵(Matt)의 각 픽셀값 중 기지정된 문턱값 이상인 픽셀값은 0으로 설정하고, 문턱값 미만인 픽셀값은 1로 설정하여 드롭 마스크(Mdrop)를 생성할 수 있다.The drop mask acquisition unit 120 receives the concentration map M att , and generates a drop mask M drop indicating whether each pixel value of the applied concentration map M att is equal to or greater than a predetermined threshold value. For example, the drop mask obtaining unit 120 sets a pixel value equal to or greater than a predetermined threshold value among pixel values of the concentration map M att to 0, and sets a pixel value less than the threshold value to 1 to set the drop mask M drop . can create

이때, 드롭 마스크 획득부(120)는 집중맵(Matt)의 전체 픽셀 수에서 최대 픽셀값의 최상위 자리의 값과 동일한 최상위 자리의 값을 갖는 픽셀의 수의 비(γ)를 기초로 문턱값을 설정할 수도 있다. 즉 드롭 마스크 획득부(120)는 집중맵(Matt)의 전체 픽셀에 대한 픽셀값을 우선 분석하고, 분석된 픽셀값 중 최대 픽셀값을 검출하여, 최대 픽셀값의 최상위 자리의 값을 확인한다. 그리고 나머지 픽셀에서 픽셀값의 최상위 자리의 값이 동일한 픽셀의 개수를 카운트한다. 이후 집중맵(Matt)의 전체 픽셀 수와 카운트된 픽셀 수 사이의 비에 따라 문턱값을 설정하고, 설정된 문턱값에 따라 드롭 마스크(Mdrop)를 생성할 수 있다.In this case, the drop mask obtaining unit 120 determines the threshold value based on the ratio γ of the number of pixels having the same highest digit value as the highest digit value of the maximum pixel value in the total number of pixels of the concentration map M att . can also be set. That is, the drop mask obtaining unit 120 first analyzes pixel values for all pixels of the concentration map M att , detects the maximum pixel value among the analyzed pixel values, and confirms the value of the highest digit of the maximum pixel value . Then, the number of pixels having the same value of the highest digit of the pixel value in the remaining pixels is counted. Thereafter, a threshold value may be set according to a ratio between the total number of pixels of the concentration map M att and the counted number of pixels, and a drop mask M drop may be generated according to the set threshold value.

즉 드롭 마스크 획득부(120)는 픽셀값이 큰 픽셀의 수에 대응하여 문턱값을 가변적으로 설정할 수 있다. 이는 집중맵(Matt)에서 특징이 집중된 영역의 크기에 따라 문턱값을 적응적으로 조절할 수 있도록 하기 위함이다.That is, the drop mask obtainer 120 may variably set the threshold value in response to the number of pixels having a large pixel value. This is to enable the threshold value to be adaptively adjusted according to the size of the feature-focused region in the concentration map (M att ).

한편, 중요도맵 획득부(130)는 집중맵(Matt)을 인가받고, 인가된 집중맵(Matt)의 픽셀값의 분포를 기지정된 방식으로 정규화하여 중요도맵(Mimp)을 생성한다. 집중맵(Matt)의 경우, 픽셀값의 편차가 매우 크게 나타날 수 있으며, 이는 특징이 강하게 나타나는 특정 영역에 대해 과도하게 집중된 결과를 초래하게 될 수 있다. 따라서 중요도맵 획득부(130)는 특징이 강하게 나타나는 영역과 나머지 영역 사이의 편차가 일정 범위 이내로 제한되도록 함으로써, 특징 영역에 대한 과도하게 집중되는 것을 방지하도록 한다.Meanwhile, the importance map acquisition unit 130 receives the concentration map M att , and normalizes the distribution of pixel values of the applied concentration map M att in a predetermined manner to generate the importance map M imp . In the case of the concentration map M att , the deviation of pixel values may be very large, which may result in excessive concentration in a specific region where the feature is strongly displayed. Accordingly, the importance map acquisition unit 130 prevents excessive concentration of the feature region by limiting the deviation between the region in which the feature appears strongly and the remaining region within a predetermined range.

중요도맵 획득부(130)는 일 예로 시그모이드(sigmoid) 활성화 함수를 이용하여 집중맵(Matt)의 각 픽셀값을 0과 1사이의 값으로 정규화함으로써, 중요도맵(Mimp)을 획득할 수 있다. 즉 중요도맵(Mimp)에서 특징이 강하게 나타나는 픽셀의 경우 1에 가까운 픽셀값을 갖고, 특징이 나타나지 않는 픽셀의 경우 0에 가까운 픽셀값을 가질 수 있다.The importance map acquisition unit 130 obtains the importance map M imp by, for example, normalizing each pixel value of the concentration map M att to a value between 0 and 1 using a sigmoid activation function. can do. That is, a pixel having a strong feature in the importance map M imp may have a pixel value close to 1, and a pixel having no feature may have a pixel value close to 0.

확률적 랜덤 선택부(140)는 드롭 마스크 획득부(120)에서 획득된 드롭 마스크(Mdrop)와 중요도맵 획득부(130)에서 획득된 중요도맵(Mimp)을 인가받고, 기지정된 마스크 확률 비율에 따라 드롭 마스크(Mdrop)와 중요도맵(Mimp) 중 하나를 확률적으로 랜덤하게 선택한다.The probabilistic random selection unit 140 receives the drop mask M drop obtained from the drop mask obtaining unit 120 and the importance map M imp obtained from the importance map obtaining unit 130 , and receives a predetermined mask probability. According to the ratio, one of the drop mask (M drop ) and the importance map (M imp ) is selected probabilistically and randomly.

여기서 확률적 랜덤 선택부(140)가 마스크 확률 비율에 따라 드롭 마스크(Mdrop)와 중요도맵(Mimp)을 랜덤하게 선택하는 것은 특징 영역과 나머지 영역 사이에 대한 주의 비율을 조절하기 위해서이다.Here, the probabilistic random selector 140 randomly selects the drop mask M drop and the importance map M imp according to the mask probability ratio to adjust the attention ratio between the feature region and the remaining regions.

중요도맵(Mimp)은 비록 정규화를 통해 특징이 강하게 나타나는 특징 영역과 나머지 영역 사이의 편차를 감소시키기 위해 획득되는 맵이지만, 결과적으로는 여전히 특징 영역의 픽셀값이 크게 나타나므로 특징 영역에 주의가 집중되는 것을 방지하기 어렵다.Although the importance map (M imp ) is a map obtained to reduce the deviation between the feature region in which the feature appears strongly through normalization and the rest of the region, as a result, the pixel value of the feature region still appears large, so pay attention to the feature region. It is difficult to prevent concentration.

그에 반해, 드롭 마스크(Mdrop)의 경우, 특징이 강하게 나타나는 특징 영역을 마스킹하여 특징 영역 이외의 나머지 영역에 관심을 갖도록 하지만, 드롭 마스크(Mdrop)가 항시 적용되는 경우, 특징 영역에 대해 완전히 주의를 기울이지 않게 되는 결과를 초래하게 된다.In contrast, in the case of the drop mask (M drop ), the feature region in which the feature appears strongly is masked to draw attention to the remaining regions other than the feature region, but when the drop mask (M drop ) is always applied, the feature region is completely This results in a lack of attention.

따라서 확률적 랜덤 선택부(140)는 특징 영역에 주의가 집중되지만, 특징 영역에만 과도하게 주의가 집중되지 않도록 마스크 확률 비율에 따라 드롭 마스크(Mdrop)와 중요도맵(Mimp)을 랜덤하게 선택한다. 일 예로 확률 비율이 0.1로 설정된 경우, 확률적 랜덤 선택부(140)는 중요도맵(Mimp)과 드롭 마스크(Mdrop)를 9 : 1의 확률 비율로 랜덤하게 선택할 수 있다.Accordingly, the probabilistic random selector 140 randomly selects a drop mask (M drop ) and an importance map (M imp ) according to the mask probability ratio so that attention is focused on the feature region, but not excessively focused only on the feature region. do. For example, when the probability ratio is set to 0.1, the probabilistic random selector 140 may randomly select the importance map M imp and the drop mask M drop at a probability ratio of 9: 1.

특징맵 결합부(150)는 확률적 랜덤 선택부(140)에서 선택된 최종맵(Mfin)을 자기 집중 모듈(100)의 입력인 특징맵(F)에 가중하여 정규화 특징맵(Fn)을 출력한다. 특징맵 결합부(150)는 RH × W × C 크기의 3차원 특징맵(F)에 RH × W 크기의 2차원 최종맵(Mfin)의 대응하는 위치별 픽셀값을 곱하여 정규화 특징맵(Fn)을 획득할 수 있다.The feature map combiner 150 weights the final map (M fin ) selected by the probabilistic random selector 140 to the feature map (F) that is the input of the self-concentration module 100 to obtain a normalized feature map (F n ) print out The feature map combining unit 150 is a normalized feature map by multiplying the 3D feature map (F) of size R H × W × C by the pixel value for each location corresponding to the 2D final map (M fin ) of size R H × W (F n ) can be obtained.

이때, 확률적 랜덤 선택부(140)에서 중요도맵(Mimp)이 선택된 경우, 특징맵(F)의 픽셀값의 편차는 중요도맵(Mimp)에 의해 저감되어 정규화 특징맵(Fn)으로 출력된다. 그러나 확률적 랜덤 선택부(140)에서 드롭 마스크(Mdrop)가 선택된 경우, 특징맵(F)에서 픽셀값이 큰 픽셀들은 드롭 마스크(Mdrop)에 의해 마스킹되는 반면, 나머지 픽셀들은 픽셀값을 그대로 유지하게 된다. 따라서 픽셀값이 큰 픽셀을 제외한 나머지 영역에 대한 중요도를 높일 수 있게 한다.At this time, when the importance map (M imp ) is selected by the probabilistic random selector 140 , the deviation of the pixel values of the feature map (F) is reduced by the importance map (M imp ) and converted to the normalized feature map (F n ) is output However, when the drop mask M drop is selected by the probabilistic random selector 140 , pixels having a large pixel value in the feature map F are masked by the drop mask M drop , while the remaining pixels have pixel values. will keep it as is. Accordingly, it is possible to increase the importance of the remaining regions except for the pixel having a large pixel value.

도 6은 도 3의 드롭 마스크 획득부와 중요도맵 획득부에서 획득되는 드롭 마스크와 중요도맵의 일 예를 나타낸다.6 illustrates an example of the drop mask and importance map obtained by the drop mask acquirer and the importance map acquirer of FIG. 3 .

도 6에서 우측 상단이 드롭 마스크(Mdrop)를 나타내고, 우측 하단이 중요도맵(Mimp)을 나타낸다.In FIG. 6 , the upper right represents the drop mask (M drop ), and the lower right represents the importance map (M imp ).

도 5에서와 같이, 집중맵 획득부(110)가 새의 특징이 잘 나타나는 일부 영역의 픽셀값이 크게 강조된 집중맵(Matt)이 획득되면, 드롭 마스크 획득부(120)는 픽셀값이 문턱값 이상인 영역, 즉 특징이 잘 나타나는 영역이 선택적으로 소거될 수 있도록 드롭 마스크(Mdrop)를 획득한다. 상기한 바와 같이, 특징맵 결합부(150)에서 드롭 마스크(Mdrop)가 특징맵(F)에 결합되면, 정규화 특징맵(Fn)은 드롭 마스크(Mdrop)에 의해 마스킹되는 영역(도 5에서는 검은색 영역)의 픽셀값이 모두 0으로 되어 소거되는 반면, 나머지 픽셀의 픽셀값은 그대로 유지된다.As shown in FIG. 5 , when the concentration map acquiring unit 110 acquires the concentration map M att in which the pixel value of a partial region where the characteristic of a bird is well emphasized is acquired, the drop mask acquiring unit 120 sets the pixel value to the threshold. A drop mask (M drop ) is obtained so that a region greater than or equal to a value, ie, a region in which a feature is well displayed, can be selectively erased. As described above, when the drop mask (M drop ) is combined with the feature map (F) in the feature map combining unit 150, the normalized feature map (F n ) is an area masked by the drop mask (M drop ) (Fig. In 5, the pixel values of the black region) are all 0 and are erased, while the pixel values of the remaining pixels are maintained as they are.

한편, 중요도맵(Mimp)의 경우, 집중맵(Matt)과 동일한 패턴을 갖지만, 픽셀간 픽셀값의 편차를 줄여준다.On the other hand, the importance map M imp has the same pattern as the concentration map M att , but reduces the deviation of pixel values between pixels.

도 7은 본 실시예에 따른 자기 집중 모듈 적용 여부에 따른 클래스 활성화맵과 객체 위치 탐지 결과의 차이를 비교한 도면이다.7 is a diagram comparing a difference between a class activation map and an object location detection result according to whether or not a self-focusing module is applied according to the present embodiment.

도 7에서 빨간색 선은 참값(Groundtruth)을 나타내고, 녹색선은 학습된 인공 신경망의 객체 위치 탐지 결과를 나타낸다.In FIG. 7 , a red line indicates a groundtruth, and a green line indicates an object position detection result of the learned artificial neural network.

도 7에서 (a)는 본 실시예에 따른 자기 집중 모듈(100)을 적용하지 않고 학습을 수행한 결과를 나타내고, (b)는 자기 집중 모듈(100)에서 드롭 마스크(Mdrop)만을 기지정된 확률 비율로 적용하여 학습을 수행한 결과를 나타내며, (c)는 중요도맵(Mimp)만을 적용하여 학습을 수행한 결과를 나타낸다. 그리고 (d)는 본 실시예에 따른 자기 집중 모듈(100)이 드롭 마스크(Mdrop)와 중요도맵(Mimp)을 확률 비율에 따라 랜덤하게 선택하여 학습을 수행한 결과를 나타낸다.In FIG. 7, (a) shows a result of learning without applying the self-focusing module 100 according to the present embodiment, and (b) shows a drop mask (M drop ) in which only the drop mask (M drop ) is specified in the self-concentration module 100 . The result of learning by applying the probability ratio is shown, and (c) shows the result of learning by applying only the importance map (M imp ). And (d) shows a result of learning by randomly selecting a drop mask (M drop ) and an importance map (M imp ) according to a probability ratio by the self-focusing module 100 according to the present embodiment.

도 7에 도시된 바와 같이, 자기 집중 모듈(100)을 적용하지 않고 약지도 학습을 수행하는 경우, 참값과 인공 신경망의 탐지 결과에 매우 큰 오차가 남을 알 수 있다. 그러나 중요도맵(Mimp)만을 적용하여 학습을 수행하더라도 참값과의 오차를 크게 줄일 수 있으며, 드롭 마스크(Mdrop)만을 적용하는 경우, 오차를 매우 줄일 수 있다. 그러나 드롭 마스크(Mdrop)만을 적용하는 경우, 가운데 이미지와 같이, 경우에 따라서는 여전히 일부 오차를 나타낼 수 있다. 그에 반해, 본 실시예에 따른 자기 집중 모듈(100)을 적용하는 경우, 항시 안정적으로 객체 위치를 정확하게 탐색할 수 있도록 학습되었음을 알 수 있다.As shown in FIG. 7 , when the weak map learning is performed without applying the self-concentration module 100, it can be seen that a very large error remains between the true value and the detection result of the artificial neural network. However, even when learning is performed by applying only the importance map (M imp ), the error from the true value can be greatly reduced, and when only the drop mask (M drop ) is applied, the error can be greatly reduced. However, when only the drop mask (M drop ) is applied, as in the middle image, in some cases, it may still show some error. On the other hand, when the self-focusing module 100 according to the present embodiment is applied, it can be seen that the learning has been performed so as to always stably and accurately search an object position.

도 8은 본 발명의 일 실시예에 따른 자기 집중 모듈을 이용한 정규화 방법을 나타낸다.8 illustrates a normalization method using a magnetic concentration module according to an embodiment of the present invention.

도 3 내지 도 7을 참조하여, 도 8의 자기 집중 모듈을 이용한 정규화 방법을 설명하면, 약지도 학습 시에 이전 레이어에서 획득된 특징맵(F)을 입력받는다(S10). 여기서 특징맵(F)은 이전 레이어가 입력 이미지 또는 그 이전 레이어에서 획득한 특징맵을 인가받고, 현재까지 학습된 방식에 따라 인가된 입력 이미지 또는 특징맵의 특징을 추출하여 획득한 맵으로 RH × W × C 의 3차원 크기를 갖는 맵이다.Referring to FIGS. 3 to 7 , the normalization method using the self-focusing module of FIG. 8 will be described. When learning a weak map, a feature map F obtained from a previous layer is input ( S10 ). Here, the feature map ( F ) is a map obtained by receiving an input image or a feature map obtained from the previous layer of the previous layer and extracting the features of the applied input image or feature map according to the method learned so far. It is a map with a three-dimensional size of × W × C.

특징맵(F)이 인가되면, 우선 3차원 크기의 특징맵(F)에서 채널별로 평균 풀링을 수행하여 각 픽셀별로 채널이 집중된 RH × W 크기의 2차원의 집중맵(Matt)을 획득한다.When the feature map (F) is applied, first, average pooling is performed for each channel in the feature map (F) of the three-dimensional size to obtain a two-dimensional concentration map (M att ) of size R H × W in which the channels are concentrated for each pixel. do.

그리고 획득된 집중맵(Matt)의 각 픽셀값을 기지정된 문턱값과 비교하여, 문턱값 이상인지 미만인지에 따라 각 픽셀에 서로 다른 이진값을 할당하여 드롭 마스크(Mdrop)를 생성한다(S30). 이때, 문턱값은 집중맵(Matt)의 전체 픽셀 수에서 최대 픽셀값의 최상위 자리의 값과 동일한 최상위 자리의 값을 갖는 픽셀의 수의 비(γ)에 따라 가변적으로 설정될 수 있다. Then, each pixel value of the obtained concentration map (M att ) is compared with a predetermined threshold value, and a drop mask (M drop ) is generated by assigning different binary values to each pixel according to whether it is above or below the threshold ( S30). In this case, the threshold value may be variably set according to the ratio γ of the number of pixels having the same highest digit value as the highest digit value of the maximum pixel value in the total number of pixels of the concentration map M att .

이와 함께 획득된 집중맵(Matt)의 각 픽셀값을 기지정된 범위로 정규화하여 중요도맵(Mimp)을 생성한다(S40). 이때 중요도맵(Mimp)은 집중맵(Matt)의 각 픽셀값에 대해 시그모이드 활성화 함수를 적용하여 획득될 수 있다.In addition, each pixel value of the obtained concentration map M att is normalized to a predetermined range to generate an importance map M imp ( S40 ). In this case, the importance map M imp may be obtained by applying a sigmoid activation function to each pixel value of the concentration map M att .

드롭 마스크(Mdrop)와 중요도맵(Mimp)이 획득되면, 획득된 드롭 마스크(Mdrop)와 중요도맵(Mimp) 중 하나를 기설정된 확률 비율에 따라 랜덤하게 선택하여 최종맵(Mfin)으로 획득한다(S60).When the drop mask (M drop ) and the importance map (M imp ) are obtained, one of the obtained drop mask (M drop ) and the importance map (M imp ) is randomly selected according to a preset probability ratio and the final map (M fin ) is obtained. ) to obtain (S60).

그리고 입력된 특징맵(F)의 각 픽셀에 획득된 최종맵(Mfin)의 대응하는 픽셀값을 가중하여 정규화 특징맵(Fn)을 획득한다(S70). 여기서 획득된 정규화 특징맵(Fn)을 인공 신경망의 다음 레이어로 전달된다. 그리고 인공 신경망의 학습 시에 역전파되는 손실은 정규화 특징맵(Fn)이 전달되는 다음 레이어로부터 특징맵(F)이 출력되는 이전 레이어로 그대로 전달되어 기존의 학습 기법이 그대로 유지될 수 있다.Then, a normalized feature map (F n ) is obtained by weighting each pixel of the input feature map (F) with a corresponding pixel value of the obtained final map (M fin ) ( S70 ). The normalized feature map (F n ) obtained here is transferred to the next layer of the artificial neural network. In addition, the loss propagated during the learning of the artificial neural network is transferred from the next layer to which the normalized feature map (F n ) is delivered to the previous layer to which the feature map (F) is output, so that the existing learning technique can be maintained as it is.

결과적으로 본 실시예에 따른 자기 집중 모듈 및 이의 정규화 방법은 인공 신경망의 학습 시에 다수의 레이어 사이에 삽입되어 이전 레이어에서 출력되는 특징맵에서 과도하게 강조된 특징 영역과 나머지 영역 사이에서 주의가 집중되는 차이를 줄여 객체 영역을 더욱 정확하게 구분할 수 있도록 한다.As a result, the self-concentration module and its regularization method according to this embodiment are inserted between a plurality of layers during training of the artificial neural network, and attention is concentrated between the over-emphasized feature region and the remaining regions in the feature map output from the previous layer. By reducing the difference, it is possible to more accurately distinguish the object area.

본 발명에 따른 방법은 컴퓨터에서 실행시키기 위한 매체에 저장된 컴퓨터 프로그램으로 구현될 수 있다. 여기서 컴퓨터 판독가능 매체는 컴퓨터에 의해 액세스 될 수 있는 임의의 가용 매체일 수 있고, 또한 컴퓨터 저장 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함하며, ROM(판독 전용 메모리), RAM(랜덤 액세스 메모리), CD(컴팩트 디스크)-ROM, DVD(디지털 비디오 디스크)-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등을 포함할 수 있다.The method according to the present invention may be implemented as a computer program stored in a medium for execution by a computer. Here, the computer-readable medium may be any available medium that can be accessed by a computer, and may include all computer storage media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, and read dedicated memory), RAM (Random Access Memory), CD (Compact Disk)-ROM, DVD (Digital Video Disk)-ROM, magnetic tape, floppy disk, optical data storage, and the like.

본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다.Although the present invention has been described with reference to the embodiment shown in the drawings, which is only exemplary, those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom.

따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 청구범위의 기술적 사상에 의해 정해져야 할 것이다.Accordingly, the true technical protection scope of the present invention should be defined by the technical spirit of the appended claims.

100: 자기 집중 모듈 110: 집중맵 획득부
120: 드롭 마스크 획득부 130: 중요도맵 획득부
140: 확률적 랜덤 선택부 150: 특징맵 결합부
100: self concentration module 110: concentration map acquisition unit
120: drop mask acquisition unit 130: importance map acquisition unit
140: probabilistic random selection unit 150: feature map combining unit

Claims (10)

다수의 레이어를 포함하는 인공 신경망의 인접한 두 레이어 중 이전 레이어에서 출력되는 3차원의 특징맵을 인가받아 채널 방향의 픽셀값에 대한 평균 풀링을 수행하여 2차원의 집중맵을 획득하는 집중맵 획득부;
상기 집중맵의 각 픽셀의 픽셀값을 기설정된 문턱값과 비교하고, 비교 결과에 따라 각 픽셀에 이진값을 할당하여 드롭 마스크를 생성하는 드롭 마스크 획득부;
상기 집중맵의 각 픽셀의 픽셀값을 기지정된 범위의 값으로 정규화하여 중요도맵을 획득하는 중요도맵 획득부;
상기 드롭 마스크와 상기 중요도맵 중 하나를 기지정된 확률 비율에 따라 랜덤하게 선택하여 최종맵으로 출력하는 확률적 랜덤 선택부; 및
상기 특징맵의 각 픽셀에 상기 최종맵의 대응하는 위치의 픽셀값을 가중하여 정규화 특징맵을 획득하고, 획득된 정규화 특징맵을 인접한 두 레이어 중 다음 레이어로 전달하는 특징맵 결합부를 포함하는 자기 집중 모듈.
A concentration map acquisition unit that receives a three-dimensional feature map output from a previous layer among two adjacent layers of an artificial neural network including multiple layers and performs average pooling on pixel values in the channel direction to obtain a two-dimensional concentration map ;
a drop mask obtaining unit that compares a pixel value of each pixel of the concentration map with a preset threshold value, and allocates a binary value to each pixel according to the comparison result to generate a drop mask;
an importance map obtaining unit for obtaining an importance map by normalizing a pixel value of each pixel of the concentration map to a value within a predetermined range;
a probabilistic random selection unit for randomly selecting one of the drop mask and the importance map according to a predetermined probability ratio and outputting it as a final map; and
and a feature map combiner for obtaining a normalized feature map by weighting each pixel of the feature map with a pixel value at a corresponding position in the final map, and transferring the obtained normalized feature map to a next one of two adjacent layers. module.
제1항에 있어서, 상기 드롭 마스크 획득부는
상기 집중맵의 전체 픽셀 수에서 최대 픽셀값의 최상위 자리의 값과 동일한 최상위 자리의 값을 갖는 픽셀의 수의 비에 따라 상기 문턱값을 가변하여 설정하는 자기 집중 모듈.
The method of claim 1, wherein the drop mask acquisition unit
The self-concentration module is configured to vary and set the threshold value according to a ratio of the number of pixels having the same highest digit value to the highest digit value of the maximum pixel value in the total number of pixels in the concentration map.
제1항에 있어서, 상기 중요도맵 획득부는
시그모이드 활성화 함수를 적용하여 상기 집중맵의 각 픽셀의 픽셀값을 정규화하는 자기 집중 모듈.
The method of claim 1, wherein the importance map acquisition unit
A self-focusing module for normalizing the pixel value of each pixel of the concentration map by applying a sigmoid activation function.
제1항에 있어서, 상기 자기 집중 모듈은
상기 인공 신경망이 약지도 학습이 수행되는 경우에 다수의 레이어 중 인접한 두 레이어 사이에 삽입 배치되고, 학습 완료 이후에는 제거되는 자기 집중 모듈.
According to claim 1, wherein the magnetic concentration module is
A self-concentration module in which the artificial neural network is inserted and disposed between two adjacent layers among a plurality of layers when weak-supervised learning is performed, and is removed after learning is completed.
제4항에 있어서, 상기 인공 신경망은
입력되는 이미지에서 학습된 객체의 위치를 탐색하는 객체 위치 탐색 장치 또는 객체별 영역을 식별하여 구분하는 의미적 영역 분할 장치로 이용되도록 학습되는 자기 집중 모듈.
The method of claim 4, wherein the artificial neural network
A self-concentration module that is learned to be used as an object location search device for searching the location of a learned object from an input image or a semantic area dividing device for identifying and classifying areas for each object.
다수의 레이어를 포함하는 인공 신경망의 인접한 두 레이어 중 이전 레이어에서 출력되는 3차원의 특징맵을 인가받아 채널 방향의 픽셀값에 대한 평균 풀링을 수행하여 2차원의 집중맵을 획득하는 단계;
상기 집중맵의 각 픽셀의 픽셀값을 기설정된 문턱값과 비교하고, 비교 결과에 따라 각 픽셀에 이진값을 할당하여 드롭 마스크를 생성하는 단계;
상기 집중맵의 각 픽셀의 픽셀값을 기지정된 범위의 값으로 정규화하여 중요도맵을 획득하는 단계;
상기 드롭 마스크와 상기 중요도맵 중 하나를 기지정된 확률 비율에 따라 랜덤하게 선택하여 최종맵으로 출력하는 단계; 및
상기 특징맵의 각 픽셀에 상기 최종맵의 대응하는 위치의 픽셀값을 가중하여 정규화 특징맵을 획득하고, 획득된 정규화 특징맵을 인접한 두 레이어 중 다음 레이어로 전달하는 단계를 포함하는 자기 집중 모듈을 이용한 정규화 방법.
obtaining a two-dimensional concentration map by receiving a three-dimensional feature map output from a previous layer among two adjacent layers of an artificial neural network including a plurality of layers and performing average pooling on pixel values in a channel direction;
generating a drop mask by comparing a pixel value of each pixel of the concentration map with a preset threshold value and assigning a binary value to each pixel according to the comparison result;
obtaining an importance map by normalizing a pixel value of each pixel of the concentration map to a value within a predetermined range;
randomly selecting one of the drop mask and the importance map according to a predetermined probability ratio and outputting it as a final map; and
A self-concentration module comprising the steps of weighting each pixel of the feature map with a pixel value of a corresponding position in the final map to obtain a normalized feature map, and transferring the obtained normalized feature map to the next one of two adjacent layers. Normalization method used.
제6항에 있어서, 상기 드롭 마스크를 생성하는 단계는
상기 집중맵의 전체 픽셀에 대한 픽셀값을 분석하여 최대 픽셀값을 검출하고, 최대 픽셀값의 최상위 자리의 값을 확인하는 단계;
최상위 자리의 값이 동일한 픽셀의 개수를 카운트하는 단계;
상기 집중맵의 전체 픽셀 수와 카운트된 픽셀 수 사이의 비에 따라 문턱값을 설정하는 단계; 및
상기 집중맵의 픽셀값과 설정된 문턱값을 비교하여, 드롭 마스크를 획득하는 단계를 포함하는 자기 집중 모듈을 이용한 정규화 방법.
7. The method of claim 6, wherein generating the drop mask comprises:
detecting a maximum pixel value by analyzing pixel values for all pixels of the concentration map, and confirming a value of an uppermost digit of the maximum pixel value;
counting the number of pixels having the same value of the most significant digit;
setting a threshold value according to a ratio between the total number of pixels in the concentration map and the counted number of pixels; and
and comparing a pixel value of the concentration map with a set threshold to obtain a drop mask.
제6항에 있어서, 상기 중요도맵을 획득하는 단계는
시그모이드 활성화 함수를 적용하여 상기 집중맵의 각 픽셀의 픽셀값을 정규화하는 자기 집중 모듈을 이용한 정규화 방법.
The method of claim 6, wherein the obtaining of the importance map comprises:
A normalization method using a self-focusing module that normalizes a pixel value of each pixel of the concentration map by applying a sigmoid activation function.
제6항에 있어서, 상기 자기 집중 모듈은
상기 인공 신경망이 약지도 학습이 수행되는 경우에 다수의 레이어 중 인접한 두 레이어 사이에 삽입 배치되는 자기 집중 모듈을 이용한 정규화 방법.
The method of claim 6, wherein the magnetic concentration module is
A regularization method using a self-focusing module in which the artificial neural network is inserted and disposed between two adjacent layers among a plurality of layers when weak-supervised learning is performed.
제9항에 있어서, 상기 인공 신경망은
입력되는 이미지에서 학습된 객체의 위치를 탐색하는 객체 위치 탐색 장치 또는 객체별 영역을 식별하여 구분하는 의미적 영역 분할 장치로 이용되도록 학습되는 자기 집중 모듈을 이용한 정규화 방법.
10. The method of claim 9, wherein the artificial neural network
A normalization method using a self-concentration module, which is learned to be used as an object location search device for searching the location of a learned object from an input image, or a semantic domain division device for identifying and classifying areas for each object.
KR1020200147822A 2020-11-06 2020-11-06 Self-attention module and normalization method using the same KR102562731B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200147822A KR102562731B1 (en) 2020-11-06 2020-11-06 Self-attention module and normalization method using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200147822A KR102562731B1 (en) 2020-11-06 2020-11-06 Self-attention module and normalization method using the same

Publications (2)

Publication Number Publication Date
KR20220061632A true KR20220061632A (en) 2022-05-13
KR102562731B1 KR102562731B1 (en) 2023-08-01

Family

ID=81583148

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200147822A KR102562731B1 (en) 2020-11-06 2020-11-06 Self-attention module and normalization method using the same

Country Status (1)

Country Link
KR (1) KR102562731B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100040236A (en) * 2008-10-09 2010-04-19 삼성전자주식회사 Two dimensional image to three dimensional image converter and conversion method using visual attention analysis
KR20110131727A (en) * 2010-05-31 2011-12-07 경북대학교 산학협력단 Method and system for recognizing an object in an image processing system
KR20190113119A (en) * 2018-03-27 2019-10-08 삼성전자주식회사 Method of calculating attention for convolutional neural network
US20190311223A1 (en) * 2017-03-13 2019-10-10 Beijing Sensetime Technology Development Co., Ltd. Image processing methods and apparatus, and electronic devices
US20200160889A1 (en) * 2018-11-19 2020-05-21 Netflix, Inc. Techniques for identifying synchronization errors in media titles

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100040236A (en) * 2008-10-09 2010-04-19 삼성전자주식회사 Two dimensional image to three dimensional image converter and conversion method using visual attention analysis
KR20110131727A (en) * 2010-05-31 2011-12-07 경북대학교 산학협력단 Method and system for recognizing an object in an image processing system
KR101169340B1 (en) 2010-05-31 2012-07-30 경북대학교 산학협력단 Method and System for Recognizing an Object in an Image Processing System
US20190311223A1 (en) * 2017-03-13 2019-10-10 Beijing Sensetime Technology Development Co., Ltd. Image processing methods and apparatus, and electronic devices
KR20190113119A (en) * 2018-03-27 2019-10-08 삼성전자주식회사 Method of calculating attention for convolutional neural network
US20200160889A1 (en) * 2018-11-19 2020-05-21 Netflix, Inc. Techniques for identifying synchronization errors in media titles

Also Published As

Publication number Publication date
KR102562731B1 (en) 2023-08-01

Similar Documents

Publication Publication Date Title
US9367758B2 (en) Feature extraction device, feature extraction method, and feature extraction program
US9524430B1 (en) Method for detecting texts included in an image and apparatus using the same
US8934724B2 (en) Image recognition device, image recognizing method, storage medium that stores computer program for image recognition
Bianco et al. Logo recognition using cnn features
US10262214B1 (en) Learning method, learning device for detecting lane by using CNN and testing method, testing device using the same
US20110081081A1 (en) Method for recognizing objects in images
US9740965B2 (en) Information processing apparatus and control method thereof
US9275447B2 (en) Method and system for describing image region based on color histogram
Weideman et al. Integral curvature representation and matching algorithms for identification of dolphins and whales
CN111310800B (en) Image classification model generation method, device, computer equipment and storage medium
KR102508067B1 (en) Apparatus and Method for Generating Learning Data for Semantic Image Segmentation Based On Weak Supervised Learning
Zhong et al. Visual orientation inhomogeneity based scale-invariant feature transform
CN111401387A (en) Abnormal sample construction method and device, computer equipment and storage medium
CN111126401A (en) License plate character recognition method based on context information
US9710703B1 (en) Method and apparatus for detecting texts included in a specific image
Cao et al. Content-oriented image quality assessment with multi-label SVM classifier
US7231086B2 (en) Knowledge-based hierarchical method for detecting regions of interest
KR102562731B1 (en) Self-attention module and normalization method using the same
CN114399731B (en) Target positioning method under supervision of single coarse point
US11977607B2 (en) CAM-based weakly supervised learning object localization device and method
Fujita et al. Fine-tuned pre-trained mask R-CNN models for surface object detection
KR101741761B1 (en) A classification method of feature points required for multi-frame based building recognition
Estrada et al. Appearance-based keypoint clustering
CN113963295A (en) Method, device, equipment and storage medium for recognizing landmark in video clip
CN113095147A (en) Skin area detection method, system, image processing terminal and storage medium

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant