-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
While running tutorial_image_segmentation.ipynb
(https://github.com/JdeRobot/DetectionMetrics/blob/master/examples/tutorial_image_segmentation.ipynb),
I encountered an IndexError: index out of range during model.eval().
After debugging, it appears that:
lut_ontologyis built using model ontology indices (contiguous)- During
model.eval, it is accessed aslut_ontology[label] - However,
labelcomes from the dataset ontology, which contains non-contiguous and larger class indices
This mismatch causes out-of-bounds indexing when dataset labels exceed the LUT size.
Observed Error
IndexError: index 33 is out of bounds for dimension 0 with size 20
Root Cause
The LUT assumes aligned or contiguous class indices, but dataset ontology indices differ from model ontology indices.
Additional Observation
This issue is only observed when running the notebook on Google Colab.
When running the same notebook in a local environment, it completes without any errors.

Metadata
Metadata
Assignees
Labels
No labels