tloen/pix2pixHD là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 1 sao.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic image-to-image translation. It can be used for turning semantic label maps into photo-realistic images or synthesizing portraits from face label maps.
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
Ting-Chun Wang1, Ming-Yu Liu1, Jun-Yan Zhu2, Andrew Tao1, Jan Kautz1, Bryan Catanzaro1 1NVIDIA Corporation, 2UC Berkeley
In CVPR 2018.
Image-to-image translation at 2k/1k resolution
Our label-to-streetview results
- Interactive editing results
- Additional streetview results
Label-to-face and interactive editing results
Our editing interface
Prerequisites
Linux or macOS
Python 2 or 3
NVIDIA GPU (11G memory or larger) + CUDA cuDNN
Getting Started
Installation
Install PyTorch and dependencies from http://pytorch.org
Install python libraries dominate.
pip install dominate
Clone this repo:
git clone https://github.com/NVIDIA/pix2pixHD
cd pix2pixHD
Testing
A few example Cityscapes test images are included in the datasets folder.
Please download the pre-trained Cityscapes model from here (google drive link), and put it under ./checkpoints/label2city_1024p/
The test results will be saved to a html file here: ./results/label2city_1024p/test_latest/index.html.
More example scripts can be found in the scripts directory.
Dataset
We use the Cityscapes dataset. To train a model on the full dataset, please download it from the official website (registration required).
After downloading, please put it under the datasets folder in the same way the example images are provided.
Training
Train a model at 1024 x 512 resolution (bash ./scripts/train_512p.sh):
To view training results, please checkout intermediate results in ./checkpoints/label2city_512p/web/index.html.
If you have tensorflow installed, you can see tensorboard logs in ./checkpoints/label2city_512p/logs by adding --tf_log to the training scripts.
Multi-GPU training
Train a model using multiple GPUs (bash ./scripts/train_512p_multigpu.sh):
In our test case, it trains about 80% faster with AMP on a Volta machine.
Training at full resolution
To train the images at full resolution (2048 x 1024) requires a GPU with 24G memory (bash ./scripts/train_1024p_24G.sh), or 16G memory if using mixed precision (AMP).
If only GPUs with 12G memory are available, please use the 12G script (bash ./scripts/train_1024p_12G.sh), which will crop the images during training. Performance is not guaranteed using this script.
Training with your own dataset
If you want to train with your own dataset, please generate label maps which are one-channel whose pixel values correspond to the object labels (i.e. 0,1,...,N-1, where N is the number of labels). This is because we need to generate one-hot vectors from the label maps. Please also specity --label_nc N during both training and testing.
If your input is not a label map, please just specify --label_nc 0 which will directly use the RGB colors as input. The folders should then be named train_A, train_B instead of train_label, train_img, where the goal is to translate images from A to B.
If you don't have instance maps or don't want to use them, please specify --no_instance.
The default setting for preprocessing is scale_width, 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, scale_width_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. If you don't want any preprocessing, please specify none, which will do nothing other than making sure the image is divisible by 32.
More Training/Test Details
Flags: see options/train_options.py and options/base_options.py for all the training flags; see options/test_options.py and options/base_options.py for all the test flags.
Instance map: we take in both label maps and instance maps as input. If you don't want to use instance maps, please specify the flag --no_instance.
Citation
If you find this useful for your research, please use the following.
@inproceedings{wang2018pix2pixHD,
title={High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs},
author={Ting-Chun Wang and Ming-Yu Liu and Jun-Yan Zhu and Andrew Tao and Jan Kautz and Bryan Catanzaro},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year={2018}
}
Acknowledgments
This code borrows heavily from pytorch-CycleGAN-and-pix2pix.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/tloen/pix2pixHD là nguồn chính thức.
tloen/pix2pixHD có bao nhiêu sao?
tloen/pix2pixHD có 1 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/tloen/pix2pixHD. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
tloen/pix2pixHD có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho tloen/pix2pixHD. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
tloen/pix2pixHD có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho tloen/pix2pixHD. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
tloen/pix2pixHD có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho tloen/pix2pixHD. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
tloen/pix2pixHD còn được duy trì không?
TopGit chưa ghi nhận lần push gần đây của tloen/pix2pixHD. Xem lịch sử commit trực tiếp trên GitHub để biết thông tin chính xác nhất.
Đọc đầy đủ README ở tab phía trên.
pix2pixHD có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về pix2pixHD.