-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69e5ad3
Showing
44 changed files
with
4,540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
.vscode/ | ||
|
||
*.pyc | ||
*pynb* | ||
|
||
datasets/ | ||
|
||
outputs/ | ||
|
||
samples/ | ||
|
||
eval/ | ||
|
||
pretrained_model/ | ||
|
||
eval/model/ | ||
|
||
build/ | ||
|
||
roi_layers.egg-info/ | ||
|
||
*.so | ||
|
||
.ftpconfig | ||
|
||
.ftpignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Installation | ||
|
||
#### Requiements | ||
* python3 | ||
* pytorch 1.0 | ||
* numpy | ||
* matplotlib | ||
* opencv | ||
|
||
``` | ||
pip install -r requiements.txt | ||
# setup for roi_layers | ||
python setup.py build develop | ||
``` | ||
|
||
#### Data Preparation | ||
Download COCO dataset to `datasets/coco` | ||
``` | ||
bash scripts/download_coco.sh | ||
``` | ||
Download VG dataset to `datasets/vg` | ||
``` | ||
bash scripts/download_vg.sh | ||
python scripts/preprocess_vg.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# LostGANs: Image Synthesis From Reconfigurable Layout and Style | ||
This is implementation of our ICCV19 paper [**Image Synthesis From Reconfigurable Layout and Style**](https://arxiv.org/abs/1908.07500) | ||
|
||
## Network Structure | ||
![network_structure](./figures/network_structure.png) | ||
|
||
## Installation | ||
Check [INSTALL.md](INSTALL.md) for installation instructions. | ||
#### 1. Download pretrained model | ||
Download pretrained models to `pretrained_model/` | ||
* Pretrained model on [COCO](https://drive.google.com/open?id=1WO6fLZqJeTUnmJTmieUopKLj9KGBhGd6) | ||
* Pretrained model on [VG](https://drive.google.com/open?id=1A_gP_WwZWonlXJhwcdBDgHuVaGSiVjMO) | ||
|
||
#### 2. Train models | ||
``` | ||
python train.py --dataset coco --out_path outputs/ | ||
``` | ||
|
||
#### 3. Run pretrained model | ||
``` | ||
python test.py --dataset coco --model_path pretrained_model/G_coco.pth --sample_path samples/coco/ | ||
``` | ||
|
||
|
||
## Results | ||
###### Multiple samples generated from same layout | ||
![various_out](./figures/various_outs.png) | ||
###### Generation results by adding new objects or change spatial position of object | ||
![add_obj](./figures/add_obj.png) | ||
###### Linear interpolation of instance style | ||
![style_morph](./figures/style_morph.png) | ||
###### Synthesized images and learned masks for given layout | ||
![mask](./figures/mask.png) | ||
|
||
## Contact | ||
Please feel free to report issues and any related problems to Wei Sun (wsun12 at ncsu dot edu) and Tianfu Wu (tianfu_wu at ncsu dot edu). | ||
|
||
|
||
## Reference | ||
* Synchronized-BatchNorm-PyTorch: [https://github.com/vacancy/Synchronized-BatchNorm-PyTorch](https://github.com/vacancy/Synchronized-BatchNorm-PyTorch) | ||
* Image Generation from Scene Graphs: [https://github.com/google/sg2im](https://github.com/google/sg2im) | ||
* Faster R-CNN and Mask R-CNN in PyTorch 1.0: [https://github.com/facebookresearch/maskrcnn-benchmark](https://github.com/facebookresearch/maskrcnn-benchmark) |
Empty file.
Oops, something went wrong.