Giter Site home page Giter Site logo

color-constancy-pcc's Introduction

Color constancy from a pure color view

Shuwei Yue and *Minchen Wei

Color, Imaging, and Metaverse Research Center, The Hong Kong Polytechnic University.

PCC-MLP-model If you use this code, please cite our paper:

@article{yue2023color,
  title={Color constancy from a pure color view},
  author={Yue, Shuwei and Wei, Minchen},
  journal={JOSA A},
  volume={40},
  number={3},
  pages={602--610},
  year={2023},
  publisher={Optica Publishing Group}
}

Code

Prerequisite

  • Pytorch
  • opencv-python

Training

  • step 1: Preparing the dataset

To train PCC, training/validation data should have the following formatting:

 datasets/numpy_data/
	|1_8D5U5524.npy
	|2_8D5U5525.npy
	...
 datasets/numpy_labels/
 	|1_8D5U5524.npy
	|2_8D5U5525.npy
	...

So, it is better to preprocess your data and corresponding labels into .npy format. The processed Recommend-ColorChecker dataset (CC2018) are provided in the folder of datasets/CC2018/. Noted that the black level and masked card of this dataset have subtracted, then resized to $64\times64$ with normalized.

  • step 2:

Run train.py

You can change the training fold number in config/param_config.py

Testing

move your trained model from log folder to the pretrain_models

Run test.py

PolyU Pure Color dataset

We will release the full dataset soon. For now, only thumbnails are provided in the following link:

pcc_huawei_thumbnail

thumbnails-view

color-constancy-pcc's People

Contributors

shuwei666 avatar bright-shawn avatar

Stargazers

 avatar  avatar  avatar Changjiu Yang avatar devin_tong avatar gggg avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar weisterki avatar

Watchers

 avatar  avatar

color-constancy-pcc's Issues

correct

How can I use the trained network to predict illumination for my own image of any size and then correct it?

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.