Skip to content

Refactor eval#1417

Merged
carsen-stringer merged 2 commits intomainfrom
refactor_eval
Mar 18, 2026
Merged

Refactor eval#1417
carsen-stringer merged 2 commits intomainfrom
refactor_eval

Conversation

@mrariden
Copy link
Copy Markdown
Collaborator

This PR simplifies and reverts the CellposeModel.eval() function from image reshaping in the .eval() function body to reshaping in CellposeModel._run_net() and CellposeModel._compute_masks() which already have logic for this.

The reshaping in .eval() was changed in the transition from CP3 to CP4, where the resample parameter was mistakenly removed.

rescale was removed in CP4 in favor of using the diameter argument to do image resizing. However, rescale is still necessary internally in .eval() to allow _run_net() and _compute_masks() to resize the images correctly.

@carsen-stringer carsen-stringer merged commit 849ca11 into main Mar 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants