WO2023096011A1 - Device and method for zero-shot semantic segmentation - Google Patents

Device and method for zero-shot semantic segmentation Download PDF

Info

Publication number
WO2023096011A1
WO2023096011A1 PCT/KR2021/019077 KR2021019077W WO2023096011A1 WO 2023096011 A1 WO2023096011 A1 WO 2023096011A1 KR 2021019077 W KR2021019077 W KR 2021019077W WO 2023096011 A1 WO2023096011 A1 WO 2023096011A1
Authority
WO
WIPO (PCT)
Prior art keywords
class
semantic
encoder
prototype
vector
Prior art date
Application number
PCT/KR2021/019077
Other languages
French (fr)
Korean (ko)
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 연세대학교 산학협력단
Publication of WO2023096011A1 publication Critical patent/WO2023096011A1/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/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/469Contour-based spatial representations, e.g. vector-coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations

Definitions

  • the present invention relates to an apparatus and method for semantic segmentation, and more particularly, to a zero-shot semantic segmentation apparatus and method capable of semantic segmentation even for an unlearned class.
  • Semantic segmentation means segmenting an input image into regions corresponding to each identifiable class, and can be applied to various application fields such as autonomous driving, medical imaging, and image editing.
  • the goal of this semantic image segmentation is to label each of a plurality of pixels of an input image by classifying objects such as people, cars, and bicycles into designated classes.
  • CNNs convolutional neural networks
  • the zero-shot semantic technique is a technique for performing semantic segmentation using additional information for not only classes learned in the learning process but also unlearned classes.
  • zero-shot semantic segmentation refers to a technique capable of semantic segmentation for not only learned classes but also unlearned classes during learning.
  • Existing zero-shot semantic segmentation performed semantic segmentation using a generative method.
  • the generative method is a technique of performing semantic segmentation through multiple stages, and is a technique of performing zero-shot semantic segmentation by separately generating features for unlearned classes.
  • semantic segmentation is performed by generating a feature for an unlearned class in the final stage and inputting the feature to a classifier.
  • Such a generative method causes a bias problem to perform semantic segmentation without considering semantic features, and the bias problem means a problem of classifying an unlearned class into a learned class.
  • the existing generative method has a problem in that a classifier must be newly trained every time a new class appears or disappears, making it difficult to use in practice.
  • the present invention proposes a zero-shot semantic segmentation apparatus and method that does not require continuous classifier learning by performing semantic segmentation on unlearned classes in a discriminant manner.
  • the present invention proposes a zero-shot semantic segmentation apparatus and method capable of reducing the bias problem of classifying an unlearned class into a pre-learned class.
  • a visual encoder for receiving an input image and outputting a visual feature map through neural network operation; a semantic encoder that receives a feature vector for each class and outputs a prototype vector for each class through a neural network operation; A semantic segmentation unit for designating a class for each pixel of the visual feature map by comparing the prototype vector for each class with a channel vector for each pixel of the visual feature map, A class corresponding to a similar prototype vector is designated as a class of a corresponding pixel, the prototype vector and the channel vector are set to the same length, and the visual encoder and the semantic encoder share at least one same loss and are simultaneously trained.
  • a semantic segmentation device is provided.
  • the loss shared by the visual encoder and the semantic encoder includes a prototype loss, wherein the prototype loss is between a prototype vector of a specific class output from the semantic encoder and a median value of channel vectors of the corresponding class of the visual feature map. corresponds to the loss of
  • a median value of channel vectors of a specific class output from the visual encoder is learned in a direction that becomes the same as a prototype vector of the corresponding class output from the semantic encoder.
  • the semantic encoder is trained using semantic loss such that a distance between feature vectors for each class input to the semantic encoder is equal to a distance between prototype vectors for each class output from the semantic encoder.
  • a first semantic segmentation map generated by applying a feature vector for each class to the input image is input to the semantic encoder.
  • L center is the prototype loss
  • c is the class
  • S is the total set of classes
  • p is a pixel
  • Rc is a set of pixels of a specific class
  • v(p) is the channel vector at pixel position p in the visual feature map
  • ⁇ (p) is a prototype vector output from the semantic encoder by inputting the feature vector of pixel position p in the first semantic segmentation map
  • d() is a function outputting the distance between two variables.
  • the semantic encoder applies a feature vector for each class of the input image, reduces the image to which the feature vector for each class is applied, and linearly interpolates the reduced image to an original image size.
  • the second semantic segmentation map enlarged by is input.
  • Prototype loss using the second semantic segmentation map is calculated as in the following equation.
  • L bar is the prototype loss
  • c is the class
  • S is the total set of classes
  • p is a pixel
  • Rc is the set of pixels of a particular class
  • v(p) is the channel vector at pixel position p in the visual feature map
  • d() is a function outputting the distance between two variables.
  • the class corresponding to the prototype vector most similar to the vector is designated as the class of the corresponding pixel, the prototype vector and the channel vector are set to the same length, and the visual encoder and the semantic encoder share at least one same loss,
  • a semantic segmentation method that is simultaneously learned is provided.
  • semantic segmentation is performed on unlearned classes in a discriminant manner, so continuous classifier learning is not required, and the bias problem of classifying unlearned classes into pre-learned classes can be reduced.
  • FIG. 1 is a block diagram showing the overall structure of a zero-shot semantic segmentation apparatus according to an embodiment of the present invention
  • FIG. 2 is a diagram showing an example of an embedding space of channel vectors output from a visual encoder according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating a principle of performing semantic segmentation on an unlearned class according to an embodiment of the present invention.
  • FIG. 4 is a diagram showing a learning structure of a visual encoder and a semantic encoder according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating a principle of generating a first semantic segmentation map generated for learning of a semantic segmentation device according to an embodiment of the present invention
  • FIG. 6 is a diagram illustrating a principle of generating a second semantic map generated for learning of a semantic segmentation device according to an embodiment of the present invention
  • FIG. 7 is a diagram for conceptually explaining prototype loss according to an embodiment of the present invention.
  • FIG. 8 is a diagram for explaining semantic loss according to an embodiment of the present invention.
  • FIG. 9 is a flowchart illustrating a learning method of a zero-shot semantic segmentation apparatus according to an embodiment of the present invention.
  • FIG. 1 is a block diagram showing the overall structure of a zero-shot semantic segmentation device according to an embodiment of the present invention.
  • a zero-shot semantic segmentation apparatus includes a visual encoder 100, a semantic encoder 200, and a semantic segmentation unit 300.
  • An image 50 for semantic segmentation is input to the visual encoder 100 .
  • the visual encoder 100 outputs a visual feature map 150 for the input image 50 through neural network operation.
  • the visual encoder 100 may output a visual feature map through a neural network operation such as CNN.
  • the input image 50 has a size of H 1 XW 1
  • the visual feature map 150 output through the visual encoder 100 may have a size of H 2 XW 2 XC.
  • H means height and W means width.
  • the size of the input image and the size (height and width) of the visual feature map may be the same or set differently.
  • C means the length of the channel vector of each pixel of the visual feature map.
  • the visual feature map 150 has a channel vector for each pixel, and the visual encoder 100 that outputs the visual feature map 150 learns to output a similar channel vector for each object class included in the input image 50. .
  • FIG. 2 is a diagram illustrating an example of an embedding space of channel vectors output from a visual encoder according to an embodiment of the present invention.
  • points located around the first point 210 are channel vectors of pixels representing cars
  • points located around the second point 220 are channel vectors of pixels representing bicycles.
  • the visual encoder 100 learns to position pixels representing cars adjacent to each other in the embedding space
  • the visual encoder 100 learns to position pixels representing bicycles adjacent to each other in the embedding space. do.
  • a feature vector of a class to be divided is input to the semantic encoder 200 .
  • the classification target classes are cars and bicycles
  • the feature vectors of cars and bicycles are input to the semantic encoder 200 .
  • the semantic encoder 200 receiving the feature vector of the class to be divided outputs the corresponding prototype vector 250 of the feature vector of each class through neural network operation.
  • the semantic encoder 200 outputs a prototype vector for a bicycle and a prototype vector for a car, respectively.
  • the semantic encoder 200 may be a Fully Connected (FC) neural network, but is not limited thereto.
  • the feature vector input to the semantic encoder 200 is a vector that can be obtained from a commercial database.
  • databases such as Wikipedia provide feature vectors for each class, and such commercially obtainable feature vectors are input to the semantic encoder 200.
  • the length of the prototype vector output from the semantic encoder 200 and the channel vector for each pixel output through the visual encoder 100 are set to be the same.
  • the semantic segmentation unit 300 performs semantic segmentation using the prototype vector for each class output from the semantic encoder 200 and the visual feature map output from the visual encoder 100 .
  • the semantic segmentation unit 300 performs semantic segmentation by comparing each channel vector of the visual feature map with the prototype vector for each class and specifying a class for each pixel of the visual feature map. Specifically, the semantic segmentation unit 300 calculates a similarity between a channel vector of a specific pixel and prototype vectors for each class output from the semantic encoder 200 .
  • the semantic segmentation unit 300 determines a prototype vector of a specific class having the highest similarity with the channel vector of the corresponding pixel, and designates the class of the corresponding prototype vector as the class of the corresponding pixel.
  • semantic segmentation is performed on the class input to the semantic encoder 200 .
  • the classes input to the semantic encoder 200 are bicycle, car, and background, one of bicycle, car, and background is designated for each pixel.
  • the semantic segmentation unit 300 performs semantic segmentation by searching for a prototype vector for each class that is most similar to the channel vector of each pixel and designating the class of the searched prototype vector as the class of the corresponding pixel. .
  • the operation of the semantic segmentation apparatus of the present invention described with reference to FIG. 1 is described when the visual encoder 100 and the semantic encoder 200 are completed and the semantic segmentation apparatus is used in the inference step.
  • the semantic segmentation apparatus shown in FIG. 1 enables semantic segmentation even for classes that have not been learned in advance.
  • the pre-learned classes in the visual encoder 100 and the semantic encoder 200 are bicycle, car, and background.
  • the neural network user determines that it is necessary to perform semantic segmentation on a person, the neural network user inputs the feature vector of the person to the semantic encoder 200 to perform zero-shot semantic segmentation on a class that has not been learned in advance. do.
  • the neural network user inputs feature vectors for a bicycle, a car, and a person into the semantic encoder 200 together.
  • the semantic encoder 200 outputs a prototype vector for a bicycle, a prototype vector for a car, and a prototype vector for a person according to a pre-learned method.
  • FIG. 3 is a diagram illustrating a principle of performing semantic segmentation on an unlearned class according to an embodiment of the present invention.
  • an input image 50 is input to the visual encoder 100 .
  • feature vectors for car and bicycle which are pre-learned classes
  • feature vectors for person which are non-learned classes
  • the semantic segmentation unit 300 performs semantic segmentation using the bicycle prototype vector, the automobile prototype vector, and the human prototype vector output from the semantic encoder 200 .
  • pixels of channel vectors similar to the prototype vector for a person are classified into a human class
  • pixels of channel vectors similar to a prototype vector for a car are classified as a car class
  • pixels of channel vectors similar to the prototype vector for a bicycle are classified into the bicycle class.
  • FIG. 4 is a diagram illustrating learning structures of a visual encoder and a semantic encoder according to an embodiment of the present invention.
  • the visual encoder 100 and the semantic encoder 200 are artificial neural networks, and neural network weights of the visual encoder 100 and the semantic encoder 200 are set through learning.
  • One of the main features of the learning structure of the present invention is that the visual encoder 100 and the semantic encoder 200 are learned while sharing the same loss, and through this learning structure, the prototype output from the semantic encoder 200 Using a vector, it is possible to perform sematic segmentation on a feature map output from a visual encoder.
  • the visual encoder 100 and the semantic encoder 200 perform learning while sharing prototype loss and crossentropy loss.
  • Prototype loss refers to a loss between a prototype vector of a specific class output from the semantic encoder 200 and a median value of channel vectors of a specific class output from the visual encoder 100 . That is, the visual encoder 100 and the semantic value in a direction in which the median value of channel vectors of a specific class output from the visual encoder 100 and the prototype vector of a specific class output from the semantic encoder 200 become the same due to prototype loss.
  • the encoder 200 is learned.
  • the visual encoder 100 so that the median value of the channel vectors representing the car in the visual feature map output from the visual encoder 100 and the prototype vector for the car output from the semantic encoder 200 are the same. and the semantic encoder 200 is learned.
  • the cross entropy loss is a loss for learning to bring channel vectors and prototype vectors of the same class closer to each other and channel vectors and prototype vectors of different classes to move away from each other.
  • Equation 1 S be the total set of classes, p is the pixel coordinate, R is the visual feature map, c is the class, and Rc is the set of channel vectors of pixels representing a specific class in the visual feature map.
  • the cross entropy loss is It can be calculated as in Equation 1.
  • ⁇ c is a weight vector of a specific class c
  • ⁇ j is a weight vector of all classes
  • v(p) means a channel vector at pixel position p.
  • Weight vectors can be set through learning, and channel vectors of the same class are learned to have a large dot product with the weight vector of the corresponding class, and are learned to have a small dot product with weight vectors of other classes. Through this, it is possible to learn so that channel vectors and prototype vectors of different classes move away from each other in the embedding space, and channel vectors and prototype vectors of the same class approach each other.
  • a separate semantic segmentation map may be created to perform learning in order to learn the prototype loss.
  • a feature vector of a commercially available class is input to the semantic encoder 200 .
  • the semantic segmentation map is input to the semantic encoder 200 and visual encoder by prototype loss and cross entropy loss ( 100) Me semantic encoder 200 is learned.
  • FIG. 5 is a diagram illustrating a principle of generating a first semantic segmentation map generated for learning of a semantic segmentation apparatus according to an embodiment of the present invention.
  • FIG. 5(a) shows an input image
  • FIG. 5(b) shows a principle of generating a first semantic segmentation map from an input image
  • the input image is a photographed image of a table and a person.
  • the input image of FIG. 5(a) is divided into three classes, table, person, and background.
  • each class region is firstly distinguished from the input image. Since the input image is an image for which the correct answer for the class is already known, it is possible to distinguish the class area for it.
  • a prepared feature vector is applied to each class region. That is, the feature vector for the table, the feature vector for the person, and the feature vector for the background are applied.
  • Each feature vector is obtained from a commercially available database.
  • the first semantic segmentation map 500 is generated by applying the feature vector corresponding to the class of each class area to the input image, and the first semantic segmentation map 500 is input to the semantic encoder.
  • the semantic encoder 200 receives the first semantic segmentation map 500 and outputs a prototype vector for a person, a prototype vector for a table, and a prototype vector for a background.
  • the first prototype loss (L center ) when the first semantic partitioning map 500 is used may be calculated as in Equation 2 below.
  • Equation 2 above c is a class, S is a total set of classes, p is a pixel, Rc is a set of pixels of a specific class, v(p) is a channel vector at pixel position p in the visual feature map, ⁇ (p) is Indicates a prototype vector at pixel position p in the first semantic segmentation map.
  • d(a,b) is a function representing the distance between a and b, and Equation 2 above is learned so that the sum of v(p) and the sum of ⁇ (p) are equal.
  • a bias problem may occur when learning is performed using the first semantic segmentation map.
  • the visual feature map output through the visual encoder 100 is a convolutional neural network (CNN)
  • CNN convolutional neural network
  • pixel values are continuous.
  • the values output from the semantic encoder 200 have discrete values as shown in (b) of FIG. 5 . These differences can hinder learning and cause bias problems.
  • the present invention also proposes a structure for learning using a different type of prototype loss (second prototype loss) using the second semantic segmentation map.
  • FIG. 6 is a diagram illustrating a principle of generating a second semantic map generated for learning of a semantic segmentation apparatus according to an embodiment of the present invention.
  • FIG. 6 the input image is the same as in FIG. 5, and the task of classifying the input image according to the class is performed in the same way.
  • a reduced image 600 by reducing the input image is generated.
  • a feature vector for each class is applied to the reduced image.
  • a feature vector for each class is applied to a non-reduced image, but when a second semantic segmentation map is generated, a feature vector for each class is applied to the reduced image 600 .
  • the second semantic segmentation map 610 is generated by enlarging the reduced image to which the feature vector for each class is applied through linear interpolation. As the image is enlarged through linear interpolation, the feature vector in the boundary area can have continuous features.
  • prototype vectors output from the semantic encoder may also have continuous values in the boundary area.
  • the bias problem occurring during learning can be solved because it has continuous features in the boundary area like the feature map of the visual encoder.
  • Equation 3 shows a method of calculating the second prototype loss (L bar ) using the first semantic partitioning map 610 .
  • the second prototype loss is instead of ⁇ (p) when compared to the first prototype loss in equation (2). There is a difference in that is used. Means prototype vectors output by inputting the second semantic segmentation map to the semantic encoder.
  • FIG. 7 is a diagram for conceptually explaining prototype loss according to an embodiment of the present invention.
  • a feature vector for a car and a feature vector for a bicycle are input to the semantic encoder 200, and the semantic encoder 200 generates a prototype vector 700 for the car and a bicycle. Outputs a prototype vector 710 for
  • an input image is input to the visual encoder 100, and the visual encoder outputs a channel vector for a class for each pixel.
  • a channel vector for a class may be represented on an embedding space 720.
  • the channel vectors representing the car and the channel vectors representing the bicycle are respectively projected onto the embedding space 720, and the median of the channel vectors representing the car is the same as the prototype vector for the car.
  • Prototype loss is calculated so that Prototype loss is calculated in the same way for the bike.
  • the embedding space 720 shown in FIG. 7 can be expressed as a joint embedding space in which the prototype vector of the semantic encoder 200 and the channel vector of the visual encoder 100 are projected together.
  • the semantic loss is a loss of a difference between a distance between input feature vectors of each class and a distance between feature vectors of each class output from the semantic encoder.
  • the semantic encoder 200 performs learning by using semantic loss so that a distance difference between input class-specific feature vectors becomes equal to a distance difference between output prototype vectors for each class.
  • the distance difference between feature vectors will be relatively small. However, since dogs and humans have low shape similarity, the distance difference between feature vectors will be relatively large. Learning using semantic loss is performed so that the distance difference between these feature vectors is also reflected in the prototype vectors.
  • FIG. 8 is a diagram for explaining semantic loss according to an embodiment of the present invention.
  • a feature vector embedding space 800 and a prototype vector embedding space 810 are shown.
  • the classes are Table, Cat, Dog, and Human.
  • the feature vectors of each class obtained from the commercial database are projected onto the embedding space 800 of the feature vector, and the prototype vectors output after each feature vector is input to the semantic encoder 200 are the embedding space of the prototype vector ( 810).
  • the difference between the distance between two classes in the embedding space 800 of the feature vector and the distance between the two classes in the embedding space 800 of the prototype vector can be defined as semantic loss. 4 can be defined as
  • Equation 4 above i and j denote classes, S denotes a set of classes, r ij denotes the distance between class i and class j in the embedding space of the feature vector, denotes the distance between class i and class j in the embedding space of the prototype vector.
  • FIG. 9 is a flowchart illustrating a learning method of a zero-shot semantic segmentation apparatus according to an embodiment of the present invention.
  • the learning method shown in FIG. 9 is a flowchart illustrating a case of performing learning using the second semantic partitioning map.
  • an input image is input to the visual encoder 100 to generate a visual feature map (step 900).
  • the input image is reduced (step 902).
  • a feature vector corresponding to each class is applied to the reduced input image (step 904).
  • the reduced image to which the feature vector is applied is enlarged through linear interpolation and restored to the original size to generate a second semantic segmentation map (step 906).
  • the second semantic segmentation map is input to the semantic encoder 200 to output prototype vectors for each class (step 908).
  • a second prototype loss is calculated using the channel vectors for each class of the visual feature map and the prototype vector for each class output from the semantic encoder 200 (step 910).
  • the second prototype loss can be calculated as in Equation 3.
  • a cross entropy loss is calculated using channel vectors output from the visual feature map (step 912).
  • the cross entropy loss can be calculated as in Equation 1.
  • cross entropy loss is used to learn channel vectors of the same class to move closer in the embedding space and channel vectors of different classes to move away from the embedding space.
  • a semantic loss is calculated using the distance between feature vectors for each class input to the semantic encoder and the distance between prototype vectors for each class output from the semantic encoder (step 914). Semantic loss can be calculated as in Equation 4.
  • the visual encoder 100 and the semantic encoder 200 are simultaneously trained using the second prototype loss and the cross entropy loss (step 916). Weights of the visual encoder 100 and the semantic encoder 200 are simultaneously updated using the second prototype loss and the cross entropy loss. Meanwhile, in the semantic encoder 200, the weight update is performed by reflecting the semantic loss as well.
  • the method according to the present invention may be implemented as a computer program stored in a medium for execution on a computer.
  • computer readable media may be any available media that can be accessed by a computer, and may also 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, including read-only memory (ROM) dedicated memory), random access memory (RAM), compact disk (CD)-ROM, digital video disk (DVD)-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

A device and a method for zero-shot semantic segmentation are disclosed. The disclosed device comprises: a visual encoder for receiving an input image and outputting a visual feature map through a neural network operation; a semantic encoder for receiving a feature vector for each class and outputting a prototype vector for each class through a neural network operation; and a semantic segmentation unit for comparing the prototype vector for each class with a channel vector for each pixel of the visual feature map so as to designate a class for each pixel of the visual feature map, wherein the semantic segmentation unit designates, as a class of a specific pixel, a class corresponding to a prototype vector most similar to a channel vector of the pixel, the prototype vector and the channel vector are configured to have the same length, and the visual encoder and the semantic encoder share at least one same loss and are trained simultaneously. According to the disclosed device and method, semantic segmentation is performed on an unlearned class in a discriminant manner, so that continuous classifier learning is not required, and a bias problem of classifying the unlearned class into a pre-learned class can be reduced.

Description

제로샷 시맨틱 분할 장치 및 방법Zero-shot semantic segmentation device and method
본 발명은 시맨틱 분할 장치 및 방법에 관한 것으로서, 더욱 상세하게는 학습되지 않은 클래스에 대해서도 시맨틱 분할이 가능한 제로샷 시맨틱 분할 장치 및 방법에 관한 것이다. The present invention relates to an apparatus and method for semantic segmentation, and more particularly, to a zero-shot semantic segmentation apparatus and method capable of semantic segmentation even for an unlearned class.
시맨틱 분할(semantic segmentation)은 입력 영상을 식별 가능한 클래스 각각에 대응하는 영역별로 분할하는 것을 의미하며, 자율 주행, 의료 영상, 영상 편집 등 다양한 응용 분야에 적용될 수 있다. 이러한 시맨틱 영상 분할은 입력 영상의 다수의 픽셀 각각을 사람, 자동차, 자전거 등과 같은 객체를 지정된 클래스로 분류하여 레이블링하는 것을 목표로 한다.Semantic segmentation means segmenting an input image into regions corresponding to each identifiable class, and can be applied to various application fields such as autonomous driving, medical imaging, and image editing. The goal of this semantic image segmentation is to label each of a plurality of pixels of an input image by classifying objects such as people, cars, and bicycles into designated classes.
CNN(convolutional neural networks) 과 같은 인공 신경망을 이용하는 딥 러닝 기반 시맨틱 영상 분할 기술들은 우수한 성능을 나타내지만, 학습을 위해서는 각 객체의 클래스가 픽셀 단위로 레이블되어 클래스별 객체 영역이 정확하게 표현된 픽셀 수준(pixel-level)의 학습 데이터가 대량으로 필요하다.Deep learning-based semantic image segmentation techniques using artificial neural networks such as convolutional neural networks (CNNs) show excellent performance, but for learning, each object class is labeled in pixel units, and the object area for each class is accurately represented at the pixel level ( pixel-level) training data is required in large quantities.
한편, 제로샷 시맨틱 기술은 학습 과정에서 학습된 클래스뿐만 아니라 학습되지 않은 클래스에 대해서도 추가 정보를 이용하여 시맨틱 분할을 수행하는 기법이다. On the other hand, the zero-shot semantic technique is a technique for performing semantic segmentation using additional information for not only classes learned in the learning process but also unlearned classes.
한편, 제로샷 시맨틱 분할은 학습 시에 학습한 클래스뿐만 아니라 학습되지 않은 클래스에 대해서도 시맨틱 분할을 할 수 있는 기법을 의미한다. 기존의 제로샷 시맨틱 분할은 생성적 방법(Generative method)을 이용하여 시맨틱 분할을 수헹하였다. 생성적 방법은 다단의 스테이지를 통해 시맨틱 분할을 수행하는 기법으로서 학습되지 않은 클래스에 대해서는 특징자를 별도로 생성하여 제로샷 시맨틱 분할을 수행하는 기법이다. 생성적 방법은 최종 스테이지에서 학습되지 않은 클래스에 대한 특징자를 생성한 후 이를 분류기에 입력하여 시맨틱 분할을 수행하도록 한다.On the other hand, zero-shot semantic segmentation refers to a technique capable of semantic segmentation for not only learned classes but also unlearned classes during learning. Existing zero-shot semantic segmentation performed semantic segmentation using a generative method. The generative method is a technique of performing semantic segmentation through multiple stages, and is a technique of performing zero-shot semantic segmentation by separately generating features for unlearned classes. In the generative method, semantic segmentation is performed by generating a feature for an unlearned class in the final stage and inputting the feature to a classifier.
이러한, 생성적 방법은 의미 특징을 고려하지 않고 시맨틱 분할을 수행하기에 편향 문제를 발생시키며, 편향 문제는 학습되지 않은 클래스를 학습된 클래스로 분류하는 문제를 의미한다. Such a generative method causes a bias problem to perform semantic segmentation without considering semantic features, and the bias problem means a problem of classifying an unlearned class into a learned class.
아울러, 기존의 생성적 방법은 새로운 클래스가 새롭게 등장하거나 없어지는 경우 분류기를 매번 새롭게 학습시켜야 하는 문제가 있어 현실적으로 사용하기 어려운 문제점이 있었다. In addition, the existing generative method has a problem in that a classifier must be newly trained every time a new class appears or disappears, making it difficult to use in practice.
본 발명은 학습되지 않은 클래스에 대해 판별적 방식으로 시맨틱 분할을 수행하여 지속적인 분류기 학습을 요구하지 않은 제로샷 시맨틱 분할 장치 및 방법을 제안한다. The present invention proposes a zero-shot semantic segmentation apparatus and method that does not require continuous classifier learning by performing semantic segmentation on unlearned classes in a discriminant manner.
또한, 본 발명은 학습되지 않은 클래스를 기 학습된 클래스로 분류하는 편향 문제를 저감시킬 수 있는 제로샷 시맨틱 분할 장치 및 방법을 제안한다. In addition, the present invention proposes a zero-shot semantic segmentation apparatus and method capable of reducing the bias problem of classifying an unlearned class into a pre-learned class.
본 발명의 일 측면에 따르면, 입력 이미지를 입력받아 신경망 연산을 통해 비주얼 특징맵을 출력하는 비주얼 인코더; 클래스별 특징 벡터를 입력받아 신경망 연산을 통해 클래스별 프로토타입 벡터를 출력하는 시맨틱 인코더; 상기 클래스별 프로토타입 벡터와 상기 비주얼 특징맵의 픽셀별 채널 벡터를 비교하여 상기 비주얼 특징맵의 픽셀 각각에 대해 클래스를 지정하는 시맨틱 분할부를 포함하되, 상기 시맨틱 분할부는 특정 픽섹의 채널 벡터와 가장 유사한 프로토타입 벡터에 상응하는 클래스를 해당 픽셀의 클래스로 지정하며, 상기 프로토타입 벡터와 상기 채널 벡터는 동일한 길이로 설정되고, 상기 비주얼 인코더와 시맨틱 인코더는 적어도 하나의 동일한 손실을 공유하여 동시에 학습되는 시맨틱 분할 장치가 제공된다. According to one aspect of the present invention, a visual encoder for receiving an input image and outputting a visual feature map through neural network operation; a semantic encoder that receives a feature vector for each class and outputs a prototype vector for each class through a neural network operation; A semantic segmentation unit for designating a class for each pixel of the visual feature map by comparing the prototype vector for each class with a channel vector for each pixel of the visual feature map, A class corresponding to a similar prototype vector is designated as a class of a corresponding pixel, the prototype vector and the channel vector are set to the same length, and the visual encoder and the semantic encoder share at least one same loss and are simultaneously trained. A semantic segmentation device is provided.
상기 비주얼 인코더와 시맨틱 인코더가 공유하는 손실은 프로토타입 손실을 포함하며, 상기 프로토타입 손실은 상기 시맨틱 인코더에서 출력되는 특정 클래스의프로토타입 벡터와 상기 비주얼 특징맵의 해당 클래스의 채널 벡터들의 중간값 사이의 손실에 상응한다. The loss shared by the visual encoder and the semantic encoder includes a prototype loss, wherein the prototype loss is between a prototype vector of a specific class output from the semantic encoder and a median value of channel vectors of the corresponding class of the visual feature map. corresponds to the loss of
상기 프로토타입 손실에 기초하여 상기 비주얼 인코더에서 출력되는 특정 클래스의 채널 벡터들의 중간값은 상기 시맨틱 인코더에서 출력하는 해당 클래스의 프로토타입 벡터와 동일해지는 방향으로 학습된다. Based on the prototype loss, a median value of channel vectors of a specific class output from the visual encoder is learned in a direction that becomes the same as a prototype vector of the corresponding class output from the semantic encoder.
상기 비주얼 인코더와 시맨틱 인코더가 공유하는 손실은 크로스 엔트로피 손실을 포함하며, 상기 크로스 엔트로피 손실에 의해 상기 비주얼 인코더는 동일한 클래스의 채널 벡터들은 임베딩 공간상에서 상대적으로 가까이 위치하고 다른 클래스의 채널 벡터들은 임베딩 공간상에서 상대적으로 멀리 위치하도록 학습된다. The loss shared by the visual encoder and the semantic encoder includes cross entropy loss, and by the cross entropy loss, the visual encoder places channel vectors of the same class relatively close in the embedding space and channel vectors of different classes in the embedding space. It is learned to be located relatively far away.
상기 시맨틱 인코더는 상기 시맨틱 인코더로 입력되는 클래스별 특징 벡터들 사이의 거리와 상기 시맨틱 인코더에서 출력되는 클래스별 프로토타입 벡터들 사이의 거리가 동일해지도록 시맨틱 손실을 이용하여 학습이 이루어진다. The semantic encoder is trained using semantic loss such that a distance between feature vectors for each class input to the semantic encoder is equal to a distance between prototype vectors for each class output from the semantic encoder.
상기 프로토타입 손실을 연산하기 위해 상기 시맨틱 인코더로는 상기 입력 이미지에 클래스별 특징 벡터를 적용하여 생성되는 제1 시맨틱 분할맵을 입력한다. To calculate the prototype loss, a first semantic segmentation map generated by applying a feature vector for each class to the input image is input to the semantic encoder.
상기 제1 시맨틱 분할맵을 이용한 프로토타입 손실은 다음의 수학식과 같이 연산된다. Prototype loss using the first semantic segmentation map is calculated as in the following equation.
Figure PCTKR2021019077-appb-img-000001
Figure PCTKR2021019077-appb-img-000001
위 수학식에서, Lcenter는 프로토타입 손실, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터, μ(p)는 제1 시맨틱 분할맵에서 픽셀 위치 p의 특징 벡터를 입력하여 시맨틱 인코더에서 출력되는 프로토타입 벡터이고, d()는 두 변수의 거리를 출력하는 함수임. In the above equation, L center is the prototype loss, c is the class, S is the total set of classes, p is a pixel, Rc is a set of pixels of a specific class, v(p) is the channel vector at pixel position p in the visual feature map, μ(p) is a prototype vector output from the semantic encoder by inputting the feature vector of pixel position p in the first semantic segmentation map, and d() is a function outputting the distance between two variables.
상기 프로토타입 손실을 연산하기 위해 상기 시맨틱 인코더로는 상기 입력 이미지의 클래스별로 특징 벡터를 적용하고, 상기 클래스별 특징 벡터가 적용된 이미지를 축소하고, 상기 축소된 이미지를 선형 보간을 통해 본래의 이미지 크기로 확대한 제2 시맨틱 분할맵이 입력된다. In order to calculate the prototype loss, the semantic encoder applies a feature vector for each class of the input image, reduces the image to which the feature vector for each class is applied, and linearly interpolates the reduced image to an original image size. The second semantic segmentation map enlarged by is input.
상기 제2 시맨틱 분할맵을 이용한 프로토타입 손실은 다음의 수학식과 같이 연산된다. Prototype loss using the second semantic segmentation map is calculated as in the following equation.
Figure PCTKR2021019077-appb-img-000002
Figure PCTKR2021019077-appb-img-000002
위 수학식에서, Lbar는 프로토타입 손실, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터,
Figure PCTKR2021019077-appb-img-000003
는 제2 시맨틱 분할맵에서 픽셀 위치 p의 특징 벡터를 입력하여 시맨틱 인코더에서 출력되는 프로토타입 벡터이고, d()는 두 변수의 거리를 출력하는 함수임.
In the above equation, L bar is the prototype loss, c is the class, S is the total set of classes, p is a pixel, Rc is the set of pixels of a particular class, v(p) is the channel vector at pixel position p in the visual feature map,
Figure PCTKR2021019077-appb-img-000003
is a prototype vector output from the semantic encoder by inputting the feature vector of pixel position p in the second semantic segmentation map, and d() is a function outputting the distance between two variables.
본 발명의 다른 측면에 따르면, 입력 이미지를 입력받아 신경망 연산을 통해 비주얼 특징맵을 비주얼 인코더를 통해 출력하는 단계(a); 클래스별 특징 벡터를 입력받아 신경망 연산을 통해 클래스별 프로토타입 벡터를 시맨틱 인코더를 통해 출력하는 단계(b); 상기 클래스별 프로토타입 벡터와 상기 비주얼 특징맵의 픽셀별 채널 벡터를 비교하여 상기 비주얼 특징맵의 픽셀 각각에 대해 클래스를 지정하는 단계(c)를 포함하되, 상기 단계 (c)는 특정 픽섹의 채널 벡터와 가장 유사한 프로토타입 벡터에 상응하는 클래스를 해당 픽셀의 클래스로 지정하며, 상기 프로토타입 벡터와 상기 채널 벡터는 동일한 길이로 설정되고, 상기 비주얼 인코더와 시맨틱 인코더는 적어도 하나의 동일한 손실을 공유하여 동시에 학습되는 시맨틱 분할 방법이 제공된다. According to another aspect of the present invention, the step (a) of receiving an input image and outputting a visual feature map through a neural network operation through a visual encoder; Step (b) of receiving a feature vector for each class and outputting a prototype vector for each class through a semantic encoder through a neural network operation; A step (c) of designating a class for each pixel of the visual feature map by comparing the prototype vector for each class with a channel vector for each pixel of the visual feature map, wherein step (c) includes a channel of a specific pixel The class corresponding to the prototype vector most similar to the vector is designated as the class of the corresponding pixel, the prototype vector and the channel vector are set to the same length, and the visual encoder and the semantic encoder share at least one same loss, A semantic segmentation method that is simultaneously learned is provided.
따라서, 본 발명에 의하면, 학습되지 않은 클래스에 대해 판별적 방식으로 시맨틱 분할을 수행하여 지속적인 분류기 학습을 요구하지 않으며, 학습되지 않은 클래스를 기 학습된 클래스로 분류하는 편향 문제를 저감시킬 수 있는 장점이 있다. Therefore, according to the present invention, semantic segmentation is performed on unlearned classes in a discriminant manner, so continuous classifier learning is not required, and the bias problem of classifying unlearned classes into pre-learned classes can be reduced. there is
도 1은 본 발명의 일 실시예에 따른 제로샷 시맨틱 분할 장치의 전체적인 구조를 나타낸 블록도.1 is a block diagram showing the overall structure of a zero-shot semantic segmentation apparatus according to an embodiment of the present invention;
도 2는 본 발명의 일 실시예에 따라 비주얼 인코더에서 출력되는 채널 벡터들의 임베딩 공간의 일례를 나타낸 도면.2 is a diagram showing an example of an embedding space of channel vectors output from a visual encoder according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따라 학습되지 않은 클래스에 대해 시맨틱 분할을 수행하는 원리를 나타낸 도면.3 is a diagram illustrating a principle of performing semantic segmentation on an unlearned class according to an embodiment of the present invention.
도 4는 본 발명의 일 실시예에 따른 비주얼 인코더 및 시맨틱 인코더의 학습 구조를 나타낸 도면.4 is a diagram showing a learning structure of a visual encoder and a semantic encoder according to an embodiment of the present invention.
도 5는 본 발명의 일 실시예에 따른 시맨틱 분할 장치의 학습을 위해 생성되는 제1 시맨틱 분할맵을 생성하는 원리를 나타낸 도면.5 is a diagram illustrating a principle of generating a first semantic segmentation map generated for learning of a semantic segmentation device according to an embodiment of the present invention;
도 6은 본 발명의 일 실시예에 따른 시맨틱 분할 장치의 학습을 위해 생성되는 제2 시맨틱 맵을 생성하는 원리를 나타낸 도면.6 is a diagram illustrating a principle of generating a second semantic map generated for learning of a semantic segmentation device according to an embodiment of the present invention;
도 7은 본 발명의 일 실시예에 따른 프로토타입 손실을 개념적으로 설명하기 위한 도면.7 is a diagram for conceptually explaining prototype loss according to an embodiment of the present invention.
도 8은 본 발명의 일 실시예에 따른 시맨틱 손실을 설명하기 위한 도면.8 is a diagram for explaining semantic loss according to an embodiment of the present invention.
도 9는 본 발명의 일 실시예에 따른 제로샷 시맨틱 분할 장치의 학습 방법을 나타낸 순서도.9 is a flowchart illustrating a learning method of a zero-shot semantic segmentation apparatus according to an embodiment of the present invention.
본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도면 및 첨부 도면에 기재된 내용을 참조하여야만 한다. In order to fully understand the present invention and its operational advantages and objectives 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 many different forms and is not limited to the described embodiments. And, in order to clearly describe 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 means that it may further include other components, not excluding other components unless otherwise stated. In addition, terms such as “… unit”, “… unit”, “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 it can be implemented as a combination of software.
도 1은 본 발명의 일 실시예에 따른 제로샷 시맨틱 분할 장치의 전체적인 구조를 나타낸 블록도이다. 1 is a block diagram showing the overall structure of a zero-shot semantic segmentation device according to an embodiment of the present invention.
도 1을 참조하면, 본 발명의 일 실시예에 따른 제로샷 시맨틱 분할 장치는 비주얼 인코더(100), 시맨틱 인코더(200) 및 시맨틱 분할부(300)를 포함한다. Referring to FIG. 1 , a zero-shot semantic segmentation apparatus according to an embodiment of the present invention includes a visual encoder 100, a semantic encoder 200, and a semantic segmentation unit 300.
비주얼 인코더(100)로는 시맨틱 분할을 위한 이미지(50)가 입력된다. 비주얼 인코더(100)는 신경망 연산을 통해 입력 이미지(50)에 대한 비주얼 특징맵(150)을 출력한다. 일례로, 비주얼 인코더(100)는 CNN 등과 같은 신경망 연산을 통해 비주얼 특징맵을 출력할 수 있다. 입력 이미지(50)가 H1 X W1의 사이즈의 이미지일 경우, 비주얼 인코더(100)를 통해 출력되는 비주얼 특징맵(150)은 H2 X W2 X C의 사이즈를 가질 수 있다. 여기서, H는 높이를 의미하고 W는 폭을 의미한다. 입력 이미지의 사이즈와 비주얼 특징맵의 사이즈(높이 및 폭)은 동일할 수도 있으며 다르게 설정될 수도 있을 것이다. C는 비주얼 특징맵의 각 픽셀이 가지는 채널 벡터의 길이를 의미한다. 비주얼 특징맵(150)은 각 픽셀별로 채널 벡터를 가지게 되며, 비주얼 특징맵(150)을 출력하는 비주얼 인코더(100)는 입력 이미지(50)에 포함된 객체 클래스별로 유사한 채널 벡터를 출력하도록 학습된다. An image 50 for semantic segmentation is input to the visual encoder 100 . The visual encoder 100 outputs a visual feature map 150 for the input image 50 through neural network operation. For example, the visual encoder 100 may output a visual feature map through a neural network operation such as CNN. When the input image 50 has a size of H 1 XW 1 , the visual feature map 150 output through the visual encoder 100 may have a size of H 2 XW 2 XC. Here, H means height and W means width. The size of the input image and the size (height and width) of the visual feature map may be the same or set differently. C means the length of the channel vector of each pixel of the visual feature map. The visual feature map 150 has a channel vector for each pixel, and the visual encoder 100 that outputs the visual feature map 150 learns to output a similar channel vector for each object class included in the input image 50. .
도 2는 본 발명의 일 실시예에 따라 비주얼 인코더에서 출력되는 채널 벡터들의 임베딩 공간의 일례를 나타낸 도면이다. 2 is a diagram illustrating an example of an embedding space of channel vectors output from a visual encoder according to an embodiment of the present invention.
도 2에서, 제1 포인트(210)를 중심으로 위치한 포인트들은 자동차를 나타내는 픽셀들의 채널 벡터들이며, 제2 포인트(220)를 중심으로 위치한 포인트들은 자전거를 나타내는 픽셀들의 채널 벡터들이다. 도 2에 도시된 바와 같이, 자동차를 나타내는 픽셀들은 임베딩 공간에서 서로 인접하여 위치하도록 비주얼 인코더(100)가 학습되고, 자전거를 나타내는 픽셀들은 임베딩 공간에서 서로 인접하여 위치하도록 비주얼 인코더(100)가 학습된다. In FIG. 2 , points located around the first point 210 are channel vectors of pixels representing cars, and points located around the second point 220 are channel vectors of pixels representing bicycles. As shown in FIG. 2, the visual encoder 100 learns to position pixels representing cars adjacent to each other in the embedding space, and the visual encoder 100 learns to position pixels representing bicycles adjacent to each other in the embedding space. do.
한편, 시맨틱 인코더(200)로는 분할 대상 클래스의 특징 벡터가 입력된다. 예를 들어, 분할 대상 클래스가 자동차 및 자전거일 경우 시맨틱 인코더(200)로는 자동차의 특징 벡터 및 자전거의 특징 벡터가 입력된다. 분할 대상 클래스의 특징 벡터를 입력받은 시맨틱 인코더(200)는 신경망 연산을 통해 각 클래스의 특징 벡터의 상응하는 프로토타입 벡터(250)를 출력한다. 예를 들어, 자동차에 대한 특징 벡터 및 자전거에 대한 특징 벡터가 입력될 경우, 시맨틱 인코더(200)는 자전거에 대한 프로토타입 벡터 및 자동차에 대한 프로토타입 벡터를 각각 출력한다. 본 발명의 일 실시예에 따르면, 시맨틱 인코더(200)는 FC(Fully Connected) 신경망일 수 있으나 이에 한정되는 것은 아니다. Meanwhile, a feature vector of a class to be divided is input to the semantic encoder 200 . For example, if the classification target classes are cars and bicycles, the feature vectors of cars and bicycles are input to the semantic encoder 200 . The semantic encoder 200 receiving the feature vector of the class to be divided outputs the corresponding prototype vector 250 of the feature vector of each class through neural network operation. For example, when a feature vector for a car and a feature vector for a bicycle are input, the semantic encoder 200 outputs a prototype vector for a bicycle and a prototype vector for a car, respectively. According to an embodiment of the present invention, the semantic encoder 200 may be a Fully Connected (FC) neural network, but is not limited thereto.
여기서, 시맨틱 인코더(200)로 입력되는 특징 벡터는 상용의 데이터베이스로부터 획득할 수 있는 벡터이다. 예를 들어, 위키피디아와 같은 데이터베이스는 각 클래스별로 특징 벡터를 제공하고 있으며, 이와 같이 상업적으로 획득 가능한 특징 벡터들을 시맨틱 인코더(200)에 입력하는 것이다. Here, the feature vector input to the semantic encoder 200 is a vector that can be obtained from a commercial database. For example, databases such as Wikipedia provide feature vectors for each class, and such commercially obtainable feature vectors are input to the semantic encoder 200.
본 발명의 일 실시예에 따르면, 시맨틱 인코더(200)로부터 출력되는 프로토타입 벡터의 길이와 비주얼 인코더(100)를 통해 출력되는 픽셀별 채널 벡터의 길이는 동일하게 설정된다. According to an embodiment of the present invention, the length of the prototype vector output from the semantic encoder 200 and the channel vector for each pixel output through the visual encoder 100 are set to be the same.
시맨틱 분할부(300)는 시맨틱 인코더(200)에서 출력되는 클래스별 프로토타입 벡터와 비주얼 인코더(100)에서 출력되는 비주얼 특징맵을 이용하여 시맨틱 분할을 수행한다. 시맨틱 분할부(300)는 비주얼 특징맵의 각 채널 벡터와 클래스별 프로토타입 벡터를 비교하여 비주얼 특징맵의 픽셀별로 어느 하나의 클래스를 지정하여 시맨틱 분할을 수행한다. 구체적으로 시맨틱 분할부(300)는 특정 픽셀의 채널 벡터와 시맨틱 인코더(200)로부터 출력된 다수의 클래스별 프로토타입 벡터와의 유사도를 연산한다. 시맨틱 분할부(300)는 해당 픽셀의 채널 벡터와 가장 높은 유사도를 가지는 특정 클래스의 프로토타입 벡터를 판단하고, 해당 프로토타입 벡터의 클래스를 해당 픽셀의 클래스를 지정한다. 이와 같은 픽셀별 클래스 지정 작업이 모든 픽셀에 대해 이루어지면 시맨틱 인코더(200)로 입력된 클래스에 대한 시맨틱 분할이 이루어진다. 예를 들어, 시맨틱 인코더(200)로 입력된 클래스가, 자전거, 자동차 및 백그라운드라고 할 경우, 각 픽셀별로 자전거, 자동차 및 백그라운드 중 어느 하나가 지정되는 것이다. The semantic segmentation unit 300 performs semantic segmentation using the prototype vector for each class output from the semantic encoder 200 and the visual feature map output from the visual encoder 100 . The semantic segmentation unit 300 performs semantic segmentation by comparing each channel vector of the visual feature map with the prototype vector for each class and specifying a class for each pixel of the visual feature map. Specifically, the semantic segmentation unit 300 calculates a similarity between a channel vector of a specific pixel and prototype vectors for each class output from the semantic encoder 200 . The semantic segmentation unit 300 determines a prototype vector of a specific class having the highest similarity with the channel vector of the corresponding pixel, and designates the class of the corresponding prototype vector as the class of the corresponding pixel. When such pixel-by-pixel class designation is performed on all pixels, semantic segmentation is performed on the class input to the semantic encoder 200 . For example, when the classes input to the semantic encoder 200 are bicycle, car, and background, one of bicycle, car, and background is designated for each pixel.
결국, 시맨틱 분할부(300)는 각 픽셀의 채널 벡터와 가장 유사한 클래스별 프로토타입 벡터를 탐색하고, 탐색된 프로토타입 벡터의 클래스를 해당 픽셀의 클래스로 지정하는 작업을 통해 시맨틱 분할을 수행하는 것이다. As a result, the semantic segmentation unit 300 performs semantic segmentation by searching for a prototype vector for each class that is most similar to the channel vector of each pixel and designating the class of the searched prototype vector as the class of the corresponding pixel. .
도 1을 참조하여 설명한 본 발명의 시맨틱 분할 장치는 비주얼 인코더(100) 및 시맨틱 인코더(200)의 학습이 완료되고 시맨틱 분할 장치를 추론 단계에서 이용할 경우의 동작을 설명한 것이다. The operation of the semantic segmentation apparatus of the present invention described with reference to FIG. 1 is described when the visual encoder 100 and the semantic encoder 200 are completed and the semantic segmentation apparatus is used in the inference step.
도 1에 도시된 시맨틱 분할 장치는 미리 학습되지 않은 클래스에 대해서도 시맨틱 분할을 가능하도록 한다. The semantic segmentation apparatus shown in FIG. 1 enables semantic segmentation even for classes that have not been learned in advance.
비주얼 인코더(100) 및 시맨틱 인코더(200)에서 미리 학습된 클래스가 자전거, 자동차 및 백그라운드라고 가정한다. 그런데, 신경망 사용자가 사람에 대해서도 시맨틱 분할을 수행할 필요가 있다고 판단할 경우, 신경망 사용자는 사람에 대한 특징 벡터를 시맨틱 인코더(200)에 입력하여 미리 학습되지 않은 클래스에 대해서도 제로샷 시맨틱 분할이 가능하다. It is assumed that the pre-learned classes in the visual encoder 100 and the semantic encoder 200 are bicycle, car, and background. However, when the neural network user determines that it is necessary to perform semantic segmentation on a person, the neural network user inputs the feature vector of the person to the semantic encoder 200 to perform zero-shot semantic segmentation on a class that has not been learned in advance. do.
이 경우, 신경망 사용자는 자전거, 자동차 및 사람에 대한 특징 벡터를 시맨틱 인코더(200)에 함께 입력한다. 시맨틱 인코더(200)는 미리 학습된 방식에 따라 자전거에 대한 프로토타입 벡터, 자동차에 대한 프로토타입 벡터 및 사람에 대한 프로토타입 벡터를 출력한다. In this case, the neural network user inputs feature vectors for a bicycle, a car, and a person into the semantic encoder 200 together. The semantic encoder 200 outputs a prototype vector for a bicycle, a prototype vector for a car, and a prototype vector for a person according to a pre-learned method.
도 3은 본 발명의 일 실시예에 따라 학습되지 않은 클래스에 대해 시맨틱 분할을 수행하는 원리를 나타낸 도면이다. 3 is a diagram illustrating a principle of performing semantic segmentation on an unlearned class according to an embodiment of the present invention.
도 3을 참조하면, 비주얼 인코더(100)로는 입력 이미지(50)가 입력된다. 또한, 시맨틱 인코더(200)로는 미리 학습된 클래스인 자동차(car) 및 자전거(bicycle)에 대한 특징벡터와 미리 학습되지 않은 클래스인 사람(person)에 대한 특징 벡터가 입력된다. Referring to FIG. 3 , an input image 50 is input to the visual encoder 100 . In addition, feature vectors for car and bicycle, which are pre-learned classes, and feature vectors for person, which are non-learned classes, are input to the semantic encoder 200 .
시맨틱 분할부(300)는 시맨틱 인코더(200)가 출력하는 자전거에 대한 프로토타입 벡터, 자동차에 대한 프로토타입 벡터 및 사람에 대한 프로토타입 벡터를 이용하여 시맨틱 분할을 수행한다. The semantic segmentation unit 300 performs semantic segmentation using the bicycle prototype vector, the automobile prototype vector, and the human prototype vector output from the semantic encoder 200 .
도 3에 도시된 바와 같이, 임베딩 공간에서 사람에 대한 프로토타입 벡터와 유사한 채널 벡터들의 픽셀에 대해서는 사람 클래스로 분류하고, 자동차에 대한 프로토타입 벡터와 유사한 채널 벡터들의 픽셀에 대해서는 자동차 클래스로 분류하며, 자전거에 대한 프로토타입 벡터와 유사한 채널 벡터들의 픽셀에 대해서는 자전거 클래스로 분류한다. As shown in FIG. 3, in the embedding space, pixels of channel vectors similar to the prototype vector for a person are classified into a human class, and pixels of channel vectors similar to a prototype vector for a car are classified as a car class. , pixels of channel vectors similar to the prototype vector for a bicycle are classified into the bicycle class.
도 4는 본 발명의 일 실시예에 따른 비주얼 인코더 및 시맨틱 인코더의 학습 구조를 나타낸 도면이다. 4 is a diagram illustrating learning structures of a visual encoder and a semantic encoder according to an embodiment of the present invention.
앞서 설명한 바와 같이 비주얼 인코더(100) 및 시맨틱 인코더(200)는 인공 신경망이며, 비주얼 인코더(100) 및 시맨틱 인코더(200)의 신경망 가중치는 학습을 통해 설정된다. As described above, the visual encoder 100 and the semantic encoder 200 are artificial neural networks, and neural network weights of the visual encoder 100 and the semantic encoder 200 are set through learning.
본 발명의 학습 구조에서 주요한 특징 중 하나는 비주얼 인코더(100) 및 시맨틱 인코더(200)가 동일한 손실(loss)을 공유하면서 학습된다는 것이며, 이러한 학습 구조를 통해 시맨틱 인코더(200)에서 출력되는 프로토타입 벡터를 이용하여 비주얼 인코더에서 출력하는 특징맵에 대한 시매틱 분할을 수행하는 것이 가능해지도록 한다. One of the main features of the learning structure of the present invention is that the visual encoder 100 and the semantic encoder 200 are learned while sharing the same loss, and through this learning structure, the prototype output from the semantic encoder 200 Using a vector, it is possible to perform sematic segmentation on a feature map output from a visual encoder.
도 4를 참조하면, 본 발명의 일 실시예에 따른 비주얼 인코더(100) 및 시맨틱 인코더(200)는 프로토타입 손실 및 크로스엔트로피 손실을 공유하면서 함께 학습이 이루어진다. Referring to FIG. 4 , the visual encoder 100 and the semantic encoder 200 according to an embodiment of the present invention perform learning while sharing prototype loss and crossentropy loss.
프로토타입 손실은 시맨틱 인코더(200)에서 출력하는 특정 클래스의 프로토타입 벡터와 비주얼 인코더(100)에서 출력하는 특정 클래스의 채널 벡터들의 중간값 사이의 손실을 의미한다. 즉, 프로토타입 손실에 의해 비주얼 인코더(100)에서 출력하는 특정 클래스의 채널 벡터들의 중간값과 시맨틱 인코더(200)에서 출력하는 특정 클래스의 프로토타입 벡터가 동일해지는 방향으로 비주얼 인코더(100) 및 시맨틱 인코더(200)가 학습되는 것이다. Prototype loss refers to a loss between a prototype vector of a specific class output from the semantic encoder 200 and a median value of channel vectors of a specific class output from the visual encoder 100 . That is, the visual encoder 100 and the semantic value in a direction in which the median value of channel vectors of a specific class output from the visual encoder 100 and the prototype vector of a specific class output from the semantic encoder 200 become the same due to prototype loss. The encoder 200 is learned.
프로토타입 손실을 통해, 비주얼 인코더(100)의 출력인 비주얼 특징맵에서 자동차를 나타내는 채널 벡터들의 중간값과 시맨틱 인코더(200)에서 출력하는 자동차에 대한 프로토타입 벡터가 동일해지도록 비주얼 인코더(100) 및 시맨틱 인코더(200)가 학습되는 것이다. Through the prototype loss, the visual encoder 100 so that the median value of the channel vectors representing the car in the visual feature map output from the visual encoder 100 and the prototype vector for the car output from the semantic encoder 200 are the same. and the semantic encoder 200 is learned.
크로스 엔트로피 손실은 동일한 클래스의 채널 벡터 및 프로토타입 벡터는 서로 가까워지도록하고 상이한 클래스의 채널 벡터 및 프로토타입 벡터는 서로 멀어지도록 학습하기 위한 손실이다. The cross entropy loss is a loss for learning to bring channel vectors and prototype vectors of the same class closer to each other and channel vectors and prototype vectors of different classes to move away from each other.
클래스의 총 집합을 S라고하고, p를 픽셀 좌표, R을 비주얼 특징맵, c는 클래스, Rc는 비주얼 특징맵에서 특정 클래스를 나타내는 픽셀들의 채널 벡터 집합이라고 정의할 때, 크로스 엔트로피 손실은 다음의 수학식 1과 같이 연산될 수 있다. Let S be the total set of classes, p is the pixel coordinate, R is the visual feature map, c is the class, and Rc is the set of channel vectors of pixels representing a specific class in the visual feature map. The cross entropy loss is It can be calculated as in Equation 1.
Figure PCTKR2021019077-appb-img-000004
Figure PCTKR2021019077-appb-img-000004
위 수학식 1에서, ωc는 특정 클래스 c의 가중치 벡터이고 ωj는 모든 클래스의 가중치 벡터이며, v(p)는 픽셀 위치 p에서의 채널 벡터를 의미한다. 가중치 벡터들은 학습을 통해 설정될 수 있으며, 동일한 클래스의 채널 벡터들은 해당 클래스의 가중치 벡터와 큰 내적값을 가지도록 학습이 이루어지고, 다른 클래스의 가중치 벡터와는 작은 내적값을 가지도록 학습되는 것을 통해 서로 다른 클래스의 채널 벡터 및 프로토타입 벡터는 임베딩 공간에서 멀어지고 같은 클래스의 채널 벡터 및 프로토타입 벡터는 가까워지도록 학습되는 것이 가능하다. In Equation 1 above, ω c is a weight vector of a specific class c, ω j is a weight vector of all classes, and v(p) means a channel vector at pixel position p. Weight vectors can be set through learning, and channel vectors of the same class are learned to have a large dot product with the weight vector of the corresponding class, and are learned to have a small dot product with weight vectors of other classes. Through this, it is possible to learn so that channel vectors and prototype vectors of different classes move away from each other in the embedding space, and channel vectors and prototype vectors of the same class approach each other.
한편, 본 발명의 바람직한 실시예에 따르면, 프로토타입 손실을 학습하기 위해 별도의 시맨틱 분할맵을 생성하여 학습을 수행할 수 있다. 도 1을 참조하여 살펴본 바와 같이, 추론 단계에서는 시맨틱 인코더(200)로 상업적으로 입수 가능한 클래스의 특징 벡터가 입력된다. 그러나, 학습 단계에서는 클래스의 특징 벡터 자체가 아닌 시맨틱 분할맵을 이용하여 학습을 수행하는 것이 바람직하며, 시맨틱 분할맵이 시맨틱 인코더(200)로 입력되어 프로토타입 손실 및 크로스 엔트로피 손실에 의한 비주얼 인코더(100) 미 시맨틱 인코더(200)의 학습이 이루어진다. Meanwhile, according to a preferred embodiment of the present invention, a separate semantic segmentation map may be created to perform learning in order to learn the prototype loss. As reviewed with reference to FIG. 1 , in the inference step, a feature vector of a commercially available class is input to the semantic encoder 200 . However, in the learning step, it is preferable to perform learning using the semantic segmentation map rather than the feature vector itself of the class, and the semantic segmentation map is input to the semantic encoder 200 and visual encoder by prototype loss and cross entropy loss ( 100) Me semantic encoder 200 is learned.
도 5는 본 발명의 일 실시예에 따른 시맨틱 분할 장치의 학습을 위해 생성되는 제1 시맨틱 분할맵을 생성하는 원리를 나타낸 도면이다. 5 is a diagram illustrating a principle of generating a first semantic segmentation map generated for learning of a semantic segmentation apparatus according to an embodiment of the present invention.
도 5의 (a)는 입력 이미지를 나타내고, 도 5의 (b)는 입력 이미지로부터 제1 시맨틱 분할맵을 생성하는 원리를 나타낸 도면이다. FIG. 5(a) shows an input image, and FIG. 5(b) shows a principle of generating a first semantic segmentation map from an input image.
도 5의 (a)에 도시된 바와 같이, 입력 이미지는 테이블과 사람이 촬영된 이미지이다. 도 5(a)의 입력 이미지는 3개의 클래스로 구분되며, 테이블, 사람 및 백그라운드이다. As shown in (a) of FIG. 5, the input image is a photographed image of a table and a person. The input image of FIG. 5(a) is divided into three classes, table, person, and background.
도 5의 (b)를 참조하면, 1차적으로 입력 이미지에서 각 클래스 영역을 구분한다. 입력 이미지는 클래스에 대한 정답을 이미 알고 있는 이미지이므로 이에 대한 클래스 영역 구분이 가능하다. Referring to (b) of FIG. 5, each class region is firstly distinguished from the input image. Since the input image is an image for which the correct answer for the class is already known, it is possible to distinguish the class area for it.
입력 이미지에서 클래스 영역 구분이 이루어지면, 각 클래스 영역에 준비된 특징 벡터를 적용한다. 즉, 테이블에 대한 특징 벡터, 사람에 대한 특징 벡터 및 백그라운드에 대한 특징 벡터를 적용하는 것이다. 각 특징 벡터는 상업적으로 이용 가능한 데이터베이스로부터 획득한다. When class regions are classified in the input image, a prepared feature vector is applied to each class region. That is, the feature vector for the table, the feature vector for the person, and the feature vector for the background are applied. Each feature vector is obtained from a commercially available database.
이와 같이 각 클래스 영역의 클래스에 상응하는 특징 벡터를 입력 이미지에 적용하여 제1 시맨틱 분할맵(500)이 생성되며, 제1 시맨틱 분할맵(500)이 시맨틱 인코더에 입력되는 것이다. In this way, the first semantic segmentation map 500 is generated by applying the feature vector corresponding to the class of each class area to the input image, and the first semantic segmentation map 500 is input to the semantic encoder.
시맨틱 인코더(200)는 제1 시맨틱 분할맵(500)을 입력받아, 사람에 대한 프로토타입 벡터, 테이블에 대한 프로토타입 벡터 및 백그라운드에 대한 프로토타입 벡터를 출력한다. The semantic encoder 200 receives the first semantic segmentation map 500 and outputs a prototype vector for a person, a prototype vector for a table, and a prototype vector for a background.
제1 시맨틱 분할맵(500)이 이용될 경우의 제1 프로토타입 손실(Lcenter)은 다음의 수학식 2와 같이 연산될 수 있다. The first prototype loss (L center ) when the first semantic partitioning map 500 is used may be calculated as in Equation 2 below.
Figure PCTKR2021019077-appb-img-000005
Figure PCTKR2021019077-appb-img-000005
위 수학식 2에서, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터, μ(p)는 제1 시맨틱 분할맵에서 픽셀 위치 p에서의 프로토타입 벡터를 나타낸다. 또한, d(a,b)는 a와 b 사이의 거리를 나타내는 함수로서, 위 수학식2는 v(p)의 총합과 μ(p)의 총합이 동일해지도록 학습되는 것이다. In Equation 2 above, c is a class, S is a total set of classes, p is a pixel, Rc is a set of pixels of a specific class, v(p) is a channel vector at pixel position p in the visual feature map, μ(p) is Indicates a prototype vector at pixel position p in the first semantic segmentation map. In addition, d(a,b) is a function representing the distance between a and b, and Equation 2 above is learned so that the sum of v(p) and the sum of μ(p) are equal.
결국, 수학식 2와 같은 제1 프로토타입 손실을 통해 특정 클래스의 채널 벡터의 중간값이 해당 클래스의 프로토타입 벡터와 동일해지도록 학습이 이루어지는 것이다. As a result, learning is performed so that the median value of the channel vector of a specific class is equal to the prototype vector of the corresponding class through the first prototype loss as shown in Equation 2.
이와 같은 비주얼 인코더(100)와 채널 인코더(200)의 동시 학습을 통해 채널 인코더(200)의 프로토타입 벡터를 기준으로 비주얼 인코더(100)에서 출력되는 특징맵에 대한 시맨틱 분할이 가능한 것이다. Through such simultaneous learning of the visual encoder 100 and the channel encoder 200, semantic segmentation of the feature map output from the visual encoder 100 is possible based on the prototype vector of the channel encoder 200.
그런데, 제1 시맨틱 분할맵을 이용하여 학습을 수행할 때 편향 문제가 발생할 수 있다. 비주얼 인코더(100)를 통해 출력되는 비주얼 특징맵은 콘불루션 뉴럴 네트워크(CNN)이므로 픽셀들의 값이 연속적이다. 그런데, 시맨틱 인코더(200)에서 출력되는 값은 도 5의 (b)와 같이 이산적인(discrete) 값을 가지게 된다. 이러한 차이는 학습을 방해하고 편향 문제를 야기할 수 있게 된다. However, a bias problem may occur when learning is performed using the first semantic segmentation map. Since the visual feature map output through the visual encoder 100 is a convolutional neural network (CNN), pixel values are continuous. However, the values output from the semantic encoder 200 have discrete values as shown in (b) of FIG. 5 . These differences can hinder learning and cause bias problems.
이에, 본 발명에서는 제2 시맨틱 분할맵을 이용하여 다른 형태의 프로토타입 손실(제2 프로토타입 손실)을 이용하여 학습하는 구조 역시 제안한다. Accordingly, the present invention also proposes a structure for learning using a different type of prototype loss (second prototype loss) using the second semantic segmentation map.
도 6은 본 발명의 일 실시예에 따른 시맨틱 분할 장치의 학습을 위해 생성되는 제2 시맨틱 맵을 생성하는 원리를 나타낸 도면이다. 6 is a diagram illustrating a principle of generating a second semantic map generated for learning of a semantic segmentation apparatus according to an embodiment of the present invention.
도 6에서, 입력 이미지는 도 5와 동일하며 입력 이미지를 클래스에 따라 구분하는 작업은 동일하게 이루어진다. In FIG. 6, the input image is the same as in FIG. 5, and the task of classifying the input image according to the class is performed in the same way.
입력 이미지에서 클래스별 영역이 구분되면, 입력 이미지를 축소한 축소 이미지(600)를 생성한다. 축소 이미지가 생성되면, 축소 이미지에 각 클래스별 특징 벡터를 적용한다. 제1 시맨틱 분할맵은 축소되지 않은 이미지에 클래스별 특징 벡터를 적용하나 제2 시맨틱 분할맵을 생성할 때에는 축소 이미지(600)에 클래스별 특징 벡터를 적용하는 것이다. When regions for each class are divided in the input image, a reduced image 600 by reducing the input image is generated. When a reduced image is created, a feature vector for each class is applied to the reduced image. In the first semantic segmentation map, a feature vector for each class is applied to a non-reduced image, but when a second semantic segmentation map is generated, a feature vector for each class is applied to the reduced image 600 .
축소 이미지(600)에 클래스별 특징 벡터를 적용한 후에는 클래스별 특징 벡터가 적용된 축소 이미지를 선형 보간을 통해 확대하여 제2 시맨틱 분할맵(610)을 생성한다. 선형 보간을 통해 이미지가 확대되면서 경계 영역에서의 특징 벡터는 연속적인 특징을 가질 수 있게 된다. After the feature vector for each class is applied to the reduced image 600, the second semantic segmentation map 610 is generated by enlarging the reduced image to which the feature vector for each class is applied through linear interpolation. As the image is enlarged through linear interpolation, the feature vector in the boundary area can have continuous features.
이에 따라 시맨틱 인코더에서 출력하는 프로토타입 벡터들도 경계 영역에서는 연속적인 값을 가질 수 있다. 결국, 제2 시맨틱 분할맵(610)을 이용하여 학습을 수행할 때 비주얼 인코더의 특징맵과 같이 경계 영역에서 연속적인 특징을 가지므로 학습 시 발생하는 편향 문제를 해결할 수 있다. Accordingly, prototype vectors output from the semantic encoder may also have continuous values in the boundary area. As a result, when learning is performed using the second semantic segmentation map 610, the bias problem occurring during learning can be solved because it has continuous features in the boundary area like the feature map of the visual encoder.
다음의 수학식 3은 제1 시맨틱 분할맵(610)을 이용하여 제2 프로토타입 손실(Lbar)을 계산하는 방법을 나타낸 것이다. Equation 3 below shows a method of calculating the second prototype loss (L bar ) using the first semantic partitioning map 610 .
Figure PCTKR2021019077-appb-img-000006
Figure PCTKR2021019077-appb-img-000006
제2 프로토타입 손실은 수학식 2의 제1 프로토타입 손실과 비교할 때 μ(p) 대신
Figure PCTKR2021019077-appb-img-000007
가 사용된다는 점에서 차이가 있다.
Figure PCTKR2021019077-appb-img-000008
는 제2 시맨틱 분할맵을 시맨틱 인코더에 입력하여 출력되는 프로토타입 벡터들을 의미한다.
The second prototype loss is instead of μ(p) when compared to the first prototype loss in equation (2).
Figure PCTKR2021019077-appb-img-000007
There is a difference in that is used.
Figure PCTKR2021019077-appb-img-000008
Means prototype vectors output by inputting the second semantic segmentation map to the semantic encoder.
도 7은 본 발명의 일 실시예에 따른 프로토타입 손실을 개념적으로 설명하기 위한 도면이다. 7 is a diagram for conceptually explaining prototype loss according to an embodiment of the present invention.
도 7을 참조하면, 시맨틱 인코더(200)로는 자동차(car)에 대한 특징 벡터와 자전거(bicycle)에 대한 특징 벡터가 입력되며, 시맨틱 인코더(200)는 자동차에 대한 프로토타입 벡터(700) 및 자전거에 대한 프로토타입 벡터(710)를 출력한다. Referring to FIG. 7 , a feature vector for a car and a feature vector for a bicycle are input to the semantic encoder 200, and the semantic encoder 200 generates a prototype vector 700 for the car and a bicycle. Outputs a prototype vector 710 for
한편, 비주얼 인코더(100)로는 입력 이미지가 입력되며, 비주얼 인코더는 각 픽셀별로 클래스에 대한 채널 벡터를 출력한다. 클래스에 대한 채널 벡터는 임베딩 공간(720)상에 나타낼 수 있다. 이때, 자동차(car)를 나타내는 채널 벡터들과 자전거(bicycle)를 나타내는 채널 벡터들은 각각 임베딩 공간(720)상에 투영되는데, 자동차를 나타내는 채널 벡터들의 중간값은 자동차에 대한 프로토타입 벡터와 동일해지도록 프로토타입 손실이 연산되는 것이다. 자전거에 대해서도 동일한 방식으로 프로토타입 손실이 연산된다. Meanwhile, an input image is input to the visual encoder 100, and the visual encoder outputs a channel vector for a class for each pixel. A channel vector for a class may be represented on an embedding space 720. At this time, the channel vectors representing the car and the channel vectors representing the bicycle are respectively projected onto the embedding space 720, and the median of the channel vectors representing the car is the same as the prototype vector for the car. Prototype loss is calculated so that Prototype loss is calculated in the same way for the bike.
결국, 도 7에 도시된 임베딩 공간(720)은 시맨틱 인코더(200)의 프로토타입 벡터와 비주얼 인코더(100)의 채널 벡터가 함께 투영되는 공통 임베딩 공간(Joint Embedding Space)로 표현할 수 있다. As a result, the embedding space 720 shown in FIG. 7 can be expressed as a joint embedding space in which the prototype vector of the semantic encoder 200 and the channel vector of the visual encoder 100 are projected together.
한편, 다시 도 4를 참조하면, 시맨틱 인코더(200)에 대해서는 시맨틱 손실을 이용하여 추가적인 학습이 이루어진다. 시맨틱 손실은 입력되는 각 클래스의 특징 벡터들간의 거리와 시맨틱 인코더에서 출력되는 각 클래스별 특징 벡터들간의 거리의 차에 대한 손실이다. 시맨틱 인코더(200)는 시맨틱 손실을 이용하여 입력되는 클래스별 특징 벡터들간의 거리의 차이가 출력되는 클래스별 프로토타입 벡터들간의 거리차가 동일해지도록 학습을 수행한다. Meanwhile, referring to FIG. 4 again, additional learning is performed for the semantic encoder 200 using semantic loss. The semantic loss is a loss of a difference between a distance between input feature vectors of each class and a distance between feature vectors of each class output from the semantic encoder. The semantic encoder 200 performs learning by using semantic loss so that a distance difference between input class-specific feature vectors becomes equal to a distance difference between output prototype vectors for each class.
예를 들어, 개와 고양이는 서로 다른 클래스이나 형상에서 유사성이 있으므로 특징 벡터들간의 거리 차가 상대적으로 작을 것이다. 그러나, 개와 사람은 형상의 유사성이 낮으므로 특징 벡터들간의 거리차가 상대적으로 클 것이다. 이러한 특징 벡터들간의 거리 차가 프로토타입 벡터들에도 반영되도록 시맨틱 손실을 이용한 학습이 이루어지는 것이다. For example, since dogs and cats have similarities in different classes or shapes, the distance difference between feature vectors will be relatively small. However, since dogs and humans have low shape similarity, the distance difference between feature vectors will be relatively large. Learning using semantic loss is performed so that the distance difference between these feature vectors is also reflected in the prototype vectors.
도 8은 본 발명의 일 실시예에 따른 시맨틱 손실을 설명하기 위한 도면이다. 8 is a diagram for explaining semantic loss according to an embodiment of the present invention.
도 8을 참조하면, 특징 벡터의 임베딩 공간(800)과 프로토타입 벡터의 임베딩 공간(810)이 도시되어 있다. 클래스로는 테이블, 고양이, 개 및 사람이 표시되어 있다. Referring to FIG. 8 , a feature vector embedding space 800 and a prototype vector embedding space 810 are shown. The classes are Table, Cat, Dog, and Human.
상용의 데이터베이스로부터 획득되는 각 클래스의 특징 벡터들은 특징 벡터의 임베딩 공간(800)상에 투영되고, 각 특징 벡터들이 시맨틱 인코더(200)에 입력되어 출력되는 프로토타입 벡터들은 프로토타입 벡터의 임베딩 공간(810)에 투영된다. The feature vectors of each class obtained from the commercial database are projected onto the embedding space 800 of the feature vector, and the prototype vectors output after each feature vector is input to the semantic encoder 200 are the embedding space of the prototype vector ( 810).
특징 벡터의 임베딩 공간(800)에서의 두 클래스간 거리와 프로토타입 벡터의 임베딩 공간(800)에서의 두 클래스간 거리의 차를 시맨틱 손실로 정의할 수 있으며, 구체적으로 시맨틱 손실은 다음의 수학식 4와 같이 정의될 수 있다. The difference between the distance between two classes in the embedding space 800 of the feature vector and the distance between the two classes in the embedding space 800 of the prototype vector can be defined as semantic loss. 4 can be defined as
Figure PCTKR2021019077-appb-img-000009
Figure PCTKR2021019077-appb-img-000009
위 수학식 4에서, i와 j는 클래스를 의미하고, S는 클래스 집합을 의미하며, rij는 특징 벡터의 임베딩 공간에서 i 클래스와 j 클래스간 거리를 의미하고,
Figure PCTKR2021019077-appb-img-000010
는 프로토타입 벡터의 임베딩 공간에서 i 클래스와 j 클래스간 거리를 의미한다.
In Equation 4 above, i and j denote classes, S denotes a set of classes, r ij denotes the distance between class i and class j in the embedding space of the feature vector,
Figure PCTKR2021019077-appb-img-000010
denotes the distance between class i and class j in the embedding space of the prototype vector.
도 9는 본 발명의 일 실시예에 따른 제로샷 시맨틱 분할 장치의 학습 방법을 나타낸 순서도이다. 도 9에 도시된 학습 방법은 제2 시맨틱 분할맵을 이용하여 학습을 수행하는 경우를 나타낸 순서도이다. 9 is a flowchart illustrating a learning method of a zero-shot semantic segmentation apparatus according to an embodiment of the present invention. The learning method shown in FIG. 9 is a flowchart illustrating a case of performing learning using the second semantic partitioning map.
도 9를 참조하면, 입력 이미지를 비주얼 인코더(100)에 입력하여 비주얼 특징맵을 생성한다(단계 900). Referring to FIG. 9 , an input image is input to the visual encoder 100 to generate a visual feature map (step 900).
입력 이미지에 대해 클래스별 구분을 수행한 후 입력 이미지를 축소시킨다(단계 902). After classifying the input image by class, the input image is reduced (step 902).
축소된 입력 이미지에 대해 각 클래스에 상응하는 특징 벡터를 적용한다(단계 904). A feature vector corresponding to each class is applied to the reduced input image (step 904).
특징 벡터가 적용된 축소된 이미지를 선형 보간을 통해 확대시켜 원래의 사이즈로 복원시켜 제2 시맨틱 분할맵을 생성한다(단계 906). The reduced image to which the feature vector is applied is enlarged through linear interpolation and restored to the original size to generate a second semantic segmentation map (step 906).
제2 시맨틱 분할맵을 시맨틱 인코더(200)에 입력하여 클래스별 프로토타입 벡터를 출력한다(단계 908). The second semantic segmentation map is input to the semantic encoder 200 to output prototype vectors for each class (step 908).
비주얼 특징맵의 클래스별 채널 벡터들과 시맨틱 인코더(200)에서 출력되는 클래스별 프로토타입 벡터를 이용하여 제2 프로토타입 손실을 연산한다(단계 910). 제2 프로토타입 손실은 수학식 3과 같이 연산될 수 있다. A second prototype loss is calculated using the channel vectors for each class of the visual feature map and the prototype vector for each class output from the semantic encoder 200 (step 910). The second prototype loss can be calculated as in Equation 3.
한편, 비주얼 특징맵에서 출력되는 채널 벡터들을 이용하여 크로스 엔트로피 손실을 연산한다(단계 912). 크로스 엔트로피 손실은 수학식 1과 같이 연산될 수 있다. 앞서 설명한 바와 같이, 크로스 엔트로피 손실은 같은 클래스의 채널 벡터들은 임베딩 공간에서 가까워지고 다른 클래스의 채널 벡터들은 임베딩 공간에서 멀어지도록 학습하기 위해 사용된다. Meanwhile, a cross entropy loss is calculated using channel vectors output from the visual feature map (step 912). The cross entropy loss can be calculated as in Equation 1. As described above, cross entropy loss is used to learn channel vectors of the same class to move closer in the embedding space and channel vectors of different classes to move away from the embedding space.
시맨틱 인코더에 입력되는 클래스별 특징 벡터들간 거리 및 시맨틱 인코더에서 출력되는 클래스별 프로토타입 벡터들간 거리를 이용하여 시맨틱 손실을 연산한다(단계 914). 시맨틱 손실은 수학식 4와 같이 연산될 수 있다. A semantic loss is calculated using the distance between feature vectors for each class input to the semantic encoder and the distance between prototype vectors for each class output from the semantic encoder (step 914). Semantic loss can be calculated as in Equation 4.
제2 프로토타입 손실, 크로스 엔트로피 손실을 이용하여 비주얼 인코더(100) 및 시맨틱 인코더(200)를 동시에 학습시킨다(단계 916). 제2 프토로타입 손실과 크로스 엔트로피 손실을 이용하여 비주얼 인코더(100)와 시맨틱 인코더(200)의 가중치를 동시에 갱신하는 것이다. 한편, 시맨틱 인코더(200)는 시맨틱 손실도 함께 반영하여 가중치 갱신이 이루어진다. The visual encoder 100 and the semantic encoder 200 are simultaneously trained using the second prototype loss and the cross entropy loss (step 916). Weights of the visual encoder 100 and the semantic encoder 200 are simultaneously updated using the second prototype loss and the cross entropy loss. Meanwhile, in the semantic encoder 200, the weight update is performed by reflecting the semantic loss as well.
본 발명에 따른 방법은 컴퓨터에서 실행시키기 위한 매체에 저장된 컴퓨터 프로그램으로 구현될 수 있다. 여기서 컴퓨터 판독가능 매체는 컴퓨터에 의해 액세스 될 수 있는 임의의 가용 매체일 수 있고, 또한 컴퓨터 저장 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함하며, 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 on a computer. Here, computer readable media may be any available media that can be accessed by a computer, and may also 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, including read-only memory (ROM) dedicated memory), random access memory (RAM), compact disk (CD)-ROM, digital video disk (DVD)-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다.Although the present invention has been described with reference to the embodiments shown in the drawings, this is only exemplary, and those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom.
따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 청구범위의 기술적 사상에 의해 정해져야 할 것이다.Therefore, the true technical protection scope of the present invention should be determined by the technical spirit of the appended claims.

Claims (18)

  1. 입력 이미지를 입력받아 신경망 연산을 통해 비주얼 특징맵을 출력하는 비주얼 인코더;a visual encoder that receives an input image and outputs a visual feature map through neural network operation;
    클래스별 특징 벡터를 입력받아 신경망 연산을 통해 클래스별 프로토타입 벡터를 출력하는 시맨틱 인코더;a semantic encoder that receives a feature vector for each class and outputs a prototype vector for each class through a neural network operation;
    상기 클래스별 프로토타입 벡터와 상기 비주얼 특징맵의 픽셀별 채널 벡터를 비교하여 상기 비주얼 특징맵의 픽셀 각각에 대해 클래스를 지정하는 시맨틱 분할부를 포함하되,A semantic segmentation unit for designating a class for each pixel of the visual feature map by comparing the prototype vector for each class with a channel vector for each pixel of the visual feature map;
    상기 시맨틱 분할부는 특정 픽섹의 채널 벡터와 가장 유사한 프로토타입 벡터에 상응하는 클래스를 해당 픽셀의 클래스로 지정하며,The semantic division unit designates a class corresponding to a prototype vector most similar to a channel vector of a specific pixel as a class of the corresponding pixel;
    상기 프로토타입 벡터와 상기 채널 벡터는 동일한 길이로 설정되고, 상기 비주얼 인코더와 시맨틱 인코더는 적어도 하나의 동일한 손실을 공유하여 동시에 학습되는 것을 특징으로 하는 시맨틱 분할 장치. The prototype vector and the channel vector are set to the same length, and the visual encoder and the semantic encoder share at least one same loss and are learned simultaneously.
  2. 제1항에 있어서, According to claim 1,
    상기 비주얼 인코더와 시맨틱 인코더가 공유하는 손실은 프로토타입 손실을 포함하며,The loss shared by the visual encoder and the semantic encoder includes a prototype loss,
    상기 프로토타입 손실은 상기 시맨틱 인코더에서 출력되는 특정 클래스의프로토타입 벡터와 상기 비주얼 특징맵의 해당 클래스의 채널 벡터들의 중간값 사이의 손실에 상응하는 것을 특징으로 하는 시맨틱 분할 장치. The prototype loss corresponds to a loss between a prototype vector of a specific class output from the semantic encoder and a median value of channel vectors of the corresponding class of the visual feature map.
  3. 제2항에 있어서, According to claim 2,
    상기 프로토타입 손실에 기초하여 상기 비주얼 인코더에서 출력되는 특정 클래스의 채널 벡터들의 중간값은 상기 시맨틱 인코더에서 출력하는 해당 클래스의 프로토타입 벡터와 동일해지는 방향으로 학습되는 것을 특징으로 하는 시맨틱 분할 장치. Based on the prototype loss, a median value of channel vectors of a specific class output from the visual encoder is learned in a direction equal to a prototype vector of the corresponding class output from the semantic encoder.
  4. 제2항에 있어서, According to claim 2,
    상기 비주얼 인코더와 시맨틱 인코더가 공유하는 손실은 크로스 엔트로피 손실을 포함하며,The loss shared by the visual encoder and the semantic encoder includes a cross entropy loss,
    상기 크로스 엔트로피 손실에 의해 상기 비주얼 인코더는 동일한 클래스의 채널 벡터들은 임베딩 공간상에서 상대적으로 가까이 위치하고 다른 클래스의 채널 벡터들은 임베딩 공간상에서 상대적으로 멀리 위치하도록 학습되는 것을 특징으로 하는 시맨틱 분할 장치. According to the cross entropy loss, the visual encoder learns that channel vectors of the same class are relatively close in an embedding space and channel vectors of different classes are relatively far in an embedding space.
  5. 제1항에 있어서,According to claim 1,
    상기 시맨틱 인코더는 상기 시맨틱 인코더로 입력되는 클래스별 특징 벡터들 사이의 거리와 상기 시맨틱 인코더에서 출력되는 클래스별 프로토타입 벡터들 사이의 거리가 동일해지도록 시맨틱 손실을 이용하여 학습이 이루어지는 것을 특징으로 하는 시맨틱 분할 장치. The semantic encoder is characterized in that learning is performed using semantic loss so that a distance between feature vectors for each class input to the semantic encoder and a distance between prototype vectors for each class output from the semantic encoder are equal Semantic Split Device.
  6. 제3항에 있어서,According to claim 3,
    상기 프로토타입 손실을 연산하기 위해 상기 시맨틱 인코더로는 상기 입력 이미지에 클래스별 특징 벡터를 적용하여 생성되는 제1 시맨틱 분할맵을 입력하는 것을 특징으로 하는 시맨틱 분할 장치. The semantic segmentation device characterized in that for calculating the prototype loss, a first semantic segmentation map generated by applying a feature vector for each class to the input image is input to the semantic encoder.
  7. 제6항에 있어서, According to claim 6,
    상기 프로토타입 손실은 다음의 수학식과 같이 연산되는 것을 특징으로 하는 시맨틱 분할 장치. The semantic segmentation device, characterized in that the prototype loss is calculated by the following equation.
    Figure PCTKR2021019077-appb-img-000011
    Figure PCTKR2021019077-appb-img-000011
    위 수학식에서, Lcenter는 프로토타입 손실, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터, μ(p)는 제1 시맨틱 분할맵에서 픽셀 위치 p의 특징 벡터를 입력하여 시맨틱 인코더에서 출력되는 프로토타입 벡터이고, d()는 두 변수의 거리를 출력하는 함수임. In the above equation, L center is the prototype loss, c is the class, S is the total set of classes, p is a pixel, Rc is a set of pixels of a specific class, v(p) is the channel vector at pixel position p in the visual feature map, μ(p) is a prototype vector output from the semantic encoder by inputting the feature vector of pixel position p in the first semantic segmentation map, and d() is a function outputting the distance between two variables.
  8. 제3항에 있어서,According to claim 3,
    상기 프로토타입 손실을 연산하기 위해 상기 시맨틱 인코더로는 상기 입력 이미지의 클래스별로 특징 벡터를 적용하고, 상기 클래스별 특징 벡터가 적용된 이미지를 축소하고, 상기 축소된 이미지를 선형 보간을 통해 본래의 이미지 크기로 확대한 제2 시맨틱 분할맵이 입력되는 것을 특징으로 하는 시맨틱 분할 장치. In order to calculate the prototype loss, the semantic encoder applies a feature vector for each class of the input image, reduces the image to which the feature vector for each class is applied, and linearly interpolates the reduced image to an original image size. A semantic segmentation device characterized in that a second semantic segmentation map enlarged by is input.
  9. 제8항에 있어서, According to claim 8,
    상기 프로토타입 손실은 다음의 수학식과 같이 연산되는 것을 특징으로 하는 시맨틱 분할 장치. The prototype loss is calculated by the following equation.
    Figure PCTKR2021019077-appb-img-000012
    Figure PCTKR2021019077-appb-img-000012
    위 수학식에서, Lbar는 프로토타입 손실, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터,
    Figure PCTKR2021019077-appb-img-000013
    는 제2 시맨틱 분할맵에서 픽셀 위치 p의 특징 벡터를 입력하여 시맨틱 인코더에서 출력되는 프로토타입 벡터이고, d()는 두 변수의 거리를 출력하는 함수임.
    In the above equation, L bar is the prototype loss, c is the class, S is the total set of classes, p is a pixel, Rc is the set of pixels of a particular class, v(p) is the channel vector at pixel position p in the visual feature map,
    Figure PCTKR2021019077-appb-img-000013
    is a prototype vector output from the semantic encoder by inputting the feature vector of pixel position p in the second semantic segmentation map, and d() is a function outputting the distance between two variables.
  10. 입력 이미지를 입력받아 신경망 연산을 통해 비주얼 특징맵을 비주얼 인코더를 통해 출력하는 단계(a);Step (a) of receiving an input image and outputting a visual feature map through a neural network operation through a visual encoder;
    클래스별 특징 벡터를 입력받아 신경망 연산을 통해 클래스별 프로토타입 벡터를 시맨틱 인코더를 통해 출력하는 단계(b);Step (b) of receiving a feature vector for each class and outputting a prototype vector for each class through a semantic encoder through a neural network operation;
    상기 클래스별 프로토타입 벡터와 상기 비주얼 특징맵의 픽셀별 채널 벡터를 비교하여 상기 비주얼 특징맵의 픽셀 각각에 대해 클래스를 지정하는 단계(c)를 포함하되,(c) designating a class for each pixel of the visual feature map by comparing the prototype vector for each class with a channel vector for each pixel of the visual feature map;
    상기 단계 (c)는 특정 픽섹의 채널 벡터와 가장 유사한 프로토타입 벡터에 상응하는 클래스를 해당 픽셀의 클래스로 지정하며,In step (c), a class corresponding to a prototype vector most similar to a channel vector of a specific pixel is designated as a class of the corresponding pixel,
    상기 프로토타입 벡터와 상기 채널 벡터는 동일한 길이로 설정되고, 상기 비주얼 인코더와 시맨틱 인코더는 적어도 하나의 동일한 손실을 공유하여 동시에 학습되는 것을 특징으로 하는 시맨틱 분할 방법. The prototype vector and the channel vector are set to the same length, and the visual encoder and the semantic encoder share at least one same loss and are simultaneously learned.
  11. 제10항에 있어서, According to claim 10,
    상기 비주얼 인코더와 시맨틱 인코더가 공유하는 손실은 프로토타입 손실을 포함하며,The loss shared by the visual encoder and the semantic encoder includes a prototype loss,
    상기 프로토타입 손실은 상기 시맨틱 인코더에서 출력되는 특정 클래스의프로토타입 벡터와 상기 비주얼 특징맵의 해당 클래스의 채널 벡터들의 중간값 사이의 손실에 상응하는 것을 특징으로 하는 시맨틱 분할 방법. The prototype loss corresponds to a loss between a prototype vector of a specific class output from the semantic encoder and a median value of channel vectors of the corresponding class of the visual feature map.
  12. 제11항에 있어서, According to claim 11,
    상기 프로토타입 손실에 기초하여 상기 비주얼 인코더에서 출력되는 특정 클래스의 채널 벡터들의 중간값은 상기 시맨틱 인코더에서 출력하는 해당 클래스의 프로토타입 벡터와 동일해지는 방향으로 학습되는 것을 특징으로 하는 시맨틱 분할 방법. Based on the prototype loss, a median value of channel vectors of a specific class output from the visual encoder is learned in a direction equal to a prototype vector of the corresponding class output from the semantic encoder.
  13. 제11항에 있어서, According to claim 11,
    상기 비주얼 인코더와 시맨틱 인코더가 공유하는 손실은 크로스 엔트로피 손실을 포함하며,The loss shared by the visual encoder and the semantic encoder includes a cross entropy loss,
    상기 크로스 엔트로피 손실에 의해 상기 비주얼 인코더는 동일한 클래스의 채널 벡터들은 임베딩 공간상에서 상대적으로 가까이 위치하고 다른 클래스의 채널 벡터들은 임베딩 공간상에서 상대적으로 멀리 위치하도록 학습되는 것을 특징으로 하는 시맨틱 분할 방법. According to the cross entropy loss, the visual encoder learns that channel vectors of the same class are relatively close in an embedding space and channel vectors of different classes are relatively far in an embedding space.
  14. 제10항에 있어서,According to claim 10,
    상기 시맨틱 인코더는 상기 시맨틱 인코더로 입력되는 클래스별 특징 벡터들 사이의 거리와 상기 시맨틱 인코더에서 출력되는 클래스별 프로토타입 벡터들 사이의 거리가 동일해지도록 시맨틱 손실을 이용하여 학습이 이루어지는 것을 특징으로 하는 시맨틱 분할 장치. The semantic encoder is characterized in that learning is performed using semantic loss so that a distance between feature vectors for each class input to the semantic encoder and a distance between prototype vectors for each class output from the semantic encoder are equal Semantic Split Device.
  15. 제10항에 있어서,According to claim 10,
    상기 시맨틱 인코더는 상기 시맨틱 인코더로 입력되는 클래스별 특징 벡터들 사이의 거리와 상기 시맨틱 인코더에서 출력되는 클래스별 프로토타입 벡터들 사이의 거리가 동일해지도록 시맨틱 손실을 이용하여 학습이 이루어지는 것을 특징으로 하는 시맨틱 분할 장치. The semantic encoder is characterized in that learning is performed using semantic loss so that a distance between feature vectors for each class input to the semantic encoder and a distance between prototype vectors for each class output from the semantic encoder are equal Semantic Split Device.
  16. 제15항에 있어서, According to claim 15,
    상기 프로토타입 손실은 다음의 수학식과 같이 연산되는 것을 특징으로 하는 시맨틱 분할 장치. The semantic segmentation device, characterized in that the prototype loss is calculated by the following equation.
    Figure PCTKR2021019077-appb-img-000014
    Figure PCTKR2021019077-appb-img-000014
    위 수학식에서, Lcenter는 프로토타입 손실, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터, μ(p)는 제1 시맨틱 분할맵에서 픽셀 위치 p의 특징 벡터를 입력하여 시맨틱 인코더에서 출력되는 프로토타입 벡터이고, d()는 두 변수의 거리를 출력하는 함수임. In the above equation, L center is the prototype loss, c is the class, S is the total set of classes, p is a pixel, Rc is a set of pixels of a specific class, v(p) is the channel vector at pixel position p in the visual feature map, μ(p) is a prototype vector output from the semantic encoder by inputting the feature vector of pixel position p in the first semantic segmentation map, and d() is a function outputting the distance between two variables.
  17. 제12항에 있어서,According to claim 12,
    상기 프로토타입 손실을 연산하기 위해 상기 시맨틱 인코더로는 상기 입력 이미지에 클래스별 특징 벡터를 적용하고, 상기 클래스별 특징 벡터가 적용된 이미지를 축소하고, 상기 축소된 이미지를 선형 보간을 통해 본래의 이미지 크기로 확대한 제2 시맨틱 분할맵이 입력되는 것을 특징으로 하는 시맨틱 분할 장치. In order to calculate the prototype loss, the semantic encoder applies a feature vector for each class to the input image, reduces the image to which the feature vector for each class is applied, and linearly interpolates the reduced image to an original image size. A semantic segmentation device characterized in that a second semantic segmentation map enlarged by is input.
  18. 제17항에 있어서, According to claim 17,
    상기 프로토타입 손실은 다음의 수학식과 같이 연산되는 것을 특징으로 하는 시맨틱 분할 장치. The semantic segmentation device, characterized in that the prototype loss is calculated by the following equation.
    Figure PCTKR2021019077-appb-img-000015
    Figure PCTKR2021019077-appb-img-000015
    위 수학식에서, Lbar는 프로토타입 손실, c는 클래스, S는 클래스 총 집합, p는 픽셀, Rc는 특정 클래스의 픽셀 집합, v(p)는 비주얼 특징맵에서 픽셀 위치 p에서의 채널 벡터,
    Figure PCTKR2021019077-appb-img-000016
    는 제2 시맨틱 분할맵에서 픽셀 위치 p의 특징 벡터를 입력하여 시맨틱 인코더에서 출력되는 프로토타입 벡터이고, d()는 두 변수의 거리를 출력하는 함수임.
    In the above equation, L bar is the prototype loss, c is the class, S is the total set of classes, p is a pixel, Rc is the set of pixels of a particular class, v(p) is the channel vector at pixel position p in the visual feature map,
    Figure PCTKR2021019077-appb-img-000016
    is a prototype vector output from the semantic encoder by inputting the feature vector of the pixel position p in the second semantic segmentation map, and d() is a function outputting the distance between two variables.
PCT/KR2021/019077 2021-11-26 2021-12-15 Device and method for zero-shot semantic segmentation WO2023096011A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210165598A KR102659399B1 (en) 2021-11-26 2021-11-26 Device and Method for Zero Shot Semantic Segmentation
KR10-2021-0165598 2021-11-26

Publications (1)

Publication Number Publication Date
WO2023096011A1 true WO2023096011A1 (en) 2023-06-01

Family

ID=86539830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/019077 WO2023096011A1 (en) 2021-11-26 2021-12-15 Device and method for zero-shot semantic segmentation

Country Status (2)

Country Link
KR (1) KR102659399B1 (en)
WO (1) WO2023096011A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541882B (en) * 2024-01-05 2024-04-19 南京信息工程大学 Instance-based multi-view vision fusion transduction type zero sample classification method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190028235A (en) * 2017-09-08 2019-03-18 삼성전자주식회사 Method and device for learning neural network for recognizing class
KR20190089777A (en) * 2018-01-23 2019-07-31 주식회사 날비컴퍼니 Method for processing image for improving the quality of the image and apparatus for performing the same
KR102149184B1 (en) * 2019-04-29 2020-08-28 연세대학교 산학협력단 Method and Apparatus for Generating Explainable Unseen Image
KR20200137772A (en) * 2019-05-31 2020-12-09 에스케이텔레콤 주식회사 Apparatus, method for generating classifier and classifying apparatus generated thereby

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102185855B1 (en) * 2019-04-25 2020-12-02 연세대학교 산학협력단 Zero Shot Recognition Apparatus for Automatically Generating Undefined Attribute Information in Data Set and Method Thereof
KR20210069467A (en) * 2019-12-03 2021-06-11 삼성전자주식회사 Method and apparatus for training neural network and method and apparatus for authenticating using neuarl network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190028235A (en) * 2017-09-08 2019-03-18 삼성전자주식회사 Method and device for learning neural network for recognizing class
KR20190089777A (en) * 2018-01-23 2019-07-31 주식회사 날비컴퍼니 Method for processing image for improving the quality of the image and apparatus for performing the same
KR102149184B1 (en) * 2019-04-29 2020-08-28 연세대학교 산학협력단 Method and Apparatus for Generating Explainable Unseen Image
KR20200137772A (en) * 2019-05-31 2020-12-09 에스케이텔레콤 주식회사 Apparatus, method for generating classifier and classifying apparatus generated thereby

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BAEK DONGHYEON; OH YOUNGMIN; HAM BUMSUB: "Exploiting a Joint Embedding Space for Generalized Zero-Shot Semantic Segmentation", 2021 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV), IEEE, 10 October 2021 (2021-10-10), pages 9516 - 9525, XP034093232, DOI: 10.1109/ICCV48922.2021.00940 *

Also Published As

Publication number Publication date
KR102659399B1 (en) 2024-04-19
KR20230078134A (en) 2023-06-02

Similar Documents

Publication Publication Date Title
WO2021201422A1 (en) Semantic segmentation method and system applicable to ar
WO2018212494A1 (en) Method and device for identifying object
WO2019098414A1 (en) Method and device for hierarchical learning of neural network, based on weakly supervised learning
WO2019098449A1 (en) Apparatus related to metric-learning-based data classification and method thereof
WO2019164237A1 (en) Method and device for performing deep learning calculation by using systolic array
WO2019098538A1 (en) Device and method for processing convolution operation using kernel
WO2021101045A1 (en) Electronic apparatus and method for controlling thereof
WO2021230457A1 (en) Learning method and learning device for training an object detection network by using attention maps and testing method and testing device using the same
WO2020196985A1 (en) Apparatus and method for video action recognition and action section detection
WO2023096011A1 (en) Device and method for zero-shot semantic segmentation
WO2019235828A1 (en) Two-face disease diagnosis system and method thereof
WO2020067632A1 (en) Method, apparatus, and program for sampling learning target frame image of video for ai image learning, and method of same image learning
WO2018207969A1 (en) Object detecting and classifying method
WO2020149601A1 (en) Method and device for high-speed image recognition using 3d cnn
WO2022086147A1 (en) Method for training and testing user learning network to be used for recognizing obfuscated data created by obfuscating original data to protect personal information and user learning device and testing device using the same
WO2021235682A1 (en) Method and device for performing behavior prediction by using explainable self-focused attention
WO2021010671A2 (en) Disease diagnosis system and method for performing segmentation by using neural network and unlocalized block
WO2020204610A1 (en) Deep learning-based coloring method, system, and program
WO2023113437A1 (en) Semantic segmentation device and method using memory
WO2023210914A1 (en) Method for knowledge distillation and model generation
WO2019231162A1 (en) Image segmentation method and device
WO2023068441A1 (en) Behavior recognition method using deep learning, and device thereof
WO2019198900A1 (en) Electronic apparatus and control method thereof
WO2023080667A1 (en) Surveillance camera wdr image processing through ai-based object recognition
WO2020256517A2 (en) Automatic phase mapping processing method and system based on omnidirectional image information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21965794

Country of ref document: EP

Kind code of ref document: A1