euphoriaO-O

[PyTorch] 2-3. Image Captioning 본문

Machine Learning/Pytorch

[PyTorch] 2-3. Image Captioning

euphoria0-0 2020. 7. 14. 00:07
This article is based on the book "Deep Learning with PyTorch"
https://pytorch.org/deep-learning-with-pytorch

2. Pretrained Networks

  1. 내용에 따라 이미지에 레이블링하는 모델(ResNet)
  2. 실제 이미지로부터 새로운 이미지를 제작하는 모델(GAN)
  3.  텍스트(Eng)로 이미지 내용을 설명하는 모델 
  4. Torch Hub

2-3. Image-Captioning model

이미지로부터 캡션을 영어로 생성하는 모델

1번 network은 설명에 대한 수치적 표현을 생성하는 네트워크

2번 network는 해당 수치적 표현으로부터 일관된 문장을 생성하는 RNN

Recurrent: forward pass로 개별 단어를 생성한다. 즉, 다음 단어는 이전 단어에 의존한다.

(1) NeuralTalk2

NeuralTalk2 모델은 다음 링크에서 얻을 수 있다.

https://github.com/deep-learning-withpytorch/ImageCaptioning.pytorch

python eval.py --model ./data/FC/fc-model.pth

예제: CycleGAN으로 만든 이미지로 NeuralTalk2 모델을 속일 수 있을까?

-> 그 결과 얼룩말로부터 zebra라는 캡션을 생성하였다.

 

'Machine Learning > Pytorch' 카테고리의 다른 글

[PyTorch] 3. Tensor  (0) 2020.07.16
[PyTorch] 2-4. Torch Hub  (0) 2020.07.14
[PyTorch] 2-2. GAN, CycleGAN  (0) 2020.07.12
[PyTorch] 2-1. Object Recognition with ResNet  (0) 2020.07.11
Comments