Metadata-Version: 2.4
Name: aneurysm-detector
Version: 0.1.0
Summary: 基于 CenterNet3D 的颅内动脉瘤检测推理库 — 输入 DICOM 序列，输出 14 类血管位置概率向量。
Author: 4c-2026 Team
License: MIT
Project-URL: Homepage, https://github.com/4c-2026/aneurysm-detector
Project-URL: Repository, https://github.com/4c-2026/aneurysm-detector
Keywords: medical-imaging,aneurysm,detection,dicom,centernet,deep-learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
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: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.0
Requires-Dist: timm>=1.0
Requires-Dist: albumentations>=2.0
Requires-Dist: numpy>=1.24
Requires-Dist: pydicom>=3.0
Requires-Dist: opencv-python>=4.8
Requires-Dist: polars>=1.0

# aneurysm-detector

基于 CenterNet3D 的颅内动脉瘤检测推理库。输入 DICOM 序列文件夹，输出 14 类血管位置的概率向量。

## 安装

```bash
pip install aneurysm-detector
```

> **注意**: 本包依赖 PyTorch。如果环境中尚未安装，请先前往 [pytorch.org](https://pytorch.org) 按 CUDA 版本安装。

## 快速开始

```python
from aneurysm_detector import run_predict, load_center_net_model, CENTER_NET_CFG

# 可选：修改模型路径（默认为 model/model_best.pth）
CENTER_NET_CFG.model_path = "/path/to/model_best.pth"

# 显式加载模型（首次调用 run_predict 时也会自动加载）
load_center_net_model()

# 推理
probs = run_predict("/path/to/dicom_series/")
print(probs)  # [0.12, 0.34, ...] 共 14 个概率值
```

## 输出标签（14 类）

| 索引 | 标签 |
|------|------|
| 0 | Left Infraclinoid Internal Carotid Artery |
| 1 | Right Infraclinoid Internal Carotid Artery |
| 2 | Left Supraclinoid Internal Carotid Artery |
| 3 | Right Supraclinoid Internal Carotid Artery |
| 4 | Left Middle Cerebral Artery |
| 5 | Right Middle Cerebral Artery |
| 6 | Anterior Communicating Artery |
| 7 | Left Anterior Cerebral Artery |
| 8 | Right Anterior Cerebral Artery |
| 9 | Left Posterior Communicating Artery |
| 10 | Right Posterior Communicating Artery |
| 11 | Basilar Tip |
| 12 | Other Posterior Circulation |
| 13 | Aneurysm Present |

## 许可证

MIT
