Automatically refine generated training dataset masks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 385
- PR merge metrics
- No merged PRs in 30d
Description
At the moment we generate the segmentation masks based on OpenStreetMap geometries in rs rasterize. There is no standard of how fine or coarse geometries are mapped in OpenStreetMap. Sometimes we get fine-detailed masks, sometimes they can be very coarse.
See the following for quite a good mask:
| Image | Mask |
|---|---|
![]() |
![]() |
We should check if the cv2.floodFill algorithm can help us automatically refining the masks.
It works as follows: start out with a seed pixel in the image and from there grow a region as long as the neighboring pixels are "similar" by color. We probably need to experiment with different color spaces, e.g. converting RGB into HSV and then maybe only using the H channel? The problem I'm seeing here is huge color differences: think cars of different colors, lane marking, parking lot concrete. Needs experimentation.
Tasks:
- Look into the flood fill algorithm
- Experiment to see if it can help refining the training dataset masks
Note: this does not depend on parking lots. The same applies e.g. for buildings, roads, etc.
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 at the rs rasterize mask-generation entry point and review the cv2.floodFill documentation linked in the issue. Experiment with flood filling and alternative color spaces or channels on generated masks, then document whether the approach reliably refines masks for buildings, roads, and other features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- opencv, python
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100

