DataSet method "segmentation_labels" from dataset.py returning empty list.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
The method [segmentation_labels] 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in opensfm/dataset.py at DataSet.segmentation_labels and inspect how the dataset's segmentations folder is located. Check the available segmentation masks for unique class values and determine the expected behavior when no segmentations are linked. Done means the method returns the collected unique labels instead of an empty list and handles the missing-segmentation case explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100