mapillary / mapillary/OpenSfM

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

Open
#1,023 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.