This fork specializes in the use of ForkGAN for the readaptation of clear images of drones to night or rainy one.
To generate the night samples the model was trained on a combination of Visdrone and UAVDT, while for the rain samples the same model was drained on a combination of BDD100K, ACDC and Cityscapes_rain. In both cases the model was trained for 40 epochs
In order to use the code create a new conda environment as follows:
conda create -n tf114 python=3.7
Then activate the environment and install the required packages:
conda activate tf114
conda install -f environment.yml
If you want to train on the same datasets of use download them from the following links:
- uavid (for testing),
- multi_src (for night prediction),
- bdd100k_acdc_synth (for rain prediction).
Put the downloaded (and extracted folder) inside the datasets
folder in the root path of the code. The folder structure, for each dataset should be as follows:
├──datset_name
├── trainA (rainy or night images)
├── Image00001.jpg
└── ...
├── trainB (daytime images)
├── Image1.jpg
└── ...
├── testA (testing rainy or night images)
├── Image13801.jpg (The test cover image that you want)
└── ...
├── testB (testing daytime images)
├── Image.jpg (The test message image that you want)
└── ...
To train the model on the night dataset run the following command from the root directory of the code:
bash scripts/night_train.sh
To train the model on the rain dataset run the following command from the root directory of the code:
bash scripts/rain_train.sh
In order to test the model that we have trained download the pretrained models from the following links:
Put the downloaded (and extracted folder) inside the check
folder in the root path of the code.
To test the model on the night dataset run the following command from the root directory of the code:
bash scripts/night_test.sh
To test the model on the rain dataset run the following command from the root directory of the code:
bash scripts/rain_test.sh
This repo is a fork of the one made by Ziqiang Zheng, Yang Wu, Xinran Han, and Jianbo Shi.
The original repo can be found here, while the linked paper can be found here.
The modification of the original code was made by Matteo Caligiuri.