Giter Site home page Giter Site logo

zhi-feng-zhang / dalcc Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 43.65 MB

Official codes for 'Domain Adversarial Learning for Color Constancy'

License: MIT License

Python 1.58% Jupyter Notebook 98.42%
illumination-estimation domain-adversarial-learning color-constancy

dalcc's Introduction

License Framework

This repo contains the official implementation of the IJCAI 2022 paper 'Domain Adversarial Learning for Color Constancy', the code will be available after the IJCAI 2022 meeting.

Domain Adversarial Learning for Color Constancy

Zhifeng Zhang, Xuejing Kang, Anlong Ming

School of Computer Science, Beijing University of Posts and Telecommunications

1: Required Environment Installation

Please use the command pip install -r requirements.txt or manually install the following packages.

  • torch==1.9.0+cu111
  • numpy==1.20.1
  • matplotlib==3.3.4
  • opencv_python==4.5.3.56
  • torchsummary==1.5.1
  • scipy==1.6.2
  • torchvision==0.10.0+cu111

2: Data Preprocessing

For details on RAW image preprocessing principle, please refer to RAW_preprocessing_MATLAB and RAW_preprocessing_Python.

Color Checker Data preprocessing:

  • Download the dataset on: https://www2.cs.sfu.ca/~colour/data/shi_gehler/
  • Store the download file in: /dataset/colorconstancy/colorchecker2010/
  • Set the path of the output file, such as: /home/*/data/CC_full_size/ or /home/*/data/CC_resize/
  • Run the ./dataset/color_constancy_data_process_all.py code

Cube+ Data preprocessing

  • Download the dataset on: https://ipg.fer.hr/ipg/resources/color_constancy
  • Store the download file in: /dataset/colorconstancy/Cube/
  • Set the path of the output file, such as: /home/*/data/Cube_full_size/ or /home/*/data/Cube_resize/
  • Run the ./dataset/color_constancy_data_process_all.py code

NUS Data preprocessing

Summary

  • If you have done the above, run the ./dataset/data_read.py for a simple test.
  • Run ./dataset/data_loder.py to check that the data loader is running correctly.
  • Refer to the ./dataset/fold_dalcc.py to check the three cross-validation. The fold for cross-validation can be found in ./data_fold/

3: Network Model Checking

  • Download the Alexnet model parameter that pre-trained on ImageNet, and run the ./model/alexnet.py to check the AlexNet model.
  • Run the ./model/DALCC.py to check the DALCC model.

4: Train and Test

  • Run the ./train.py to train the DALCC model.
  • Run the ./test.py to test the DALCC model.

5: Pretrained model

6: Visualization of our DALCC.

show

dalcc's People

Contributors

mrobotit avatar zhi-feng-zhang avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mrobotit

dalcc's Issues

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.