Skip to content

matheusbarrosp/sr-semseg-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Super Resolution + Semantic Segmentation Framework


Super Resolution (D-DBPN) instructions

Training

Modify and run train.sh file according to the required configuration or

python main.py [parameters]

Parameters: refer to main.py code


Testing

Modify and run test.sh file according to the required configuration or

python eval.py [parameters]

Parameters: refer to eval.py code


Folder configuration

  • dataset_name (main dataset folder)
    • train
      • {training HR images} (the images are automatically downsampled during runtime)
    • validation
      • {validation HR images} (the images are automatically downsampled during runtime)
    • test
      • {testing LR images}

Semantic Segmentation (Segnet) instructions

Training

Modify and run train_script.sh file according to the required configuration or

python  train.py [conv_name] [fold_name] [data_name] [task_name]

Parameters:

conv_name = Semantic segmentation network name (default: segnet)

fold_name = Default: 0 (for k-fold validation)

data_name = Name of the folder of the dataset

task_name = Name of the segmentation task (for when you have diffent segmentations for the same image), necessary for the folder configuration (see below).


Testing

Modify and run test.sh file according to the required configuration or

python eval.py [conv_name] [fold_name] [data_name] [task_name]

Parameters: same as training


Folder configuration

  • dataset_name (main dataset folder)
    • images
      • {ALL images from the dataset, including training, test and validation}
    • ground_truths (folder with the thematic maps)
      • [task_name] (you choose the name, there can be multiple folders like this if you have different segmentations for the images)
        • {ALL thematic map images, including training, test and validation. EACH MAP MUST HAVE THE SAME NAME AS THE CORRESPONDING IMAGE IN THE images FOLDER}
    • {Fold files: txt files for each fold for training, test and validation (see below)}

Fold files: for each fold, create one file for the training images, one file for the test images and one file for the validation images. Each of these files should contain the name of the images (one image per line) of the corresponding category (train, test or validation). The files must be named [task_name]_[trn | val | tst]_f[fold_name].txt

Example: Let's suppose we want to segment coffee crops. Our dataset is named "coffee_dataset" and our task_name is "coffee" (what we want to segment). We will not use k-fold validation (thus we have only one fold, which will be named "0", that is fold_name=0). We have images "montesanto_1.png" and "montesanto_2.png" as training, "guaxupe_1.png" as validation and "guaranesia_1.png" as test. Therefore, our folder configuration would be:

  • coffee_dataset
    • images
      • montesanto_1.png
      • montesanto_2.png
      • guaxupe_1.png
      • guaranesia_1.png
    • ground_truths
      • coffee
        • montesanto_1.png
        • montesanto_2.png
        • guaxupe_1.png
        • guaranesia_1.png
    • coffee_trn_f0.txt
    • coffee_tst_f0.txt
    • coffee_val_f0.txt

Inside coffee_trn_f0.txt:

montesanto_1.png
montesanto_2.png

Inside coffee_val_f0.txt:

guaxupe_1.png

Inside coffee_tst_f0.txt:

guaranesia_1.png

For multiple folds, there would also be coffee_trn_f1.txt, coffee_trn_f2.txt and so on, each one containing its corresponding images


Citations

If you find this work useful, please consider citing it:

M. B. Pereira and J. A. dos Santos, "How Effective Is Super-Resolution to Improve Dense Labelling of Coarse Resolution Imagery?," 2019 32nd SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI), 2019, pp. 202-209, doi: 10.1109/SIBGRAPI.2019.00035.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published