Fast 3D brain segmentation and FreeSurfer-like statistics inference.
Project description
scalesufer
scalesurfer is a repository for fast FreeSurfer inference. The volumetric model uses UNet (local scale), with a Transformer bottlenck (global scale). The stats models predict FreeSurfer stats.
Usage
from scalesurfer import ScaleSurfer
# Anatomical images
adni_dir = "/home/rph/scalesurfer/data/adni_bids"
subjects = ["sub-002S0559", "sub-002S0619"]
anat_files = [
f"{adni_dir}/sub-002S0559/ses-20060627/anat/sub-002S0559_ses-20060627_T1w.nii.gz",
f"{adni_dir}/sub-002S0619/ses-20060601/anat/sub-002S0619_ses-20060601_T1w.nii.gz"
]
# Predict aparc+aseg and stats tables
surfer = ScaleSurfer(anat_files, subjects, "/tmp/scalesurfer_subjects", device="cuda")
surfer.prepare_images()
surfer.predict_volumes()
surfer.plot_volume(subjects[0])
df_stats = surfer.predict_stats()
See the inference notebook for additional settings for faster processing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scalesurfer-0.1.0.tar.gz.
File metadata
- Download URL: scalesurfer-0.1.0.tar.gz
- Upload date:
- Size: 135.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
925193047c12c75855975ecb12ebf282a2e6f15d0d9f71ddc04593746c7cd382
|
|
| MD5 |
c22de5487a1315dfaa4da1ecc2b8466b
|
|
| BLAKE2b-256 |
4d4c3a0cdaf46d9737fa472a0f33ebc401e9f38f2c5c18a8e5a8937fb850a11b
|
Provenance
The following attestation bundles were made for scalesurfer-0.1.0.tar.gz:
Publisher:
publish.yml on voytekresearch/scalesurfer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scalesurfer-0.1.0.tar.gz -
Subject digest:
925193047c12c75855975ecb12ebf282a2e6f15d0d9f71ddc04593746c7cd382 - Sigstore transparency entry: 2139218767
- Sigstore integration time:
-
Permalink:
voytekresearch/scalesurfer@56abbf69d29494f19681fc996e992f37828761eb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/voytekresearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@56abbf69d29494f19681fc996e992f37828761eb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scalesurfer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scalesurfer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 154.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
755fbc1e95de83de1af3b4f6f2031d215b3b6fcbe91734efe85af390e1be0166
|
|
| MD5 |
66664c6962c6f9fcbfd625ca006fcb7a
|
|
| BLAKE2b-256 |
6678aea759e079f997d5624643c2452c30309a7677863daa00a434a074d222c3
|
Provenance
The following attestation bundles were made for scalesurfer-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on voytekresearch/scalesurfer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scalesurfer-0.1.0-py3-none-any.whl -
Subject digest:
755fbc1e95de83de1af3b4f6f2031d215b3b6fcbe91734efe85af390e1be0166 - Sigstore transparency entry: 2139218796
- Sigstore integration time:
-
Permalink:
voytekresearch/scalesurfer@56abbf69d29494f19681fc996e992f37828761eb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/voytekresearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@56abbf69d29494f19681fc996e992f37828761eb -
Trigger Event:
workflow_dispatch
-
Statement type: