Open Tobiaspk opened 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 56.11%. Comparing base (
21789ec
) to head (1feef06
). Report is 9 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Related to issue #937
When Cellpose detect over 65,535 it casts the masks vector to
uint32
. However, this format is not natively supported by OpenCV, causing itsresize
function to crash. See issue #937 for more information.This PR proposes to use float32 instead, which is supported by OpenCV, and includes the following changes
uint32
, first cast tofloat32
, resize usingcv2
, round and cast resulting matrix touint32
.float32
happensThis PR also considers three implications:
uint16
and the proposed approach which casts tofloat32
yield identical results.Reproducible examples