This repo contains the code that I used for conducting my experiments with CoCosNet on the ADE20K Dataset.
Clone the Synchronized-BatchNorm-PyTorch repository.
cd models/networks/
git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm .
cd ../../
Install dependencies:
pip install -r requirements.txt
Download the pretrained model from here and save them in checkpoints/ade20k
. Then run the command
sh test_demo.sh
The results are saved in output/test/ade20k
.
If you don't want to use mask of exemplar image when testing, you can download model from here, save them in checkpoints/ade20k
, and run
sh test_demo_no_mask.sh
I performed image editing by manipulating the input Semantic Maps to the CoCosNet, treating the Original Image as the Exemplar Image
As observed, CoCosNet doesn't perform upto the mark in object based image editing. However, in the paper, authors do mention about successful image editing tasks. For clearity, I used the scene-parsing network to generate the semantic maps to get clearer boundaries.
This code borrows heavily from the official CoCosNet repo.