Segment Anything can feel like a free preprocessing upgrade. This page summarizes a matched fruit-classification check:
does center-prompt SAM masking help when the training budget and split protocol stay fixed?
The question
For folder-labeled fruit images, does replacing each input with a SAM-masked crop
improve classification under the same model family, seed, and data budget —
or can aggressive foreground masking throw away cues the classifier was using?
Method sketch
Start from a leakage-aware fruit protocol: duplicate audit, within-class near-duplicate grouping proxy, deterministic group-aware train / validation / test split.
Compare modern transfer-learning baselines under a shared budget (ResNet-18 vs ConvNeXt-Tiny) so the architecture story is separate from the SAM story.
Run a bounded, matched raw-vs-SAM ablation on the same ResNet setup: fixed center-point prompt, SAM-internal mask ranking only, no class labels used to pick masks.
Do not score segmentation quality. Without independent human pixel masks, the notebook records segmentation as blocked — no IoU or Dice.
Qualitative finding
SAM is not automatically a free lunch
In this exact center-prompt preprocessing policy, masking the fruit region before training
did not deliver a free accuracy win for the matched ResNet ablation. The notebook reports a
negative result for that specific masking recipe — not a verdict that SAM is
generally harmful, and not a claim about other prompts, datasets, or tasks.
Background context, framing, and imperfect masks can matter as much as “clean” foreground.
Read the full run tables and bootstrap interval on Kaggle rather than treating this page as a scoreboard.
What this page is not claiming
No universal “SAM helps” or “SAM hurts” rule for all vision pipelines.
No specimen-identity guarantee: dHash grouping is a leakage proxy, not verified physical-fruit identity.
No clinical, agricultural-deployment, or product-efficacy claim.
No invented metrics on this static page — executed numbers stay with the notebook.
Read the experiment
Full protocol, limitations, and executed outputs live in the Kaggle notebook that this Space summarizes.