Skip to content

VMoskov/swiftnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftNet

Source code to reproduce results from

Steps to reproduce

Install requirements

  • Python 3.7+
pip install -r requirements.txt

Download Cityscapes

From https://www.cityscapes-dataset.com/downloads/ download:

  • leftImg8bit_trainvaltest.zip (11GB)
  • gtFine_trainvaltest.zip (241MB)

Either download and extract to datasets/ or create a symbolic link datasets/Cityscapes

Expected dataset structure for Cityscapes is:

gtFine/
    train/
        aachen/
            aachen_000000_000019.png
            ...
        ...
    val/
        ...
leftImg8bit/
    train/
        aachen/
            aachen_000000_000019.png
            ...
        ...
    val/
        ...

Evaluate

Pre-trained Cityscapes models available
  • Download and extract to weights directory.

Set evaluating = True inside config file (eg. configs/rn18_single_scale.py) and run:

python eval.py configs/rn18_single_scale.py

Train

python train.py configs/rn18_single_scale.py --store_dir=/path/to/store/experiments

Additional instructions for students of D307:

  • Use config configs/rn18_single_scale.py for your experiments
  • If you need to use another dataset, create a symbolic link to the folder inside dataset/custom_dataset and add support for the dataset in data/custom_data/custom_data.py (use Cityscapes files as template)
  • You do not have to install and set up Cython since we have added new methods for confusion matrix and metrics calculation
  • Be careful when naming the experiments folders so you do not override something. Output folder should contain saved best model and last model, pickle file with validation mIoU and loss values.
  • When evaluating, be sure to set evaluating = True in config and provide correct path of the saved model.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.7%
  • Cython 2.1%
  • C++ 1.8%
  • Shell 0.4%