Giter Site home page Giter Site logo

mihamerstan / context_encoder_pytorch-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boyuanjiang/context_encoder_pytorch

0.0 0.0 0.0 20.69 MB

PyTorch Implement of Context Encoders: Feature Learning by Inpainting

License: MIT License

Python 100.00%

context_encoder_pytorch-1's Introduction

Context Encoders: Feature Learning by Inpainting

This is the Pytorch implement of CVPR 2016 paper on Context Encoders

corrupted result

1) Semantic Inpainting Demo

  1. Install PyTorch http://pytorch.org/

  2. Clone the repository

git clone https://github.com/BoyuanJiang/context_encoder_pytorch.git
  1. Demo

    Download pre-trained model on Paris Streetview from Google Drive OR BaiduNetdisk

    cp netG_streetview.pth context_encoder_pytorch/model/
    cd context_encoder_pytorch/model/
    # Inpainting a batch iamges
    python test.py --netG model/netG_streetview.pth --dataroot dataset/val --batchSize 100
    # Inpainting one image 
    python test_one.py --netG model/netG_streetview.pth --test_image result/test/cropped/065_im.png

2) Train on your own dataset

  1. Build dataset

    Put your images under dataset/train,all images should under subdirectory

    dataset/train/subdirectory1/some_images

    dataset/train/subdirectory2/some_images

    ...

    Note:For Google Policy,Paris StreetView Dataset is not public data,for research using please contact with pathak22. You can also use The Paris Dataset to train your model

  2. Train

python train.py --cuda --wtl2 0.999 --niter 200
  1. Test

    This step is similar to Semantic Inpainting Demo

context_encoder_pytorch-1's People

Contributors

boyuanjiang 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.