openrsgis / pytdml

Python library for TrainingDML-AI encode/decode
MIT License
16 stars 7 forks source link

Use of STAC for the input format of the label data #2

Open pixalytics opened 1 year ago

pixalytics commented 1 year ago

I've been testing the pytdml code for translating my training dataset into tdml format.

I have the labels stored in STAC format, but the support for STAC depends on the task_type and label_type. For object detection, 'stac' is recognised within load_data_object_detection. However, for SemanticSegmentation it is not. As a workaround, I've currently specified my label format as .json rather than stac so the code doesn't look for a file ending with .stac and instead finds the STAC json file.

I think it would be helpful if the reading of label data in the STAC format was made generic across all the task types. Rather than writing your own STAC reader, you could instead look at using https://github.com/stac-utils/pystac

boyi-shangguan commented 1 year ago

Great suggestion! Thank you very much, I will look up the pystac and update the way read the STAC file.