8000 fixes remap labels from raising an error to just not using them by moerlemans · Pull Request #28 · NKI-AI/ahcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

fixes remap labels from raising an error to just not using them #28

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ahcore/callbacks.py
43BE
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,13 @@ def _get_annotation_data(
if not self._data_description:
raise ValueError("No data description is provided.")

if not self._data_description.remap_labels:
raise ValueError("Remap labels are not provided.")

if not self._data_description.index_map:
raise ValueError("Index map is not provided.")

_annotations = self._annotations.read_region(coordinates, self._scaling, self._region_size)
_annotations = rename_labels(_annotations, remap_labels=self._data_description.remap_labels)

if self._data_description.remap_labels:
_annotations = rename_labels(_annotations, remap_labels=self._data_description.remap_labels)

points, boxes, region, roi = convert_annotations(
_annotations,
Expand Down
0