Metadata-Version: 2.4
Name: saber-em
Version: 0.8.0
Summary: Segment Anything Based Electron Recognition
Project-URL: Homepage, https://github.com/czi-ai/saber
Project-URL: Documentation, http://chanzuckerberg.github.io/saber/
Project-URL: Issues, https://github.com/czi-ai/saber/issues
License: MIT License
        
        Copyright (c) 2025 Chan Zuckerberg Initiative - AI
        
        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.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.10
Requires-Dist: click
Requires-Dist: copick
Requires-Dist: copick-utils
Requires-Dist: ipywidgets
Requires-Dist: kornia
Requires-Dist: matplotlib
Requires-Dist: monai
Requires-Dist: mrcfile
Requires-Dist: multiprocess
Requires-Dist: nibabel
Requires-Dist: opencv-python
Requires-Dist: sam2
Requires-Dist: scikit-learn
Requires-Dist: starfile
Requires-Dist: torch-ema
Requires-Dist: torchmetrics
Requires-Dist: tqdm
Requires-Dist: umap-learn
Provides-Extra: gui
Requires-Dist: pyqt5; extra == 'gui'
Requires-Dist: pyqtgraph; extra == 'gui'
Provides-Extra: materials
Requires-Dist: hyperspy; extra == 'materials'
Description-Content-Type: text/markdown

# SABER⚔️

[![License](https://img.shields.io/pypi/l/saber-em.svg?color=green)](https://github.com/chanzuckerberg/saber/blob/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/saber-em.svg?color=green)](https://pypi.org/project/saber-em/)
[![Python Version](https://img.shields.io/pypi/pyversions/saber-em.svg?color=green)](https://www.python.org/)


**S**egment **A**nything **B**ased **E**lectron tomography **R**ecognition is a robust platform designed for autonomous segmentation of organelles from cryo-electron tomography (cryo-ET) or electron microscopy (EM) datasets. 

## Introduction
Leveraging foundational models, SABER enables segmentation directly from video-based training translated into effective 3D tomogram analysis. Users can utilize zero-shot inference with morphological heuristics or enhance prediction accuracy through data-driven training.

## 💫 Key Features
* 🔍 Zero-shot segmentation: Segment EM/cryo-ET data without explicit retraining, using foundational vision models.
* 🖼️ Interactive GUI for labeling: Intuitive graphical interface for manual annotation and segmentation refinement.
* 🧠 Expert-driven classifier training: Fine-tune segmentation results by training custom classifiers on curated annotations.
* 🧊 3D organelle segmentation: Generate volumetric segmentation masks across tomographic slices.

## 🚀 Getting Started

### Installation

Saber is available on PyPI and can be installed using pip:
```bash
pip install saber-em
```

⚠️ **Note**: 

- By default, the GUI is not included in the base installation.
To enable the graphical interface for manual annotation, install with:
```bash
pip install saber-em[gui]
```
- One of the current dependencies is currently not working with pip 25.1. We recommend using pip 25.2 or higher when installing saber:
```bash
pip install --upgrade "pip>=25.2"
```

### Basic Usage
SABER provides a clean, scriptable command-line interface. Run the following command to view all available subcommands:
```
saber --help
```

## 📚 Documentation

For detailed documentation, tutorials, CLI and API reference, visit our [documentation](http://chanzuckerberg.github.io/saber/)


## 🤝 Contributing

This project adheres to the Contributor Covenant [code of conduct](https://github.com/chanzuckerberg/.github/blob/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. 
Please report unacceptable behavior to [opensource@chanzuckerberg.com](mailto:opensource@chanzuckerberg.com).

## 🔒 Security

If you believe you have found a security issue, please responsibly disclose by contacting us at security@chanzuckerberg.com.