Code Monkey home page Code Monkey logo

context_encoder's Introduction

Project : Context Encoders: Feature Learning by Inpainting


Folder structure and instructions

The folder structure for the code is :

.
├── generator.py					# Generator Network
├── discriminator.py					# Discriminator network
├── run_test.bash					# Bash File (runs the test, Check contents for args to be passed
├── run_train.bash					# Bash File (runs the train, Check contents for args to be passed)
├── data_loader.py					# Image data loader
├── context_encoder.py					# Train Module
├── context_encoder_test.py				# Test module needs checkpoint as input
├── random_crop						# Train on random crops
│   ├── generator.py
│   ├── data_loader.py
│   ├── discriminator.py
│   ├── context_encoder.py
│   └── random_crop_epoch_results			# Results of random crops on train (around 4000 epochs)
├── paris_epoch_results_gifs				# Gifs from progress of epochs
│   └── split_images					# split-images obtained from image_spliter.py
├── paris_eval_results					# Obained results on eval data
├── paris_eval						# paris data eval set (get data from Pathak)
├── mid_eval_submissions				# submission folder for mid eval (project) 
│   └── images						# Random crop on CIFAR10
├── paris_train						# train images needs to be here (get data from Pathak)
├── log							# Logs
├── cat_dataset_results					# Results on Cat Dataset
├── final_eval_submission				# submission folder for final eval (project)
├── misc
│   ├── image_splitter.py				# batch image spliter
│   ├── gifmaker.py					# gif maker
│   └── run_help					# misc
├── run.md						# describes how to run the code
├── check_points					# checkpoint saved
├── README.md						# Readme
└── paris_epoch_results					# Epcoh wise one batch results

before cloning repo install git lfs as the repo includes check_point.pt which is over 800MB

Results over the paris dataset

The sample results of the dataset along with the ground truth and the cropped-out region. Top is the cropped image input to the generator and the middle is the output of the generator and last image shows the ground truth. Some of the results obtained on Paris Dataset
epoch results epoch results epoch results epoch results
Gifs illustrating Epoch-wise improvements
Epoch Gif Epoch Gif Epoch Gif Epoch Gif

Graphs of the train and validation losses across the epochs

Loss Graph

Results over cat dataset

Some of the results obtained on Cat dataset
CAT CAT CAT CAT CAT CAT

Links

Paris_dataset

#Note: The Paris Building Dataset cannot be made publicly available. Access to dataset can be obtained via mailing the original paper authors: Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell & Alexei A. Efros.

[Code for plots]

(https://colab.research.google.com/drive/1qHWsU9b6sVo0FfPebkF1GWZlLIpI-Cs0)

[Presentation]

(https://docs.google.com/presentation/d/1QF8oylaEKNHnNxCboERB1qOtrI7GsiZj1sY1es17YgM/edit?usp=sharing)

System Setup

Modules

python == 3.7
pytorch == 1.4
cudatoolkit == 10.1
pygifsicle

System Config and time to train

CPU Ryzen 5 3600
GPU GTX 1080ti 11GB
RAM 16GB 3600MHz

Random Crops around 4100 epochs took 32 Hrs
Center Crops around 200 epochs took 2hr 30min

context_encoder's People

Contributors

dhawals1939 avatar niharikamessi avatar svshivapuja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.