Code for paper Unsupervised Object Segmentation by Redrawing.
- Download and extract: Dataset, Segmentations, and data splits from http://www.robots.ox.ac.uk/~vgg/data/flowers/102/
- The obtained jpg folder, segmin folder and setid.mat file should be placed in the same data root folder.
- Download and extract Images and Segmentations from http://www.vision.caltech.edu/visipedia/CUB-200-2011.html
- Place the segmentations folder in the CUB_200_2011 folder.
- Place the train_val_test_split.txt file from this repo in the CUB_200_2011 folder.
- dataroot should be set to the CUB_200_2011 folder.
- Download and extract the funneled images from http://vis-www.cs.umass.edu/lfw/
- Download and extract the ground truth images from http://vis-www.cs.umass.edu/lfw/part_labels/
- Place the obtained lfw_funneled and parts_lfw_funneled_gt_images folders in the same data root folder.
- Also place the train.txt, val.txt and test.txt files from the repo in this data root folder.
Tested on python3.7 with pytorch 1.0.1
python redo.py --dataset flowers --nfX 32 --useSelfAttG --useSelfAttD --outf path_to_output_folder --dataroot path_to_data_folder
Those are not cherry-picked.
Column 1: Input
Column 2: Ground Truth
Column 3: output mask for object 1
Columns 4-7: generated image with redrawn object 1
Columns 8-11: generated image with redrawn object 2