-
Notifications
You must be signed in to change notification settings - Fork 555
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Before you fill out this form:
Did you review the FAQ?
- Yes, I reviewed the FAQ on the [Cellpose ReadTheDocs](https://cellpose.readthedocs.io/en/latest/faq.html)
Did you look through previous (open AND closed) issues posted on GH?
- Yes, I [searched for related previous GH issues](https://github.com/MouseLand/cellpose/issues?q=is%3Aissue).
Describe the bug
When running 3D stitching on a large image stack (1682, 2693, 2482), the combined mask values in metrics_intersection_over_union() exceed uint16 (65535), causing integer overflow. Currently, the stitched mask array is initialized as uint16, which cannot accommodate large label counts.
Expected behavior
It would be helpful if Cellpose could automatically determine an appropriate dtype for stitched masks, promoting to int32 (or larger) when necessary, to prevent overflow. I would be very grateful if you could fix this bug.
Screenshots
Additional context
Automatic dtype promotion would prevent overflow issues in large 3D datasets and simplify downstream analysis.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working