liuguoyou / PIE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PIE: Physics-inspired Contrastive Learning for Low-light Enhancement


Experiment

PyTorch implementation of PIE

Requirements

  • Python 3.8
  • PyTorch 1.4.0
  • opencv
  • torchvision
  • numpy
  • pillow
  • scikit-learn
  • tqdm
  • matplotlib
  • visdom

SCL-LLE does not need special configurations. Just basic environment.

Folder structure

The following shows the basic folder structure.

├── datasets
│   ├── data
│   │   ├── cityscapes
│   │   └── Contrast
|   ├── test_data
│   ├── cityscapes.py
|   └── util.py
├── lowlight_test.py # low-light image enhancement testing code
├── train.py # training code
├── lowlight_model.py
├── Myloss.py
├── CR.py
├── curves.py
├── checkpoints
│   ├── PIE.pth #  A pre-trained PiLLE model

Test

  • cd PIE
python lowlight_test.py

The script will process the images in the sub-folders of "test_data" folder and make a new folder "result" in the "datasets". You can find the enhanced images in the "result" folder.

Train

  1. cd PIE
  2. download the Cityscapes dataset
  3. download the cityscapes training data google drive and contrast training data google drive
  4. unzip and put the downloaded "train" folder and "Contrast" folder to "datasets/data/cityscapes/leftImg8bit" folder and "datasets/data" folder
python train.py

Contact

If you have any question, please contact xuzhengyan@nuaa.edu.cn

About


Languages

Language:Python 100.0%