cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

fix: remove black stripe artefacts when axis != -1 in

Open spkgyk opened this issue 6 months ago • 4 comments

The clean-up loop that sets un-normalised channels to 0 expected the channel dimension to be last. However, since np.moveaxis(..., -1, axis) was done prior to this, instead of setting the channel to zero, it would set a row/column (depending on the axis) to zero instead, resulting in a black bar across the image.

spkgyk avatar Jul 15 '25 14:07 spkgyk

Looks good. What were the settings/image dimensions that produced the error?

mrariden avatar Jul 21 '25 19:07 mrariden

It happens when you pass in paths to the evaluation method. It loads the images, makes them channels first, and requests the normalisation function with axis=0. It happens whenever axis!=-1 I think.

spkgyk avatar Jul 21 '25 20:07 spkgyk

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 48.89%. Comparing base (8483650) to head (9649909). Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1270      +/-   ##
==========================================
- Coverage   48.96%   48.89%   -0.07%     
==========================================
  Files          16       16              
  Lines        3762     3767       +5     
==========================================
  Hits         1842     1842              
- Misses       1920     1925       +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jul 21 '25 20:07 codecov[bot]

Will this be merged? Not trying to rush, just curious about the release schedule

spkgyk avatar Dec 07 '25 23:12 spkgyk