/Experiments-CoCosNet

Code for experimenting with CoCosNet.

Primary LanguagePythonMIT LicenseMIT

Experiments with CoCosNet

This repo contains the code that I used for conducting my experiments with CoCosNet on the ADE20K Dataset.

Installation

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

Inference Using Pretrained Model

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

Experiments

I performed image editing by manipulating the input Semantic Maps to the CoCosNet, treating the Original Image as the Exemplar Image

Original Setting

Original Setting

Editted Setting

Editted Setting

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.

Acknowledgments

This code borrows heavily from the official CoCosNet repo.