Spaces:
Runtime error
Runtime error
add README
Browse files- .gitignore +0 -1
- MAIN.png +0 -0
- README.md +104 -1
.gitignore
CHANGED
|
@@ -7,6 +7,5 @@ x264/
|
|
| 7 |
*.mp3
|
| 8 |
*.mp4
|
| 9 |
filelist.txt
|
| 10 |
-
*.png
|
| 11 |
complex_infer.sh
|
| 12 |
__pycache__/
|
|
|
|
| 7 |
*.mp3
|
| 8 |
*.mp4
|
| 9 |
filelist.txt
|
|
|
|
| 10 |
complex_infer.sh
|
| 11 |
__pycache__/
|
MAIN.png
ADDED
|
README.md
CHANGED
|
@@ -1 +1,104 @@
|
|
| 1 |
-
# CoNR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CoNR
|
| 2 |
+
# CoNR: Collaborative Neural Rendering using Anime Character Sheets
|
| 3 |
+
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
##[HomePage](https://conr.ml) | Colab | [arXiv](https://arxiv.org/abs/2207.05378)
|
| 7 |
+
|
| 8 |
+

|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
## Introduction
|
| 12 |
+
|
| 13 |
+
This project is the official implement of [Collaborative Neural Rendering using Anime Character Sheets](https://arxiv.org/abs/2207.05378), which aims to genarate vivid dancing videos from hand-drawn anime character sheets(ACS). Watch more demos in our [HomePage](https://conr.ml).
|
| 14 |
+
|
| 15 |
+
## Usage
|
| 16 |
+
|
| 17 |
+
#### Prerequisites
|
| 18 |
+
|
| 19 |
+
* NVIDIA GPU + CUDA + CUDNN
|
| 20 |
+
* Python 3.6
|
| 21 |
+
|
| 22 |
+
#### Installation
|
| 23 |
+
|
| 24 |
+
* Clone this repository
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
git clone https://github.com/megvii-research/CoNR
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
* Dependencies
|
| 31 |
+
|
| 32 |
+
To install all the dependencies, please run the following commands.
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
cd CoNR
|
| 36 |
+
pip install -r requirements.txt
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
* Download Weights
|
| 40 |
+
Download weights from Google Drive. Alternatively, you can download from [Baidu Netdisk](https://pan.baidu.com/s/1U11iIk-DiJodgCveSzB6ig?pwd=RDxc) (password:RDxc).
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
mkdir weights && cd weights
|
| 44 |
+
wget https://drive.google.com/file/d/1M1LEpx70tJ72AIV2TQKr6NE_7mJ7tLYx/view?usp=sharing
|
| 45 |
+
wget https://drive.google.com/file/d/1YvZy3NHkJ6gC3pq_j8agcbEJymHCwJy0/view?usp=sharing
|
| 46 |
+
wget https://drive.google.com/file/d/1AOWZxBvTo9nUf2_9Y7Xe27ZFQuPrnx9i/view?usp=sharing
|
| 47 |
+
wget https://drive.google.com/file/d/19jM1-GcqgGoE1bjmQycQw_vqD9C5e-Jm/view?usp=sharing
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
#### Prepare inputs
|
| 51 |
+
We prepared two Ultra-Dense Pose sequences for two characters, you can generate more UDPs via 3D models and motions.
|
| 52 |
+
[Baidu Netdisk](https://pan.baidu.com/s/1hWvz4iQXnVTaTSb6vu1NBg?pwd=RDxc) (password:RDxc)
|
| 53 |
+
|
| 54 |
+
```
|
| 55 |
+
# for short hair girl
|
| 56 |
+
wget https://drive.google.com/file/d/11HMSaEkN__QiAZSnCuaM6GI143xo62KO/view?usp=sharing
|
| 57 |
+
unzip short_hair.zip
|
| 58 |
+
mv short_hair/ poses/
|
| 59 |
+
|
| 60 |
+
# for double ponytail girl
|
| 61 |
+
wget https://drive.google.com/file/d/1WNnGVuU0ZLyEn04HzRKzITXqib1wwM4Q/view?usp=sharing
|
| 62 |
+
unzip double_ponytail.zip
|
| 63 |
+
mv double_ponytail/ poses/
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
We provide sample inputs of anime character sheets, you can also draw more by yourself.
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
# for short hair girl
|
| 70 |
+
wget https://drive.google.com/file/d/1r-3hUlENSWj81ve2IUPkRKNB81o9WrwT/view?usp=sharing
|
| 71 |
+
unzip short_hair_images.zip
|
| 72 |
+
mv short_hair_images/ character_sheet/
|
| 73 |
+
|
| 74 |
+
# for double ponytail girl
|
| 75 |
+
wget https://drive.google.com/file/d/1XMrJf9Lk_dWgXyTJhbEK2LZIXL9G3MWc/view?usp=sharing
|
| 76 |
+
unzip double_ponytail_images.zip
|
| 77 |
+
mv double_ponytail_images/ character_sheet/
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
#### RUN!
|
| 81 |
+
We provide two ways: with web UI or via terminal.
|
| 82 |
+
|
| 83 |
+
* with web UI (powered by [Streamlit](https://streamlit.io/))
|
| 84 |
+
|
| 85 |
+
```
|
| 86 |
+
streamlit run streamlit.py --server_port=8501
|
| 87 |
+
```
|
| 88 |
+
then open your browser and visit `localhost:8501`, follow the instructions to genarate video.
|
| 89 |
+
|
| 90 |
+
* via terminal
|
| 91 |
+
|
| 92 |
+
```
|
| 93 |
+
mkdir {dir_to_save_result}
|
| 94 |
+
|
| 95 |
+
python3 -m torch.distributed.launch \
|
| 96 |
+
--nproc_per_node=1 train.py --mode=test \
|
| 97 |
+
--world_size=1 --dataloaders=2 \
|
| 98 |
+
--test_input_poses_images={dir_to_poses} \
|
| 99 |
+
--test_input_person_images={dir_to_character_sheet} \
|
| 100 |
+
--test_output_dir={dir_to_save_result} \
|
| 101 |
+
--test_checkpoint_dir={dir_to_weights}
|
| 102 |
+
|
| 103 |
+
ffmpeg -r 30 -y -i {dir_to_save_result}/%d.png -r 30 -c:v libx264 output.mp4 -r 30
|
| 104 |
+
```
|