| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Micro-SAM Repository Summary | Segment Anything for Microscopy</title> |
| <style> |
| :root { |
| --bg: #0f1117; |
| --card: #1a1d27; |
| --card-border: #2a2d3a; |
| --text: #e2e8f0; |
| --text-muted: #94a3b8; |
| --accent: #6366f1; |
| --accent-hover: #818cf8; |
| --success: #22c55e; |
| --warning: #eab308; |
| --danger: #ef4444; |
| --code-bg: #1e2130; |
| } |
| * { margin: 0; padding: 0; box-sizing: border-box; } |
| body { |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; |
| background: var(--bg); |
| color: var(--text); |
| line-height: 1.6; |
| padding: 2rem 1rem; |
| } |
| .container { max-width: 960px; margin: 0 auto; } |
| |
| |
| .header { text-align: center; margin-bottom: 2rem; padding: 2.5rem; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; } |
| .header h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.5rem; background: linear-gradient(135deg, #6366f1, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } |
| .header p { color: var(--text-muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto; } |
| .badge-row { margin-top: 1.25rem; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; } |
| .badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: 9999px; font-size: 0.8rem; font-weight: 600; } |
| .badge-star { background: #fef3c7; color: #92400e; } |
| .badge-fork { background: #dbeafe; color: #1e40af; } |
| .badge-lic { background: #dcfce7; color: #166534; } |
| .badge-ver { background: var(--card-border); color: var(--text); } |
| .badge-doi { background: #faf5ff; color: #6b21a8; } |
| |
| |
| .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; } |
| |
| |
| .card { background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 1.5rem; } |
| .card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; } |
| |
| |
| .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; } |
| .stat { text-align: center; padding: 1rem 0.5rem; background: var(--bg); border-radius: 8px; } |
| .stat .val { font-size: 1.5rem; font-weight: 800; color: var(--accent-hover); } |
| .stat .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.25rem; } |
| |
| |
| .features { list-style: none; } |
| .features li { padding: 0.6rem 0.75rem; margin-bottom: 0.4rem; background: var(--bg); border-radius: 8px; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.6rem; } |
| .features li::before { content: "βΈ"; color: var(--accent-hover); font-weight: 700; flex-shrink: 0; } |
| |
| |
| .code-block { background: var(--code-bg); border-radius: 8px; padding: 1rem; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.85rem; color: #e2e8f0; overflow-x: auto; white-space: pre; } |
| .code-block .comment { color: #6b7280; } |
| .code-block .cmd { color: #a78bfa; } |
| |
| |
| .section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin: 2rem 0 1rem; font-weight: 600; } |
| |
| |
| table { width: 100%; border-collapse: collapse; } |
| th, td { padding: 0.6rem 0.75rem; text-align: left; font-size: 0.9rem; } |
| th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 1px solid var(--card-border); } |
| td { border-bottom: 1px solid var(--card-border); } |
| tr:last-child td { border-bottom: none; } |
| a { color: var(--accent-hover); text-decoration: none; } |
| a:hover { text-decoration: underline; } |
| |
| |
| .verdict { margin-top: 1.5rem; padding: 1.5rem; background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(167,139,250,0.1)); border: 1px solid var(--accent); border-radius: 12px; } |
| .verdict h2 { margin-bottom: 0.75rem; } |
| .verdict p { color: var(--text-muted); margin-bottom: 0.5rem; } |
| .verdict .yes { color: var(--success); font-weight: 700; } |
| .verdict .part { color: var(--warning); font-weight: 700; } |
| .verdict .no { color: var(--danger); font-weight: 700; } |
| |
| |
| .feasibility { display: flex; flex-direction: column; gap: 0.4rem; } |
| .feas-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0.75rem; background: var(--bg); border-radius: 6px; font-size: 0.9rem; } |
| .feas-label { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 9999px; font-weight: 700; min-width: 80px; text-align: center; } |
| .feas-label.easy { background: #dcfce7; color: #166534; } |
| .feas-label.med { background: #fef9c3; color: #854d0e; } |
| .feas-label.hard { background: #fee2e2; color: #991b1b; } |
| .feas-label.nope { background: #e2e8f0; color: #475569; } |
| |
| |
| .footer { text-align: center; margin-top: 2rem; padding: 1.5rem; color: var(--text-muted); font-size: 0.85rem; } |
| .footer a { color: var(--accent-hover); } |
| |
| @media (max-width: 640px) { |
| .header h1 { font-size: 1.6rem; } |
| .stats { grid-template-columns: repeat(2, 1fr); } |
| .card { padding: 1rem; } |
| .feasible { font-size: 0.8rem; } |
| } |
| </style> |
| </head> |
| <body> |
| <div class="container"> |
|
|
| |
| <div class="header"> |
| <h1>Micro-SAM: GitHub Repository Inspection</h1> |
| <p>An analysis of <a href="https://github.com/computational-cell-analytics/micro-sam" target="_blank">computational-cell-analytics/micro-sam</a> β assessing what it does, and what individuals or teams can realistically implement from it.</p> |
| <div class="badge-row"> |
| <span class="badge badge-ver">v1.8.4</span> |
| <span class="badge badge-star">β
697 stars</span> |
| <span class="badge badge-fork">β 105 forks</span> |
| <span class="badge badge-lic">MIT License</span> |
| <span class="badge badge-doi"><a href="https://doi.org/10.5281/zenodo.7919746" target="_blank">DOI</a></span> |
| </div> |
| </div> |
|
|
| |
| <div class="grid"> |
| <div class="card"> |
| <h2>π Quick Stats</h2> |
| <div class="stats"> |
| <div class="stat"><div class="val">697</div><div class="label">Stars</div></div> |
| <div class="stat"><div class="val">105</div><div class="label">Forks</div></div> |
| <div class="stat"><div class="val">36</div><div class="label">Sibling Repos</div></div> |
| <div class="stat"><div class="val">4</div><div class="label">Authors</div></div> |
| </div> |
| </div> |
|
|
| <div class="card"> |
| <h2>π’ About the Project</h2> |
| <p style="color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem;"> |
| <strong>Authors:</strong> Anwai Archit, Paul Hilt, Genevieve Buckley, Constantin Pape |
| </p> |
| <p style="color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem;"> |
| <strong>Published in:</strong> <em>Nature Methods</em> (2024) |
| </p> |
| <p style="color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem;"> |
| <strong>Organization:</strong> <a href="https://github.com/computational-cell-analytics" target="_blank">Computational Cell Analytics Lab @ Uni GΓΆttingen</a> |
| </p> |
| <p style="color: var(--text-muted); font-size: 0.9rem;"> |
| <strong>License:</strong> MIT β you can fork, modify, or build on top |
| </p> |
| </div> |
| </div> |
|
|
| |
| <div class="section-title">What It Does</div> |
| <div class="card"> |
| <h2>π¬ Segment Anything for Microscopy</h2> |
| <p style="color: var(--text-muted); margin-bottom: 1rem;"> |
| <code>micro-sam</code> is a Python package and <strong>napari GUI plugin</strong> that adapts Meta's <a href="https://github.com/facebookresearch/segment-anything" target="_blank">Segment Anything Model (SAM)</a> to microscopy images. Instead of segmenting natural photos, it segments cells, mitochondria, synapses, and other biological structures β with just a few clicks. |
| </p> |
| <ul class="features"> |
| <li><strong>2D Interactive Segmentation</strong> β click on cells / mitochondria and SAM produces a mask</li> |
| <li><strong>3D Interactive Segmentation</strong> β slice-by-slice segmentation across volumes (e.g. EM data)</li> |
| <li><strong>Tracking</strong> β segment cells across time-lapse movie frames and link them into tracks (via <code>trackastra</code>)</li> |
| <li><strong>Finetuning</strong> β scripts to adapt SAM to your own microscopy domain</li> |
| <li><strong>Automatic segmentation</strong> β generate masks with a grid of points without manual clicks</li> |
| <li><strong>Pretrained checkpoints</strong> β "generalist" and domain-specific finetuned SAM models</li> |
| </ul> |
| </div> |
|
|
| |
| <div class="section-title">Installation</div> |
| <div class="card"> |
| <h2>π¦ How to Install</h2> |
| <div class="code-block"><span class="comment"># Via pip</span> |
| <span class="cmd">pip install micro_sam</span> |
|
|
| <span class="comment"># Via conda (recommended for napari)</span> |
| <span class="cmd">conda install -c conda-forge micro_sam</span> |
|
|
| <span class="comment"># Then launch the napari GUI</span> |
| <span class="cmd">micro_sam.annotator_2d</span></div> |
| <p style="color: var(--text-muted); font-size: 0.85rem; margin-top: 0.75rem;"> |
| Requires Python β₯ 3.10, PyTorch β₯ 2.5, and a CUDA-capable GPU for best performance. |
| </p> |
| </div> |
|
|
| |
| <div class="section-title">What You Can Implement</div> |
| <div class="card"> |
| <h2>π οΈ Feasibility Breakdown</h2> |
| <p style="color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem;"> |
| The full repo is a multi-year, multi-author research product. But many individual pieces are very doable. Here's a realistic breakdown: |
| </p> |
| <div class="feasibility"> |
| <div class="feas-item"> |
| <span class="feas-label easy">Easy</span> |
| <span>SAM inference pipeline β call SAM with image encoder + prompt encoder + mask decoder (~200 lines)</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label easy">Easy</span> |
| <span>Finetuning SAM on your own microscopy data (well-documented in sibling <code>peft-sam</code> repo)</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label easy">Easy</span> |
| <span>2D interactive segmentation logic β run SAM per click, keep mask state, accept/reject</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label easy">Easy</span> |
| <span>Automatic segmentation with a grid of points/boxes (built into SAM)</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label med">Medium</span> |
| <span>3D interactive segmentation β slice-by-slice + 3D aggregation logic</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label med">Medium</span> |
| <span>Tracking pipeline β SAM segmentation over frames + trackastra pairing</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label med">Medium</span> |
| <span>Embedding precomputation / caching for performance</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label hard">Hard</span> |
| <span>Full napari plugin β PyQt/Qt widget project with image layers, 3D/4D tooling, HDF5/Zarr I/O</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label hard">Hard</span> |
| <span>Model zoo + compatibility layer across SAM backbone variants (vit-huge, vit-base, vit-tiny)</span> |
| </div> |
| <div class="feas-item"> |
| <span class="feas-label nope">No</span> |
| <span>Reproducing their specific finetuned checkpoint weights (requires their exact training data + GPU time)</span> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="section-title">Dependencies & Sibling Repos</div> |
| <div class="grid"> |
| <div class="card"> |
| <h2>π Core Stack</h2> |
| <table> |
| <tr><th>Package</th><th>Purpose</th></tr> |
| <tr><td><code>segment-anything</code></td><td>SAM model (Meta)</td></tr> |
| <tr><td><code>torch</code> / <code>torchvision</code></td><td>Deep learning framework</td></tr> |
| <tr><td><code>napari</code></td><td>Interactive image viewer GUI</td></tr> |
| <tr><td><code>torch-em</code></td><td>Electron microscopy utilities</td></tr> |
| <tr><td><code>trackastra</code></td><td>Cell tracking</td></tr> |
| <tr><td><code>scikit-image</code></td><td>Image processing</td></tr> |
| <tr><td><code>zarr</code> / <code>h5py</code></td><td>Large image I/O</td></tr> |
| </table> |
| </div> |
| <div class="card"> |
| <h2>π Sibling Repos (Same Org)</h2> |
| <table> |
| <tr><th>Repo</th><th>Stars</th><th>Purpose</th></tr> |
| <tr><td><a href="https://github.com/computational-cell-analytics/patho-sam" target="_blank">patho-sam</a></td><td>67 β
</td><td>SAM for histopathology</td></tr> |
| <tr><td><a href="https://github.com/computational-cell-analytics/peft-sam" target="_blank">peft-sam</a></td><td>35 β
</td><td>LoRA/finetuning recipes for SAM</td></tr> |
| <tr><td><a href="https://github.com/computational-cell-analytics/medico-sam" target="_blank">medico-sam</a></td><td>31 β
</td><td>SAM for medical imaging</td></tr> |
| <tr><td><a href="https://github.com/computational-cell-analytics/synapse-net" target="_blank">synapse-net</a></td><td>12 β
</td><td>Synaptic structure reconstruction</td></tr> |
| <tr><td><a href="https://github.com/computational-cell-analytics/dl-for-micro" target="_blank">dl-for-micro</a></td><td>24 β
</td><td>Deep learning for microscopy course</td></tr> |
| </table> |
| </div> |
| </div> |
|
|
| |
| <div class="verdict"> |
| <h2>βοΈ Verdict: Can You Implement This?</h2> |
| <p>Implement the whole repo? β <span class="no">NO</span> β it's a multi-year, multi-author research product (697 stars, 105 forks, 36 sibling repos).</p> |
| <p>Implement an interactive SAM segmentation tool for your own microscopy images? β <span class="yes">YES</span> β very doable, possibly a weekend-to-weeks project depending on GUI polish.</p> |
| <p>Implement finetuning + automatic segmentation for a specific domain? β <span class="yes">YES</span> β straightforward and well-documented in their sibling repos.</p> |
| <p style="margin-top: 1rem; font-size: 0.9rem; color: var(--text-muted);"> |
| π‘ <strong>Better path:</strong> Since it's MIT-licensed, consider using or extending <code>micro-sam</code> itself rather than reimplementing. The core value is in the finetuned checkpoints and domain-specific training recipes β not the GUI scaffolding. |
| </p> |
| </div> |
|
|
| |
| <div class="section-title">Citation</div> |
| <div class="card"> |
| <h2>π How to Cite</h2> |
| <p style="color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem;"> |
| If you use this repo in research, cite: |
| </p> |
| <ul class="features"> |
| <li>The <a href="https://www.nature.com/articles/s41592-024-02580-4" target="_blank">Nature Methods paper</a> (2024)</li> |
| <li>The original <a href="https://arxiv.org/abs/2304.02643" target="_blank">Segment Anything publication</a> (Kirillov et al., 2023)</li> |
| <li>If using <code>vit-tiny</code> models: <a href="https://arxiv.org/abs/2306.14289" target="_blank">Mobile SAM</a></li> |
| <li>If using automatic tracking: <a href="https://arxiv.org/abs/2405.15700" target="_blank">Trackastra</a></li> |
| </ul> |
| </div> |
|
|
| |
| <div class="footer"> |
| <p>Generated by <strong>ML Intern</strong> Β· Inspecting <a href="https://github.com/computational-cell-analytics/micro-sam" target="_blank">computational-cell-analytics/micro-sam</a></p> |
| <p style="margin-top: 0.25rem;">Published to <a href="https://huggingface.co/spaces/tahamidhossain/micro-sam-github-summary" target="_blank">tahamidhossain/micro-sam-github-summary</a></p> |
| </div> |
|
|
| </div> |
| </body> |
| </html> |