资源算法context_encoder_pytorch

context_encoder_pytorch

2019-09-17 | |  142 |   0 |   0

Context Encoders: Feature Learning by Inpainting

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

 val_cropped_samples.pngval_recon_samples.png

1) Semantic Inpainting Demo

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

  2. Clone the repository

    git clone https://github.com/BoyuanJiang/context_encoder_pytorch.git
  3. 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 iamgespython 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

上一篇:C3D

下一篇:Noisy Networks for Exploration

用户评价
全部评价

热门资源

  • TensorFlow-Course

    This repository aims to provide simple and read...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • mxnet_VanillaCNN

    This is a mxnet implementation of the Vanilla C...

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...

  • Klukshu-Sockeye-...

    KLUKSHU SOCKEYE PROJECTS 2016 This repositor...