2024-25 BA Integrated Computer Science Final Year Project
Nuoxi Zhang
This project is built on top of the InstructIR model developed by Conde et al. (2024).
- ArXiv:
- GitHub: InstructIR Repository
- Hugging Face Demo:
You can try out the code using one of the two options below:
- Navigate to the
colabNotebookfolder in this repository. - Upload the two Colab notebooks to your Google Colab account.
- Follow the instructions in Section 2 for setting up your Google Drive.
- Clone this repository to your local machine.
- Follow the setup instructions provided in Section 3 below.
- Test Dataset: Download Link
- Training Dataset: Download Link
- Pretrained weights Download Link
Before running the Colab notebooks, configure your Google Drive as follows:
-
Create a Parent Folder:
In your Google Drive, create a new folder namedFYPData. -
Upload the Models:
Down load the pretrained models using the link above. Create a folder calledmodels/inFYPDataand upload the pretrained models to this folder. -
Test Dataset:
- Download and unzip the test dataset.
- Upload the unzipped test dataset to
FYPDataand rename the folder totest-data.
-
Training Dataset:
- Download and unzip the training dataset.
- Upload the unzipped training dataset to
FYPDataand rename the folder toTrain.
-
Additional Files:
- Upload the
train_data_names/folder from this repository toFYPData. - Upload the file
text/human_instructions.jsontoFYPData.
- Upload the
To run the training and testing code on your local machine, follow these steps:
-
Download and Unzip Datasets:
Download both the test and training datasets and the pretrained weights using the provided links and unzip them.Unzip the pretrained models, and place them in
models/folder. -
Organize the Training Dataset:
Ensure that the training dataset is structured as shown below (create folders manually if needed):
./data
└── Train
├── dehaze
│ ├── original
│ └── synthetic
├── denoise
└── derain
├── original
└── rainy
- Organize the Test Dataset:
Ensure that the test dataset is structured as follows (create folders manually if needed):
./test-data
├── denoising_testsets
│ ├── CBSD65
│ ├── CBSD65_15
│ ├── CBSD65_25
│ └── CBSD65_50
├── Kodak24
│ ├── Kodak24_15
│ ├── Kodak24_25
│ └── Kodak24_50
├── Rain100L
│ ├── original
│ └── rainy
└── SOTS
├── GT
└── IN
3. Run
python requirements_fyp.txt
python fyp_eval.py
python fyp_train.py