mapillary / OpenSfM

Open source Structure-from-Motion pipeline
https://www.opensfm.org/
BSD 2-Clause "Simplified" License
3.39k stars 859 forks source link

DataSet method "segmentation_labels" from dataset.py returning empty list. #1023

Open Pikauba opened 1 year ago

Pikauba commented 1 year ago

The method [_segmentationlabels] from the class DataSet should return all the unique classes labels contained in the segmentation masks. Instead, it return an empty list which is useless considering that it is misleading. It should be defined according to the segmentations folder linked to the dataset object (check if there is segmentations and check for unique values contained inside of each image) and add each unique class value inside a set.

def segmentation_labels(self) -> List[Any]:
        return []

It should at least raise an error if there is no segmentations linked to the object.

MrCasler commented 1 year ago

I also have an issue with this, I previously thought that they were still being generated for example in dense.py but turns out it stays an empty list all the way to reconstruction. Ill probably have to write my own function to return segmentation labels.