GithubHelp home page GithubHelp logo

guihu503 / hierarchical-regression-network-for-spectral-reconstruction-from-rgb-images Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhaoyuzhi/hierarchical-regression-network-for-spectral-reconstruction-from-rgb-images

0.0 0.0 0.0 54.49 MB

NTIRE 2020 Spectral Reconstruction Challenge 1st Place Paper

Python 37.14% Jupyter Notebook 62.86%

hierarchical-regression-network-for-spectral-reconstruction-from-rgb-images's Introduction

Hierarchical Regression Network for Spectral Reconstruction from RGB Images

The README file for NTIRE 2020 Spectral Reconstruction Challenge of Team OrangeCat: Hierarchical Regression Network for Spectral Reconstruction from RGB Images. Our method achieves the 1st place in track 2: real-world images.

Paper can be downloaded: https://openaccess.thecvf.com/content_CVPRW_2020/html/w31/Zhao_Hierarchical_Regression_Network_for_Spectral_Reconstruction_From_RGB_Images_CVPRW_2020_paper.html

Link to pre-trained models and testing results

HRNet architecture

  • The main network (different layers are connected by PixelShuffle and PixelUnShuffle):

  • The proposed ResDB and ResGB used in main network:

File structure

NTIRE 2020 Spectral Reconstruction Challenge
│   README.md
│   validation*.py
│   test*.py
│   ensemble*.py
│
└───track1 (saving the trained models of track1)
│   │   code1_G_epoch9000_bs8.pth
│   │   code1_second_G_epoch8000_bs8.pth
│   │   ...
│
└───track2 (saving the trained models of track2)
│   │   code1_bs2_G_epoch6000_bs2.pth
│   │   code2_G_epoch6000_bs8.pth
│   │   ...
|
└───NTIRE2020_Test_Clean
│    │   ARAD_HS_0468_clean.mat
│    │   ARAD_HS_0508_clean.mat
│    │   ...
│
└───NTIRE2020_Test_RealWorld
│    │   ARAD_HS_0477_RealWorld.mat
│    │   ARAD_HS_0502_RealWorld.mat
│    │   ...
│
└───test (will generate by test1.py or test2.py)
│   └───track1
│       │   ARAD_HS_0468_clean.mat
│       │   ARAD_HS_0508_clean.mat
│       │   ...
│   └───track2
│       │   ARAD_HS_0477_RealWorld.mat
│       │   ARAD_HS_0502_RealWorld.mat
│       │   ...
│
└───ensemble (will generate by ensemble1.py or ensemble2.py)
│   └───track1
│       │   ARAD_HS_0468_clean.mat
│       │   ARAD_HS_0508_clean.mat
│       │   ...
│   └───track2
│       │   ARAD_HS_0477_RealWorld.mat
│       │   ARAD_HS_0502_RealWorld.mat
│       │   ...
│   

Requirements

  • Python 3.6
  • Pytorch 1.0.0
  • Cuda 8.0

Train

  • Run train.py.
  • Change baseroot that contains training data.
  • Change save_path corresponding to track 1 or track 2.
  • Change other parameters.

Test

Note that the data should be first generated from different models (please run test*.py). Then compute the average of all results by running ensemble_track*_8methods.py. Finally, all the results for both tracks are saved in ./ensemble/track1 and ./ensemble/track2.

track 1 generation

  • Run test1.py.
  • It will output 8 results of 8 networks.

track 1 ensemble

  • Run ensemble_track1_8methods.py.
  • It will output 1 ensemble result of 8 generated data.

track 2 generation

  • Run test2.py.
  • It will output 8 results of 8 networks.

track 2 ensemble

  • Run ensemble_track2_8methods.py.
  • It will output 1 ensemble result of 8 generated data.

For each track, we use the "best" epoch for ensemble:

Visualize

  • Run train_visualize.py or validation_visualize.py or test_visualize.py.

Generated spectral images

  • Track 1 comparison with other methods:

* Track 2 comparison with other methods:

* Track 1 all 31 bands (400nm - 700nm) of one image:

* Track 2 all 31 bands (400nm - 700nm) of one image:

Generated infrared images

Reference

If you have any question, please do not hesitate to contact [email protected]

If you find this code useful to your research, please consider citing:

@inproceedings{zhao2020hierarchical,
  title={Hierarchical Regression Network for Spectral Reconstruction from RGB Images},
  author={Zhao, Yuzhi and Po, Lai-Man and Yan, Qiong and Liu, Wei and Lin, Tingyu},
  booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
  year={2020},
}

CVPRW poster

hierarchical-regression-network-for-spectral-reconstruction-from-rgb-images's People

Contributors

zhaoyuzhi 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.