Metadata-Version: 2.4
Name: brainmint
Version: 0.1.0
Summary: Brain MRI synthesis, compression, modality translation, and evaluation toolkit.
Author: Muhammad Nabi Yasinzai
License-Expression: MIT
Project-URL: Homepage, https://github.com/yasinzaii/brainmint
Project-URL: Repository, https://github.com/yasinzaii/brainmint
Project-URL: Issues, https://github.com/yasinzaii/brainmint/issues
Keywords: MRI,brain MRI,neuroimaging,medical imaging,diffusion models,synthetic data,modality translation,deep learning
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: einops>=0.7
Requires-Dist: numpy>=1.24
Requires-Dist: omegaconf>=2.3
Requires-Dist: torch>=2.1
Requires-Dist: monai>=1.3
Requires-Dist: nibabel>=5.2
Requires-Dist: hydra-core>=1.3
Provides-Extra: external
Requires-Dist: huggingface-hub>=0.20; extra == "external"
Provides-Extra: io
Requires-Dist: pillow>=10; extra == "io"
Provides-Extra: medical
Requires-Dist: scipy>=1.11; extra == "medical"
Provides-Extra: metrics
Requires-Dist: medmetric[monai]>=0.1.1; extra == "metrics"
Requires-Dist: tqdm>=4.66; extra == "metrics"
Provides-Extra: train
Requires-Dist: pytorch-lightning>=2.2; extra == "train"
Requires-Dist: tabulate>=0.9; extra == "train"
Requires-Dist: tensorboard>=2.15; extra == "train"
Requires-Dist: torchmetrics>=1.3; extra == "train"
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-cov>=5; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Provides-Extra: all
Requires-Dist: huggingface-hub>=0.20; extra == "all"
Requires-Dist: medmetric[monai]>=0.1.1; extra == "all"
Requires-Dist: pillow>=10; extra == "all"
Requires-Dist: pytorch-lightning>=2.2; extra == "all"
Requires-Dist: scipy>=1.11; extra == "all"
Requires-Dist: tabulate>=0.9; extra == "all"
Requires-Dist: tensorboard>=2.15; extra == "all"
Requires-Dist: torchmetrics>=1.3; extra == "all"
Requires-Dist: tqdm>=4.66; extra == "all"
Dynamic: license-file

# BrainMint

BrainMint is a Python package for brain MRI synthesis, compression, modality translation, inference utilities, and evaluation support.

This repository is the reusable package extracted from the original GenMRI study repository. It should contain library code, package-safe tests, and package documentation only. Study configs, private paths, datasets, checkpoints, generated outputs, and cloned external repositories should stay outside this repository.

## Install

Install the base package with pip:

```bash
pip install brainmint
```

Common optional installs:

| Use case | Install command |
| --- | --- |
| Metrics and evaluation | `pip install "brainmint[metrics]"` |
| Training utilities | `pip install "brainmint[train]"` |
| Full runtime stack | `pip install "brainmint[all]"` |

Smaller targeted extras are kept in `pyproject.toml` for dependency control, but the commands above are the ones most users should need.

## External Repositories

External model repositories are materialized outside the package tree. For research runs, set:

```bash
export BRAINMINT_EXTERNAL_ROOT=/path/to/external
```

or configure it in Python:

```python
import brainmint.external

brainmint.external.set_external_repo_root("/path/to/external")
```

## Tests

Default tests are package-safe and do not require study Hydra configs, GPU, checkpoints, network access, or cloned external repositories:

```bash
python -m pytest
```

Copied study-era tests are opt-in while BrainMint is being separated from the original study repository:

```bash
python -m pytest --run-study-config-tests
```

## License

MIT. See `LICENSE`.
