Modify and run train.sh file according to the required configuration or
python main.py [parameters]
Parameters: refer to main.py code
Modify and run test.sh file according to the required configuration or
python eval.py [parameters]
Parameters: refer to eval.py code
- 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}
- train
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).
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
- 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}
- [task_name] (you choose the name, there can be multiple folders like this if you have different segmentations for the images)
- {Fold files: txt files for each fold for training, test and validation (see below)}
- images
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
- coffee_trn_f0.txt
- coffee_tst_f0.txt
- coffee_val_f0.txt
- images
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
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.