Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fixes remap labels from raising an error to just not using them
Browse files Browse the repository at this point in the history
  • Loading branch information
moerlemans committed Nov 24, 2023
1 parent 58a200c commit 356f4a2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ahcore/callbacks.py
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 comments on commit 356f4a2

Please sign in to comment.