Deepstory는 GPT-2가 포함된 NLG(자연어 생성), Deep Convolutional TTS가 포함된 TTS(텍스트 음성 변환), 음성 기반 애니메이션이 포함된 음성 애니메이션, First Order Motion Model이 포함된 이미지 애니메이션을 통합한 작품입니다. 미디어 애플리케이션.
간단히 말해서, 텍스트/생성된 텍스트를 캐릭터가 자신의 목소리를 사용하여 이야기를 전달하는 애니메이션이 포함된 비디오로 변환합니다.
다음과 같이 이미지를 비디오로 변환할 수 있습니다.
플라스크로 작성된 편리한 웹 인터페이스와 백엔드를 제공하여 나만의 스토리를 만들 수 있습니다.
Transformers 모델과 pytorch-dctts 모델을 지원합니다.
Colab(flask-ngrok): https://colab.research.google.com/drive/1HYCPUmFw5rN8kvZdwzFpfBlaUMWPNHas?usp=sharing
영상(지침이 필요한 경우): https://blog.thetobysiu.com/video/
Colab 버전이 곧 출시될 예정입니다!
Deepstory
├── animator.py
├── app.py
├── data
│ ├── dctts
│ │ ├── Geralt
│ │ │ ├── ssrn.pth
│ │ │ └── t2m.pth
│ │ ├── LJ
│ │ │ ├── ssrn.pth
│ │ │ └── t2m.pth
│ │ └── Yennefer
│ │ ├── ssrn.pth
│ │ └── t2m.pth
│ ├── fom
│ │ ├── vox-256.yaml
│ │ ├── vox-adv-256.yaml
│ │ ├── vox-adv-cpk.pth.tar
│ │ └── vox-cpk.pth.tar
│ ├── gpt2
│ │ ├── Waiting for Godot
│ │ │ ├── config.json
│ │ │ ├── default.txt
│ │ │ ├── merges.txt
│ │ │ ├── pytorch_model.bin
│ │ │ ├── special_tokens_map.json
│ │ │ ├── text.txt
│ │ │ ├── tokenizer_config.json
│ │ │ └── vocab.json
│ │ └── Witcher Books
│ │ ├── config.json
│ │ ├── default.txt
│ │ ├── merges.txt
│ │ ├── pytorch_model.bin
│ │ ├── special_tokens_map.json
│ │ ├── text.txt
│ │ ├── tokenizer_config.json
│ │ └── vocab.json
│ ├── images
│ │ ├── Geralt
│ │ │ ├── 0.jpg
│ │ │ └── fx.jpg
│ │ └── Yennefer
│ │ ├── 0.jpg
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 3.jpg
│ │ ├── 4.jpg
│ │ └── 5.jpg
│ └── sda
│ ├── grid.dat
│ └── image.bmp
├── deepstory.py
├── generate.py
├── modules
│ ├── dctts
│ │ ├── audio.py
│ │ ├── hparams.py
│ │ ├── __init__.py
│ │ ├── layers.py
│ │ ├── ssrn.py
│ │ └── text2mel.py
│ ├── fom
│ │ ├── animate.py
│ │ ├── dense_motion.py
│ │ ├── generator.py
│ │ ├── __init__.py
│ │ ├── keypoint_detector.py
│ │ ├── sync_batchnorm
│ │ │ ├── batchnorm.py
│ │ │ ├── comm.py
│ │ │ ├── __init__.py
│ │ │ └── replicate.py
│ │ └── util.py
│ └── sda
│ ├── encoder_audio.py
│ ├── encoder_image.py
│ ├── img_generator.py
│ ├── __init__.py
│ ├── rnn_audio.py
│ ├── sda.py
│ └── utils.py
├── README.md
├── requirements.txt
├── static
│ ├── bootstrap
│ │ ├── css
│ │ │ └── bootstrap.min.css
│ │ └── js
│ │ └── bootstrap.min.js
│ ├── css
│ │ └── styles.css
│ └── js
│ └── jquery.min.js
├── templates
│ ├── animate.html
│ ├── deepstory.js
│ ├── gen_sentences.html
│ ├── gpt2.html
│ ├── index.html
│ ├── map.html
│ ├── models.html
│ ├── sentences.html
│ ├── status.html
│ └── video.html
├── test.py
├── text.txt
├── util.py
└── voice.py
이 프로젝트의 Google 드라이브 버전에서 사용할 수 있습니다. 모든 모델(Geralt, Yennefer 포함)이 포함되어 있습니다.
먼저 spacy 영어 모델을 다운로드해야 합니다.
컴퓨터에 ffmpeg가 설치되어 있고 ffmpeg-python이 설치되어 있는지 확인하십시오.
https://drive.google.com/drive/folders/1AxORLF-QFd2wSORzMOKlvCQSFhdZSODJ?usp=sharing
단순화를 위해 Google Colab 버전이 곧 출시될 예정입니다.
이 프로젝트를 실행하려면 최소 4GB의 VRAM을 갖춘 NVIDIA GPU가 필요합니다.
https://github.com/tugstugi/pytorch-dc-tts
https://github.com/DinoMan/speech-driven-animation
https://github.com/AliaksandrSiarohin/first-order-model
https://github.com/huggingface/transformers
전체 프로젝트는 PyTorch를 사용하고, tensorflow는 요구사항.txt에 나열되어 있지만 변환기가 gpt-2-simple에서 훈련된 모델을 Pytorch 모델로 변환하는 데 사용되었습니다.
모듈 폴더 내의 파일만 원본에서 약간 수정되었습니다. 나머지 파일은 참고되는 일부 부분을 제외하고는 모두 제가 직접 작성한 것입니다.
세션 내에서 문장을 반복해서 합성하면 여전히 일부 메모리 문제가 있지만 메모리 오버플로가 발생하는 데는 최소 10번이 걸립니다.
파일을 전처리하기 위해 만든 다른 도구 저장소가 있습니다. 내 프로필에서 찾을 수 있습니다.