Giter Club home page Giter Club logo

colorful_image_colorization_pytorch's Introduction

colorful image colorization pytorch

  • This is a pytorch implementation of paper Colorful Image Colorization, for EECS 6691 course presentation.
  • Notice that in the official repo, only the demo code was uploaded. Other implementation repositories contain errors in loss function, preprocessing and postprocessing, so I rewrite the code using pytorch.

Contribution

  • To my knowledge, it's the only implementation including both training and inference using pytorch
  • Model can be trained on both ImageNet and other dataset, including coco.

Usage

Train

Link to your dataset (ImageNet or other) using

$ cd data
$ ln -s <your_dataset_root> ./

Specify your target dataset in train.py line 129 and line 130. You should be very careful about the dataset format. Use defined module as your Dataset, if your dataset is constructed like ⬇️

|-- root
    |-- image1.jpg
    |-- image2.jpg
    |-- ...

Otherwise specify ImageFolder if the format is like ⬇️

|-- root
    |-- folder1
        |-- image1.jpg
        |-- image2.jpg
    |-- folder2
        |-- image1.jpg
        |-- image2.jpg
    |-- ...

Then you can set off to training using

$ python train.py

PS: for other configuration of training, see argument setup

Performance

Due to time limit, at this moment the model is under training. According to original paper, the model should be trained for 500k+ iterations, which would spend several days or so. Feedback will be released once the training is finished. But now you can check the loss curves.

Training Validation

Demo

Open demo.ipynb, choose either to inference with pre-saved model or your trained one. Examples image

colorful_image_colorization_pytorch's People

Contributors

87003697 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

colorful_image_colorization_pytorch's Issues

训练loss

你好,请教个问题。官方pytorch版本的测试代码,模型输出最后是2通道的,上一层313通道的特征又经过了一层卷积。如果是这样的话,作者提供的pytorch预训练模型,是不是用mse损失训练的?

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.