Getting Started
1. Download the codebase
This tutorial provides step-by-step guidance on how to set up the codebase.
First, please download the codebase from our GitHub repository.
After downloading the codebase, you need to install the required packages.
2. Install the required packages
Using local pip
If you are using local pip, you can install the required packages by running the following command:
python -V # check the version of python (tested to work with python 3.10)
pip install -r requirements.txt
Using virtualenv
If you are using virtualenv to manage your Python environment, you can install the required packages by running the following command:
pip install virtualenv # if virtualenv is not installed
virtualenv -p python3.10 MatisseEnv # create the environment
source MatisseEnv/bin/activate # activate the environment
pip install -r requirements.txt # install the required packages
Using Conda
If you are using Conda to manage your Python environment, you can install the required packages by running the following command:
conda create --name MatisseEnv python=3.10 # create the environment
conda activate MatisseEnv # activate the environment
pip install -r requirements.txt # install the required packages
3. Check installation
To check if the installation is successful, you can run the following command from the root directory of the codebase (i.e. ./Matisse/
):
python check_installation.py
If the installation is successful, you should see the following output:
**************************************************
Installation successful!
**************************************************
If you see any errors, please check the installation instructions again.
4. Download the weights of the pre-trained models
You can download the weights of our pre-trained models by running the following command from the root directory of the codebase:
chmod +x Experiments/download_pretrained_models.sh # make the script executable
./Experiments/download_pretrained_models.sh # download the trained model weights
This will populate a LearnedWeights
folder under the Experiments
directory with the weights of the pre-trained models.
This folder would be used in the following tutorials.
5. (Optional) Download the NTIRE dataset
If you wish to reproduce the results in the paper or train your own model using the hyperspectral image dataset, you will need to download the NTIRE 2022 dataset. You can download the dataset by signing up for the NTIRE 2022 Challenge on Spectral Reconstruction from RGB.
The downloaded hyperspectral image file (e.g. ARAD_1K_0001.mat
) should be placed under the folder Matisse/Dataset/NTIRE2022_original/data/
.