Update docs on roi separation

This commit is contained in:
mbsantiago 2026-03-29 13:11:49 +01:00
parent 2b235e28bb
commit 591d4f4ae8
2 changed files with 23 additions and 14 deletions

View File

@ -9,10 +9,11 @@ The default mapper is `anchor_bbox`.
```yaml
roi:
name: anchor_bbox
anchor: bottom-left
time_scale: 1000.0
frequency_scale: 0.001163
default:
name: anchor_bbox
anchor: bottom-left
time_scale: 1000.0
frequency_scale: 0.001163
```
## 2) Choose an anchor strategy
@ -32,15 +33,17 @@ comparing experiments.
## 4) (Optional) override ROI mapping for specific classes
You can set class-level `roi` in `classification_targets` when needed.
Add class-specific mappers under `roi.overrides`.
```yaml
classification_targets:
- name: species_x
tags:
- key: class
value: Species X
roi:
roi:
default:
name: anchor_bbox
anchor: bottom-left
time_scale: 1000.0
frequency_scale: 0.001163
overrides:
species_x:
name: anchor_bbox
anchor: center
time_scale: 1000.0

View File

@ -11,7 +11,8 @@ Fields:
- `detection_target`: one `TargetClassConfig` defining detection eligibility.
- `classification_targets`: list of `TargetClassConfig` entries for class
encoding/decoding.
- `roi`: default ROI mapper config.
- `roi`: ROI mapping config with `default` mapper and optional per-class
`overrides`.
## `TargetClassConfig`
@ -23,7 +24,6 @@ Fields:
- `tags`: tag list used for matching (shortcut for `match_if`).
- `match_if`: explicit condition config (`match_if` is accepted as alias).
- `assign_tags`: tags used when decoding this class.
- `roi`: optional class-specific ROI mapper override.
`tags` and `match_if` are mutually exclusive.
@ -42,7 +42,8 @@ Built from `batdetect2.data.conditions`.
## ROI mapper config
`roi` supports built-in mappers including:
`roi.default` and each `roi.overrides.<class_name>` entry support built-in
mappers including:
- `anchor_bbox`
- `peak_energy_bbox`
@ -53,6 +54,11 @@ Key `anchor_bbox` fields:
- `time_scale`
- `frequency_scale`
Top-level ROI mapping shape:
- `default`: fallback mapper used for all classes.
- `overrides`: optional mapping from class name to mapper config.
## Related pages
- Detection target setup: {doc}`../how_to/configure-target-definitions`