mapbox / mapbox/robosat

Implement test-time augmentations for `rs predict`

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.1k
Forks
385
PR merge metrics
No merged PRs in 30d

Description

We should implement optional support for test-time augmentation in rs predict.

Here is how it works: when predicting for a tile we will not only predict on the tile as is but in addition predict e.g. on the rotated and flipped versions of it. Then we would un-do the rotation or flipping on the masks, and merge these multiple predictions into one output.

Users can already do this by duplicating the slippy map directory with tiles to predict on, rotating or flipping them per slippy map directory. Then users need to run rs predict on all slippy map directories. And finally undo the transformations on the probability masks before using rs masks's support for model ensembles to get masks.

In contrast implementing test-time augmentation in rs predict needs to transform each tile on the fly (with our transformations) and then undo the transformations on the fly, too.

Tasks

  • Implement optional switch in rs predict for test-time augmentations
  • Predict on tile and transformed tile in rs predict
  • Undo transformations and merge predictions

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 by tracing the existing rs predict entry point and its tile transformation path. The finished work should provide an optional test-time augmentation switch, predict on the original and transformed tiles, undo each transformation on the probability masks, and merge the results into one output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.