Metadata-Version: 2.4
Name: neuro-sam
Version: 0.1.17
Summary: Neuro-SAM: Foundation Model for Dendrite and Dendritic Spine Segmentation
Author-email: Nipun Arora <nipunarora8@yahoo.com>, Munna Singh <singhmunna.singh@fau.de>
License: MIT License
        
        Copyright (c) 2024 Nipun Arora
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/nipunarora8/Neuro-SAM
Project-URL: Bug Tracker, https://github.com/nipunarora8/Neuro-SAM/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: napari
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: napari
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: imageio
Requires-Dist: torch>=2.0.0
Requires-Dist: torchvision>=0.15.0
Requires-Dist: hydra-core>=1.3.2
Requires-Dist: iopath>=0.1.10
Requires-Dist: pillow>=9.4.0
Requires-Dist: tqdm>=4.66.1
Requires-Dist: vispy
Requires-Dist: qtpy
Requires-Dist: superqt
Requires-Dist: magicgui
Requires-Dist: scikit-image
Requires-Dist: tifffile
Requires-Dist: numba
Requires-Dist: PyQt5
Requires-Dist: opencv-python-headless
Requires-Dist: matplotlib
Requires-Dist: requests
Requires-Dist: flammkuchen
Requires-Dist: albumentations
Requires-Dist: wandb
Requires-Dist: tensorflow
Requires-Dist: imagecodecs
Dynamic: license-file

<div align="center">

# Neuro-SAM 
#### Foundation Model from Dendrite and Dendritic Spine Segmentation

</div>

Neuro-SAM enables you to:
- Trace individual dendrite in a 3D stack
- Segment traced dendrites using fine-tuned SAMv2
- Tubular View Analysis of the dendrites 
- Segment Dendritic Spines using our custom model

Neuro-SAM works across different imaging modalities including two-photon, confocal and STED microscopy.

### 🚀 Installation

Neuro-SAM requires **Python 3.10+** installed on your machine. It is recommended to use Conda/Miniconda for environment management. You can also use CUDA for GPU based accelerations. Our model are also optimised to use MPS on Apple Silicon (M series chips). 

To install Neuro-SAM: 

```bash
pip install neuro-sam
```

Downloading models and sample dataset

```bash
neuro-sam-download
```

### 📊 Usage

```bash
# base usage with benchmark dataset
neuro-sam

# using with your own dataset
neuro-sam --image-path /path/to/your/image.tif
```

### 🔬 Workflow

#### 1. **Configure Voxel Spacing**
Set accurate X, Y, Z voxel spacing in the "Path Tracing" tab for proper scaling:

#### 2. **Trace Dendritic Paths**
- Click waypoints along dendrite structures
- Algorithm automatically finds optimal brightest paths

#### 3. **Segment Dendrites**
- Load pre-trained SAMv2 dendrite model
- Segment individual path with SAMv2

#### 4. **Segment Spines**
- Segment Dendritic Spines with our fine tuned model

### 📬  Contact

- Nipun Arora - nipunarora8@yahoo.com
- Munna Singh - singhmunna0786@gmail.com


<div align="center">
<b style="color: black;">Made with ♥️ at <a href='https://anki.xyz' style="text-decoration: none; color: black;">Anki Lab</a> 🧠✨</b>
</div>
