# L79 · Cellpose-SAM v2 as an alternative candidate generator

The previous DINO-based Cellpose model and MobileSAM were inconsistent on dense microscopy; a different automatic model may supply complementary shapes. [Cellpose’s official repository](https://github.com/MouseLand/cellpose) describes `cpsam_v2` as an updated SAM-based model. Its model repository advertises BSD-3-Clause while its authors state that Cellpose models are trained on CC BY-NC data; record both statements and inspect all applicable terms before any downstream deployment. The publicly accessible weight is 1.23 GB; pin the model revision and verify the published LFS SHA-256 before loading. No account, email or gated access is needed.

Predeclare model settings and test cases before inference. Compare out-of-box Cellpose-SAM v2 with the prior MobileSAM point pipeline on fixed, previously examined public real source regions and synthetic visible crossing/partial controls. Model outputs are pixel-exclusive label images; preserve original RGB/plane sources and every label, and do not imply overlapping full-instance pixels are representable. Rank by mean predicted cell probability as a model-native heuristic, not a calibrated confidence, and report raw/all/budgeted matches, candidate burden and CPU cost. Compare distinct model compute explicitly; no equal-query or speed claim.

Source annotations are structural and incomplete; synthetic overlap is not physical microscopy. Model-training overlap, biological independence, confidence calibration and species identity remain unknown. Retain original predictions and do not suppress other model candidates. If promising, freeze the method before using genuinely distinct sources and real overlapping instances.

Before any predictions, the API rejected the predeclared tile size 384: `cpsam` requires 256. The protocol was corrected to 256 and the attempt restarted; no model output was produced under the invalid setting.

## Result · 2026-12-02

Ran all 19 fixed cases using `cpsam_v2` weights matching the pinned SHA-256; CPU inference took 612 seconds in total. At top 30 and IoU ≥0.5, Cellpose matched **12/16** real structural reference regions versus **11/16** for original MobileSAM; at IoU ≥0.75, the counts were **10/16 versus 11/16**. The raw Cellpose label map contained 75 candidates over these 11 fields. For the eight synthetic scenes (16 visible references), Cellpose matched **12/16 versus 13/16** at 0.5 and **10/16 versus 12/16** at 0.75; 42 Cellpose labels were generated in total. The two front-order crossing conditions scored 3/4 and 2/4 for both methods at 0.5. These are small correlated, previously viewed development cases, not an independent or human-level comparison; the methods use different inference procedures and compute. Regions and candidate counts are not validated complete instance and false-positive counts.

All predictions, native probability maps, flows, reference masks, source hashes and comparison images are in the [report](/results/l79/). Independent rescoring rebuilt all 19 rankings and scores from saved artifacts (`results/l79/verify.log`). Cellpose labels enforce mutual exclusion and cannot encode two full masks sharing pixels. Local model storage is temporary; the fixed source URL and hash in the protocol allow reconstruction. Model and data reuse restrictions require separate review.

The subsequent [R92 candidate-union replay](/results/r92/) is retrospective and uses these same inspected cases. It is a reason to investigate complementarity on distinct sources, not confirmation of a general improvement.
