Method and apparatus for adversarial self-supervised learning using target image, and computer-readable storage medium storing instructions to perform method for adversarial meta-learning
In accordance with an aspect of the present disclosure, there is provided an adversarial self-supervised learning method for an encoder. The method comprises selecting a target image of an original image for training from an image group included in a previously collected dataset; generating a noise image by combining the original image for training with noise using the original image for training and the target image; and training the encoder using the noise image and the original image for training.
1 . An adversarial self-supervised learning method for training an encoder, the method being performed by one or more processors executing instructions stored in a computer memory, the method comprising:
selecting a target image of an original image for training from an image group included in a previously collected dataset;
generating a noise image by combining the original image for training with noise using the original image for training and the target image; and
training the encoder using the noise image and the original image for training,
wherein the selecting of the target image includes selecting the target image from the image group based on a similarity between the original image for training and each of a plurality of images included in the image group and an entropy of each of the plurality of images.
2 . The adversarial self-supervised learning method of claim 1 , wherein the selecting of the target image includes selecting an image similar to the original image for training the encoder.
3 . The adversarial self-supervised learning method of claim 1 , wherein the generating of the noise image includes:
generating a first vector by inputting the original image for training to the encoder;
generating a second vector by inputting the target image to the encoder;
generating noise for the original image for training based on a first loss function set such that a difference between the first vector and the second vector increases; and
generating the noise image using the original image for training and the noise.
4 . The adversarial self-supervised learning method of claim 1 , wherein the training of the encoder includes:
transforming the original image for training into a transformed image using a transformation method;
generating a third vector by inputting the original image for training to the encoder;
generating a fourth vector by inputting the transformed image to the encoder;
generating a fifth vector by inputting the noise image to the encoder; and
training the encoder using a second loss function set such that differences between the third vector, the fourth vector, and the fifth vector decrease.
5 . The adversarial self-supervised learning method of claim 4 , wherein the transformation method includes at least one of cropping, stretching, rotation, color change, or inversion.
6 . The adversarial self-supervised learning method of claim 1 , wherein the encoder is used to classify a query image as one of classes when the query image is obtained.
7 . An adversarial self-supervised learning apparatus, comprising:
a memory in which an adversarial self-supervised learning program for training an encoder is stored; and
a processor configured to control the memory,
wherein the processor, when the adversarial self-supervised learning program is executed, is configured to:
select a target image of an original image for training from an image group included in a previously collected dataset;
generate a noise image by combining the original image for training with noise using the original image for training and the target image; and
train the encoder using the noise image and the original image for training,
wherein the processor is configured to select the target image from the image group based on a similarity between the original image for training and each of a plurality of images included in the image group and an entropy of each of the plurality of images.
8 . The adversarial self-supervised learning apparatus of claim 7 , wherein the processor is configured to:
generate a first vector by inputting the original image for training to the encoder;
generate a second vector by inputting the target image to the encoder;
generate noise for the original image for training based on a first loss function set such that a difference between the first vector and the second vector increases; and
generate the noise image using the original image for training and the noise.
9 . The adversarial self-supervised learning apparatus of claim 8 , wherein the processor is configured to:
transform the original image for training into a transformed image using a transformation method;
generate a third vector by inputting the original image for training to the encoder;
generate a fourth vector by inputting the transformed image to the encoder;
generate a fifth vector by inputting the noise image to the encoder; and
train the encoder using a second loss function set such that differences between the third vector, the fourth vector, and the fifth vector decrease.
10 . A non-transitory computer readable storage medium including computer executable instructions, wherein the instructions, when executed by a processor, cause the processor to perform an adversarial self-supervised learning method for an encoder, the method comprising:
selecting a target image of an original image for training from an image group included in a previously collected dataset;
generating a noise image by combining the original image for training with noise using the original image for training and the target image; and
training the encoder using the noise image and the original image for training,
wherein the selecting of the target image includes selecting the target image from the image group based on a similarity between the original image for training and each of a plurality of images included in the image group and an entropy of each of the plurality of images.
11 . The non-transitory computer readable storage medium of claim 10 , wherein the selecting of the target image includes selecting an image similar to the original image for training the encoder.
12 . The non-transitory computer readable storage medium of claim 10 , wherein the generating of the noise image includes:
generating a first vector by inputting the original image for training to the encoder;
generating a second vector by inputting the target image to the encoder;
generating noise for the original image for training based on a first loss function set such that a difference between the first vector and the second vector increases; and
generating the noise image using the original image for training and the noise.
13 . The non-transitory computer readable storage medium of claim 10 , wherein the training of the encoder includes:
transforming the original image for training into a transformed image using a transformation method;
generating a third vector by inputting the original image for training to the encoder;
generating a fourth vector by inputting the transformed image to the encoder;
generating a fifth vector by inputting the noise image to the encoder; and
training the encoder using a second loss function set such that differences between the third vector, the fourth vector, and the fifth vector decrease.
14 . The non-transitory computer readable storage medium of claim 13 , wherein the transformation method includes at least one of cropping, stretching, rotation, color change, or inversion.
15 . The non-transitory computer readable storage medium of claim 10 , wherein the encoder is used to classify a query image as one of classes when the query image is obtained.