Skip to main content

HERMES: patient-specific 3D FDTD DRH simulation (MRI voxels, SAR, thermal, antenna optimization)

Project description

hermes-drh

HERMES (Hyperthermia Electromagnetic and Robust Modeling Evaluation Suite) is a Python framework for patient-specific deep regional hyperthermia (DRH) research: MRI-derived voxel models, 3D FDTD electromagnetic simulation, SAR and simplified thermal post-processing, optional four-quadrant antenna optimization, and visualization.

All CLI paths below assume your current working directory is CODE/, so relative paths like dataset/validation_data/001 resolve to CODE/dataset/validation_data/001.

Development environment (CODE/.venv)

Create an isolated venv inside CODE/ (keeps thesis dataset/ and best_model.pth reachable via relative paths):

cd path/to/thesis/CODE

# One-shot bootstrap (editable install, default extras: all)
bash scripts/bootstrap_venv.sh

source .venv/bin/activate
hermes-simulate --help

Manual equivalent:

cd path/to/thesis/CODE
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip wheel
pip install -e ".[all]"    # or [dev], [segmentation], [segmentation,dashboard]

Checkpoint and validation data (from CODE/):

export HERMES_CHECKPOINT="$PWD/best_model.pth"

hermes-simulate --modalities-dir dataset/validation_data/001 \
  --max-dim 80 --time-steps 200 --skip-animations \
  --results-dir results/smoke_001

If BraTS folders live next to CODE/ (thesis root) instead of under CODE/dataset/:

hermes-simulate --modalities-dir ../dataset/validation_data/001 \
  --max-dim 80 --time-steps 200 --skip-animations \
  --results-dir results/smoke_001

TestPyPI smoke test (clean install in CODE/.venv)

Verifies the published wheel while still using local dataset/ (run every command from CODE/):

cd path/to/thesis/CODE
rm -rf .venv && python3 -m venv .venv && source .venv/bin/activate
pip install -U pip

pip install -i https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  "hermes-drh[segmentation]==0.1.0"

export HERMES_CHECKPOINT="$PWD/best_model.pth"

hermes-simulate --modalities-dir dataset/validation_data/001 \
  --max-dim 80 --time-steps 200 --skip-animations \
  --results-dir results/testpypi_smoke

Production PyPI (after release):

pip install "hermes-drh[segmentation]==0.1.0"

Install extras

Command Use case
pip install -e . FDTD from existing segmentation NIfTI only
pip install -e ".[segmentation]" --modalities-dir / --modalities (PyTorch + MONAI)
pip install -e ".[dashboard]" Streamlit dashboard
pip install -e ".[all]" Segmentation + dashboard
pip install -e ".[dev]" Contributors (pytest, build, twine, ruff)

Requires Python 3.11–3.13. For MP4 animations, install ffmpeg on your system.

Quickstart (from CODE/)

source .venv/bin/activate   # after bootstrap above

# Existing segmentation NIfTI (no PyTorch)
hermes-simulate --seg path/to/labels.nii.gz --results-dir results/from_seg

# BraTS-style folder under CODE/dataset/
export HERMES_CHECKPOINT="$PWD/best_model.pth"
hermes-simulate --modalities-dir dataset/validation_data/001 --results-dir results/from_modalities

# Bundled example YAML
hermes-simulate --config configs/simulation_example.yaml \
  --modalities-dir dataset/validation_data/001 \
  --results-dir results/example_yaml

# MP4s from streamed frames
hermes-build-animations results/from_modalities --subsample 5 --skip-3d

Dashboard

source .venv/bin/activate
pip install -e ".[dashboard]"   # or ".[all]"
hermes-dashboard

Run from CODE/ so the dashboard finds results/ and can launch hermes-simulate.

Thesis paper bundle (not on PyPI)

From CODE/ (uses local hermes-simulate when the venv is active):

python run_paper_bundle.py --modalities-dir dataset/validation_data/001 --bundle-root results

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_drh-0.1.0.tar.gz (125.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_drh-0.1.0-py3-none-any.whl (127.8 kB view details)

Uploaded Python 3

File details

Details for the file hermes_drh-0.1.0.tar.gz.

File metadata

  • Download URL: hermes_drh-0.1.0.tar.gz
  • Upload date:
  • Size: 125.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermes_drh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db5e3b5eef3499b233f0e2290ac0e40d0adf174aeb7a365c801ea07a553a0b2c
MD5 f46dec8cf0ca2fdfb26daf178d4821df
BLAKE2b-256 4b98e350a36903f1aa407018ce8f11f8ca01eff54af5465b9a033f52192880a3

See more details on using hashes here.

File details

Details for the file hermes_drh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hermes_drh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 127.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermes_drh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8b26cfd4baee872aedc313bd349b7fd4232c5f9efd4f10aa7d4cedfe9ab5cd9
MD5 d2420970ecbb4f35f77e265faf999d6f
BLAKE2b-256 33b6f9cc849a7aa3dcd8d5317b3a97ec591d86cfcfaa6105d3301a66b612b635

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page