Code Monkey home page Code Monkey logo

chainer-pix2pix's Introduction

chainer-pix2pix

chainer implementation of pix2pix https://phillipi.github.io/pix2pix/

Example result on CMP facade dataset

左からinput, output, ground_truth

usage

  1. chainerの最新版を入れる
  2. facade datasetを http://cmp.felk.cvut.cz/~tylecr1/facade/ から持ってくる
  3. python train_facade.py -g [GPUの番号] -i [データセットのroot directory] --out [出力ディレクトリ] --snapshot_interval 10000
  4. 数時間待つ
  • --outで指定したディレクトリに、--snapshot_intervalで指定した頻度で、現在のモデルと、結果を可視化した画像が記録される
  • モデルは結構サイズが大きいので、--snapshot_intervalを下げすぎないように注意

facade以外のデータセットでやるとき

  • データセットを用意する。位置の合った画像(あるいは画像的な構造を持つarray)のペアが必要。数百枚程度でもそれっぽい結果が出せると言われている。
  • facade_dataset.pyを書き換える。get_exampleが呼ばれた時に、i番目の(入力画像, 教師出力画像)が返るようになっていれば良い(両方numpy array)。
  • updater.pyでlossの計算を行っているが(現在はL1 loss + adversarial loss)、変える必要があれば変える。
  • facade_visualizer.pyの可視化コードをデータセットに合わせて書き換える。
  • train_facade.pyは50行目くらいのin_ch, out_chをデータセットに合わせて書き換える。

chainer-pix2pix's People

Contributors

mattya avatar nushio3 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.