Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.58k stars 509 forks source link

Cityscapes datastructure #545

Closed S-Beers closed 1 year ago

S-Beers commented 1 year ago

Hi, I want to replicate some results, however, I have some issues with loading in the Cityscapes dataset and I can't find anywhere how the dataset structure should be. I saw the list_file and labels_csv_path are needed, but I don't know how to obtain these.

dagshub[bot] commented 1 year ago

Join the discussion on DagsHub!

S-Beers commented 1 year ago

to be clear: I get these errors when trying to evaluate on Cityscapes using recipes. I set dataset_params.data_dir to the correct folder, but the folder from Cityscapes doesn't contain thelist_file and labels_csv_path.

I ran thecsCreateTrainIdLabelImgs from https://github.com/mcordts/cityscapesScripts to adhere to the label format, as described in the cityscape_Segmentation.py docstring, but it did not provide me with the proper files

Louis-Dupont commented 1 year ago

Hi @S-Beers, The files that are required in list_file and labels_csv_path actually need to be downloaded here and this was not documented, thanks for raising this issue!

The dataset description was just updated in master. Here is a copy of what was added, let me know if it is not clear :)


To use this Dataset you need to:
- Download cityscape dataset (https://www.cityscapes-dataset.com/downloads/)
    root_dir (in recipe default to /data/cityscapes)
        ├─── gtFine
        │       ├── test
        │       │     ├── berlin
        │       │     │   ├── berlin_000000_000019_gtFine_color.png
        │       │     │   ├── berlin_000000_000019_gtFine_instanceIds.png
        │       │     │   └── ...
        │       │     ├── bielefeld
        │       │     │   └── ...
        │       │     └── ...
        │       ├─── train
        │       │     └── ...
        │       └─── val
        │             └── ...
        └─── leftImg8bit
                ├── test
                │     └── ...
                ├─── train
                │     └── ...
                └─── val
                      └── ...
- Download metadata folder (https://deci-pretrained-models.s3.amazonaws.com/cityscape_lists.zip)
    lists
        ├── labels.csv
        ├── test.lst
        ├── train.lst
        ├── trainval.lst
        └── val.lst
- Move Metadata folder to the Cityscape folder
    root_dir (in recipe default to /data/cityscapes)
        ├─── gtFine
        │      └── ...
        ├─── leftImg8bit
        │      └── ...
        └─── lists
               └── ...
Example:
    >> CityscapesDataset(root_dir='.../root_dir', list_file='lists/train.lst', labels_csv_path='lists/labels.csv')
shaydeci commented 1 year ago

I am closing this issue down as dataset setup instructions were added.