这是indexloc提供的服务,不要输入任何密码
Skip to content

SaoYan/Multiscale-Super-Spectral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiscale-Super-Spectral

AUR


Bachelor's Thesis
English Version
Chinese Version (Unofficial)

Project webpabe
Spectral Super-resolution from Single RGB Image Using Multi-scale CNN


Pre-trained models

Download pre-trained model from Baidu Cloud or Google Drive
Place them at TestLog.

Contents of this repository

  • dataset.py: data pre-processing
  • model.py & train.py: our model
  • model_ref.py & train_ref.py: the comparison model
  • test.py: test the models and report the evaluation results
  • utilities.py: some auxiliary functions

How to run

1. Dependences

2. Download data

NTIRE 2018 challenge on spectral reconstruction from RGB images (Track 1)

Place the data at data and arrange the directories as follows:

data/Train_Spectral/
--BGU_HS_00001.mat
... ...
--BGU_HS_00256.mat

data/Train_RGB/
--BGU_HS_00001_clean.png
... ...
--BGU_HS_00256_clean.png

data/Test_Spectral/
--BGU_HS_00257.mat
--BGU_HS_00259.mat
--BGU_HS_00261.mat
--BGU_HS_00263.mat
--BGU_HS_00265.mat

data/Test_RGB/
--BGU_HS_00257_clean.png
--BGU_HS_00259_clean.png
--BGU_HS_00261_clean.png
--BGU_HS_00263_clean.png
--BGU_HS_00265_clean.png

3. Train our model

If you are running the code for the first time, remember data pre-processing.

python3 train.py --preprocess True

Otherwise, run training directly.

python3 train.py

You may also adjust hyper-parameters such as batch size, initial learning rate, dropout rate, etc.

4. Train the comparison model

Reference paper: Learned Spectral Super-resolution
The data pre-processing is exactly the same as above, so you can run training directly.

python3 train_ref.py

5. Test our model

Dropout rate: 0.2

python3 test.py --model Model \
  --dropout 2

Dropout rate: 0

python3 test.py --model Model \
  --dropout 0

6. Test the comparison model

Dropout rate: 0.5

python3 test.py --model Ref \
  --dropout 5

Dropout rate: 0

python3 test.py --model Ref \
  --dropout 0

About

Spectral Super-resolution from Single RGB Image Using Multi-scale CNN

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages