Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Pytorch implementation for high-resolution (e.g., 2048x1024) photorealistic video-to-video translation. It can be used for turning semantic label maps into photo-realistic videos, synthesizing people talking from edge maps, or generating human motions from poses. The core of video-to-video translation is image-to-image translation. Some of our work in that space can be found in pix2pixHD and SPADE.
Video-to-Video Synthesis
Ting-Chun Wang1, Ming-Yu Liu1, Jun-Yan Zhu2, Guilin Liu1, Andrew Tao1, Jan Kautz1, Bryan Catanzaro1
1NVIDIA Corporation, 2MIT CSAIL
In Neural Information Processing Systems (NeurIPS) 2018
pip install dominate requestspip install dlibgit clone https://github.com/NVIDIA/vid2vid
cd vid2viddocker folder.Please first download example dataset by running python scripts/download_datasets.py.
Next, compile a snapshot of FlowNet2 by running python scripts/download_flownet2.py.
Cityscapes
Please download the pre-trained Cityscapes model by:
python scripts/street/download_models.pyTo test the model (bash ./scripts/street/test_2048.sh):
#!./scripts/street/test_2048.sh
python test.py --name label2city_2048 --label_nc 35 --loadSize 2048 --n_scales_spatial 3 --use_instance --fg --use_single_GThe test results will be saved in: ./results/label2city_2048/test_latest/.
We also provide a smaller model trained with single GPU, which produces slightly worse performance at 1024 x 512 resolution.
python scripts/street/download_models_g1.pybash ./scripts/street/test_g1_1024.sh):#!./scripts/street/test_g1_1024.sh
python test.py --name label2city_1024_g1 --label_nc 35 --loadSize 1024 --n_scales_spatial 3 --use_instance --fg --n_downsample_G 2 --use_single_GYou can find more example scripts in the scripts/street/ directory.
Faces
python scripts/face/download_models.pybash ./scripts/face/test_512.sh):#!./scripts/face/test_512.sh
python test.py --name edge2face_512 --dataroot datasets/face/ --dataset_mode face --input_nc 15 --loadSize 512 --use_single_G./results/edge2face_512/test_latest/.datasets folder in the same way the example images are provided.python scripts/download_models_flownet2.py.bash ./scripts/street/train_512.sh)#!./scripts/street/train_512.sh
python train.py --name label2city_512 --label_nc 35 --gpu_ids 0,1,2,3,4,5,6,7 --n_gpus_gen 6 --n_frames_total 6 --use_instance --fgbash ./scripts/street/train_1024.sh):#!./scripts/street/train_1024.sh
python train.py --name label2city_1024 --label_nc 35 --loadSize 1024 --n_scales_spatial 2 --num_D 3 --gpu_ids 0,1,2,3,4,5,6,7 --n_gpus_gen 4 --use_instance --fg --niter_step 2 --niter_fix_global 10 --load_pretrain checkpoints/label2city_512If you have TensorFlow installed, you can see TensorBoard logs in ./checkpoints/label2city_1024/logs by adding --tf_log to the training scripts.
Training with a single GPU:
bash ./scripts/street/train_g1_256.sh)#!./scripts/street/train_g1_256.sh
python train.py --name label2city_256_g1 --label_nc 35 --loadSize 256 --use_instance --fg --n_downsample_G 2 --num_D 1 --max_frames_per_gpu 6 --n_frames_total 6Training at full (2k x 1k) resolution
bash ./scripts/street/train_2048.sh). If only GPUs with 12G/16G memory are available, please use the script ./scripts/street/train_2048_crop.sh, which will crop the images during training. Performance is not guaranteed with this script.python scripts/download_datasets.py.python data/face_landmark_detection.py trainbash ./scripts/face/train_512.sh)python train.py --name edge2face_512 --dataroot datasets/face/ --dataset_mode face --input_nc 15 --loadSize 512 --num_D 3 --gpu_ids 0,1,2,3,4,5,6,7 --n_gpus_gen 6 --n_frames_total 12 max_frames_per_gpu.scripts/face/.python scripts/download_datasets.py.bash ./scripts/pose/train_256p.sh)python train.py --name pose2body_256p --dataroot datasets/pose --dataset_mode pose --input_nc 6 --num_D 2 --resize_or_crop ScaleHeight_and_scaledCrop --loadSize 384 --fineSize 256 --gpu_ids 0,1,2,3,4,5,6,7 --batchSize 8 --max_frames_per_gpu 3 --no_first_img --n_frames_total 12 --max_t_step 4max_frames_per_gpu.scripts/pose/.--label_nc N during both training and testing.--input_nc N where N is the number of input channels (The default is 3 for RGB images).scaleWidth, which will scale the width of all training images to opt.loadSize (1024) while keeping the aspect ratio. If you want a different setting, please change it by using the --resize_or_crop option. For example, scaleWidth_and_crop first resizes the image to have width opt.loadSize and then does random cropping of size (opt.fineSize, opt.fineSize). crop skips the resizing step and only performs random cropping. scaledCrop crops the image while retraining the original aspect ratio. randomScaleHeight will randomly scale the image height to be between opt.loadSize and opt.fineSize. If you don't want any preprocessing, please specify none, which will do nothing other than making sure the image is divisible by 32.--use_single_G. This is the option we use in the test scripts.--use_real_img.--no_first_img. This must be trained separately before inference.n_gpus_gen: the number of GPUs to use for generators (while the others are used for discriminators). We separate generators and discriminators into different GPUs since when dealing with high resolutions, even one frame cannot fit in a GPU. If the number is set to -1, there is no separation and all GPUs are used for both generators and discriminators (only works for low-res images).แนะนำ 5 เว็บ สล็อตเว็บตรง เว็บแท้ สล็อต pg เว็บตรง แตกหนัก RTP สูงสุด 98% รับวอเลท
แนะนำ 6 เว็บ สล็อตเว็บตรง เว็บแท้ สล็อต pg เว็บตรง แตกหนัก RTP สูงสุด 98% รับวอเลท ปี2026
Xxl
h
Download gdrive doesn't work - need to manually download model for now
Downloading data sets and pre-trained models
flownet2_pytorch_040.zip failed to be built.
Kalash
伟大的英伟达,这一晃就过了六年,英伟达栽树后人乘凉
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/label2city_single/latest_net_G_1024.pth'