# Third-Party Notices

MedSeg incorporates components from the open-source community and other
third-party providers. This document acknowledges those components and
their licenses.

This release of MedSeg is published for research and non-commercial use
only (see `LICENSE`). The third-party components listed below are
compatible with that intended use. Some carry their own non-commercial
restrictions, no-derivatives clauses, or license-file requirements
(notably FreeSurfer); your use of MedSeg is also subject to those terms.

---

## 1. Frontend — JavaScript libraries

### VTK.js
- License: Apache 2.0
- Source: https://github.com/Kitware/vtk-js
- Used for: volumetric and 3D mesh rendering in the editor

### Three.js (and addons: OrbitControls, GLTFLoader, WebXR controller / hand factories, SkeletonUtils, BufferGeometryUtils)
- License: MIT
- Source: https://github.com/mrdoob/three.js
- Used for: VR mesh rendering, WebXR controller / hand input, and the editor's 3D-view corner orientation marker

### three-mesh-ui
- License: MIT
- Source: https://github.com/felixmariotto/three-mesh-ui
- Used for: in-VR text and panels

### three-mesh-bvh
- License: MIT
- Source: https://github.com/gkjohnson/three-mesh-bvh
- Used for: accelerated raycasting against meshes in VR

### motion-controllers
- License: MIT
- Source: https://github.com/immersive-web/webxr-input-profiles
- Used for: WebXR controller profile mapping

### ITK.js (InsightToolkit.js)
- License: Apache 2.0
- Source: https://github.com/InsightSoftwareConsortium/itk-js
- Used for: medical image format reading in the browser

### TensorFlow.js (with WebGPU backend)
- License: Apache 2.0
- Source: https://github.com/tensorflow/tfjs
- Used for: in-browser model inference

### moment.js
- License: MIT
- Source: https://github.com/moment/moment

### fflate
- License: MIT
- Source: https://github.com/101arrowz/fflate

### nifti-reader-js
- License: MIT
- Source: https://github.com/rii-mango/NIFTI-Reader-JS

### Chart.js
- License: MIT
- Source: https://github.com/chartjs/Chart.js

---

## 2. 3D assets

### Editor 3D-view orientation marker — character GLBs
The editor's corner orientation marker can be swapped between several
low-poly character figures via a small picker. Sourced from
https://poly.pizza/ . Most assets are CC0 (no attribution required);
one is CC BY 3.0 — attribution is provided below in either case.

- `markers/human.glb` — "Man" by Quaternius — CC0 — https://poly.pizza/m/HMnuH5geEG
- `markers/skeleton.glb` — "lkn" (skeleton) by VR art studio — **CC BY 3.0** — https://poly.pizza/m/dGkc5Kjh7EK
- `markers/astronaut.glb` — "Astronaut" by Poly by Google — **CC BY 3.0** — https://poly.pizza/m/dLHpzNdygsg
- `markers/robot.glb` — "Robot" by Poly by Google — **CC BY 3.0** — https://poly.pizza/m/9A6cuitiB_4
- `markers/mech.glb` — "Mech" by Quaternius — CC0 — https://poly.pizza/m/D5wW2jDO42
- `markers/knight.glb` — "Agile knight" by Spiros Koutsourelis — **CC BY 3.0** — https://poly.pizza/m/7aYuk5Rdlr-
- `markers/wizard.glb` — "Wizardus Maximus" by madtrollstudio — **CC BY 3.0** — https://poly.pizza/m/6oDxK0wqyL
- `markers/dinosaur.glb` — "Velociraptor" by Quaternius — CC0 — https://poly.pizza/m/cnlGH2UcDd

### Roboto (font, MSDF-baked atlas used in VR)
- License: Apache 2.0
- Source: https://fonts.google.com/specimen/Roboto

---

## 3. Bundled inference models

### FastSurfer
- License: Apache 2.0
- Source: https://github.com/Deep-MI/FastSurfer
- Note: FastSurfer wraps FreeSurfer. The FreeSurfer license terms apply to that component independently (see Section 4).

### nnU-Net (v2)
- License: Apache 2.0
- Source: https://github.com/MIC-DKFZ/nnUNet

### nnInteractive
- License: Apache 2.0 (code) + CC BY-NC-SA 4.0 (model checkpoint, non-commercial)
- Source: https://github.com/MIC-DKFZ/nnInteractive

### TotalSegmentator
- License: Apache 2.0 (core software and the tasks bundled by MedSeg)
- Source: https://github.com/wasserth/TotalSegmentator
- Tasks bundled by MedSeg are listed in `versions/v0.1.0/docker_images/totalseg/download_weights.py`. The commercially-restricted specialty tasks (`heartchambers_highres`, `appendicular_bones`, `appendicular_bones_mr`, `tissue_types`, `tissue_types_mr`, `tissue_4_types`, `brain_structures`, `vertebrae_body`, `face`, `face_mr`, `thigh_shoulder_muscles` and variants, `coronary_arteries`) are intentionally excluded.
- The bundled `brain_aneurysm` task is licensed under CC BY-NC 4.0 (non-commercial only). It is included in this research-only release.

### MRSegmentator
- License: Apache 2.0
- Source: https://github.com/hhaentze/MRSegmentator

### TissUNet
- License: CC BY-NC-ND 4.0 (non-commercial, no derivatives)
- Source: https://github.com/AIM-KannLab/TissUNet

### BodySegAI
- License: see `versions/v0.1.0/docker_images/bodysegai/LICENCE.pdf` (a per-asset license PDF distributed alongside the model). The viewer-side modal exposes the same PDF via `/api/model_license/bodysegai`.
- Source: https://onlinelibrary.wiley.com/doi/10.1002/crt2.53 (Alavi et al., JCSM Clinical Reports, 2022)
- Note: The model weights ship as `model.onnx` inside the bundled image; the Dockerfile wraps them in a thin runner. Consult the bundled LICENCE.pdf before any deployment beyond non-commercial research.

### Viola-Unet (VIOLA-AI 3.1)
- License: MIT — the shipped container's `/workspace/LICENSE` is MIT (Copyright © 2025 Q.Liu) and governs the artifact MedSeg distributes.
- Source: https://github.com/samleoqh/Viola-Unet (upstream model, INSTANCE 2022 winning solution by Qiu, Pedersen et al.)
- Note: The upstream Viola-Unet README phrases the project as "available to academic users for non-commercial research and development." Q.Liu's containerized release (which is what MedSeg bundles) is MIT-licensed — verify your intended use against both the upstream authors' research-use intent and the MIT terms.

### nnUNet-FCD (Kersting et al., 2025)
- License: Apache 2.0 (code, follows upstream nnU-Net) + Zenodo-hosted weights (`10.5281/zenodo.12607083`) under their Zenodo terms.
- Source: https://doi.org/10.1111/epi.18240 (Kersting et al., *Epilepsia*, 2025)
- Note: Built on top of nnU-Net (already credited above). The model checkpoint is downloaded from Zenodo at image-build time; check the Zenodo record for any per-deposit terms before redistribution.

### MELD Graph
- License: PolyForm Noncommercial License 1.0.0
- Source: https://github.com/MELDProject/meld_graph

### AID-HS (Automated and Interpretable Detection of Hippocampal Sclerosis)
- License: PolyForm Noncommercial License 1.0.0
- Source: https://github.com/MELDProject/AID-HS

### deepFCD
- License: BSD-3-Clause
- Source: https://github.com/NOEL-MNI/deepFCD

### mindGlide
- License: MIT
- Source: https://github.com/MS-PINPOINT/mindGlide

---

## 4. Bundled neuroimaging tools (via inference container images)

### FreeSurfer
- License: FreeSurfer License — free for academic / non-commercial research; commercial use requires a separate paid license from the FreeSurfer team at the Athinoula A. Martinos Center / Brigham and Women's Hospital / MGH.
- Source: https://surfer.nmr.mgh.harvard.edu
- Note: A valid FreeSurfer license file must be supplied at runtime. Required by FastSurfer, MELD Graph, AID-HS, and other surface-based pipelines.

### Advanced Normalization Tools (ANTs)
- License: Apache 2.0
- Source: https://github.com/ANTsX/ANTs

### NiftyReg
- License: Mozilla Public License 2.0
- Source: https://sourceforge.net/projects/niftyreg/

### FSL (FMRIB Software Library)
- License: FSL License — free for non-commercial use; commercial use requires a separate license from Oxford University Innovation.
- Source: https://fsl.fmrib.ox.ac.uk

### HippUnfold, Connectome Workbench (`wb_command`), ITK-SNAP / Convert3D (`c3d`)
- These tools are bundled inside upstream model containers (notably `meldproject/aidhs`) and are governed by their own upstream licenses (typically GPL-family). They are invoked by MedSeg through subprocess calls within those containers.
- Sources: https://github.com/khanlab/hippunfold, https://github.com/Washington-University/workbench, http://www.itksnap.org

### Snakemake
- License: MIT
- Source: https://github.com/snakemake/snakemake

---

## 5. Python backend dependencies

### Web framework / server
- Flask — BSD-3-Clause — https://github.com/pallets/flask
- Werkzeug — BSD-3-Clause — https://github.com/pallets/werkzeug
- Flask-CORS — MIT — https://github.com/corydolphin/flask-cors
- Gunicorn — MIT — https://github.com/benoitc/gunicorn
- gevent — MIT — https://github.com/gevent/gevent
- websockets — BSD-3-Clause — https://github.com/python-websockets/websockets
- requests — Apache 2.0 — https://github.com/psf/requests

### Background jobs / data
- Redis (server) — BSD-3-Clause — https://redis.io
- redis (Python client) — MIT — https://github.com/redis/redis-py
- RQ — BSD-2-Clause — https://github.com/rq/rq

### Auth / crypto
- bcrypt — Apache 2.0 — https://github.com/pyca/bcrypt
- PyJWT — MIT — https://github.com/jpadilla/pyjwt

### Imaging / numerics / DICOM
- NumPy — BSD-3-Clause — https://github.com/numpy/numpy
- SciPy — BSD-3-Clause — https://github.com/scipy/scipy
- nibabel — MIT — https://github.com/nipy/nibabel
- pydicom — MIT — https://github.com/pydicom/pydicom
- pynetdicom — MIT — https://github.com/pydicom/pynetdicom
- SimpleITK — Apache 2.0 — https://github.com/SimpleITK/SimpleITK
- scikit-image — BSD-3-Clause — https://github.com/scikit-image/scikit-image
- Pillow — HPND — https://github.com/python-pillow/Pillow
- Matplotlib — Matplotlib License (PSF-based) — https://github.com/matplotlib/matplotlib
- trimesh — MIT — https://github.com/mikedh/trimesh
- fast-simplification — MIT — https://github.com/pmp-library/pmp-library

### Office / utilities
- openpyxl — MIT — https://github.com/ericvsmith/openpyxl
- concurrent-log-handler — Apache 2.0 — https://github.com/grantjenks/python-concurrent-log-handler

### Deep learning
- PyTorch — BSD-3-Clause — https://pytorch.org
- torchvision — BSD-3-Clause — https://github.com/pytorch/vision
- TensorFlow — Apache 2.0 — https://www.tensorflow.org
- Keras — Apache 2.0 — https://github.com/keras-team/keras

### Auth provider
- supabase-py — MIT — https://github.com/supabase-community/supabase-py

---

## 6. Container infrastructure

- Python (`python:3.12-bookworm`) — PSF License — https://www.python.org
- Debian Bookworm — multiple (per package: GPL / LGPL / MIT / BSD) — https://www.debian.org
- Docker CLI — Apache 2.0 — https://github.com/moby/moby
- nginx — BSD-2-Clause — https://nginx.org
- redis (Alpine image) — BSD-3-Clause — https://hub.docker.com/_/redis
- Alpine Linux — MIT and others (per package) — https://alpinelinux.org
- Certbot (`certbot/certbot`) — Apache 2.0 — https://github.com/certbot/certbot
- PyTorch container (`pytorch/pytorch:*-cuda12.4-cudnn9-runtime`) — composite (PyTorch BSD-3 + NVIDIA proprietary CUDA / cuDNN runtime under the NVIDIA EULA) — https://hub.docker.com/r/pytorch/pytorch
- NVIDIA CUDA / cuDNN — NVIDIA proprietary EULA — https://developer.nvidia.com/cuda-toolkit
