Skip to content

Installation

From PyPI

Bash
pip install frd-score

From conda-forge

Bash
conda install -c conda-forge frd-score

Note

The conda-forge package includes pyradiomics as a dependency, so no separate install step is needed.

Pyradiomics dependency (pip only)

frd-score depends on pyradiomics for radiomic feature extraction. The PyPI release of pyradiomics is broken for Python ≥ 3.10 (#903), so it must be installed from GitHub:

Bash
pip install git+https://github.com/AIM-Harvard/pyradiomics.git@master

Install pyradiomics first

Run the pyradiomics install command before or after pip install frd-score. If pyradiomics is not installed, importing frd_score will raise a helpful ImportError with the install command.

From source (development)

Bash
git clone https://github.com/RichardObi/frd-score.git
cd frd-score
pip install git+https://github.com/AIM-Harvard/pyradiomics.git@master
pip install -e ".[dev]"

This installs the development extras: pytest, black, isort, flake8, and nibabel.

Requirements

Requirement Version
Python ≥ 3.10
pyradiomics from GitHub master
numpy any
scipy ≥ 1.10.0
Pillow ≥ 10.3.0
SimpleITK ≥ 2.3.1
opencv-contrib-python-headless ≥ 4.8.1.78

Optional

Package Purpose
matplotlib Interpretability visualisations
scikit-learn t-SNE in interpretability analysis
nibabel NIfTI test fixtures (dev only)

Platform notes

Windows

Building pyradiomics from source requires a C compiler and CMake. Install Visual Studio Build Tools with the "Desktop development with C++" workload, then retry:

Bash
pip install git+https://github.com/AIM-Harvard/pyradiomics.git@master

macOS (Apple Silicon)

No special steps needed. The standard install works on both Intel and Apple Silicon Macs.

Verifying the installation

Bash
# Check the version
python -m frd_score --version
Python
import frd_score
print(frd_score.__version__)

from frd_score.frd import get_feature_extractor
extractor = get_feature_extractor(frd_version="v1", image_dim=2)
print("Extractor ready:", type(extractor).__name__)