[proposal] Add `instance` option to SBD dataset.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
Hello,
Currently, the SBDataset does not have the option to return boundaries or segments of instances available on the original dataset, the function is fixed to class-specific only.
More info about the instances from the dataset README.
o cls
This directory contains category-specific segmentations and boundaries. There is one .mat file for
each image. Each mat file contains a struct called GTcls with 3 fields:
- GTcls.Segmentation is a single 2D image containing the segmentation. Pixels that belong to
category k have value k, pixels that do not belong to any category have value 0.
- GTcls.Boundaries is a cell array. GTcls.Boundaries{k} contains the boundaries of the k-th category.
These have been stored as sparse arrays to conserve space, so make sure you convert them to full arrays
when you want to use them/visualize them, eg : full(GTcls.Boundaries{15})
- GTcls.CategoriesPresent is a list of the categories that are present.
o inst
This directory contains instance-specific segmentations and boundaries. There is one mat file for each
image. Each mat file contains a struct called GTinst with 3 fields:
- GTinst.Segmentation is a single 2D image containing the segmentation. Pixels belonging to the
i-th instance have value i.
- GTinst.Boundaries is a cell array. GTinst.Boundaries{i} contains the boundaries of the i-th instance.
Again, these are sparse arrays.
- GTinst.Categories is a vector with as many components as there are instances. GTinst.Categories(i) is
the category label of the i-th instance.
Is this suggestion adequate?
I have already done these changes locally, if approved I will open a PR.
cc @pmeier
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 with the SBDataset implementation and the instance section of the dataset README. Trace how the current class-specific segmentation and boundary data are selected, then verify that an instance option returns the corresponding instance segments and boundaries from the original dataset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100