Skip to content

ForkGAN: Seeing into the rainy night. ECCV 2020 (oral). A task-agnostic image translation framework that can boost multiple vision tasks in adverse weather conditions, including localization, semantic segmentation and object detection.

Notifications You must be signed in to change notification settings

matteocali/ForkGAN

 
 

Repository files navigation

ForkGAN: Readaptation by MEDIALab

Description

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

Installation

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

Usage

Datasets

If you want to train on the same datasets of use download them from the following links:

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)
       └── ... 

Training

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

Testing

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

Acknowledgments

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.

About

ForkGAN: Seeing into the rainy night. ECCV 2020 (oral). A task-agnostic image translation framework that can boost multiple vision tasks in adverse weather conditions, including localization, semantic segmentation and object detection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.0%
  • Shell 3.0%