Initial upload via tools/push_to_hf.py (architecture: ilex.models.fastsurfer_cnn.FastSurferCNN)
Browse files- README.md +65 -0
- config.json +48 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: ilex
|
| 3 |
+
tags:
|
| 4 |
+
- jax
|
| 5 |
+
- equinox
|
| 6 |
+
- ilex
|
| 7 |
+
- neuroimaging
|
| 8 |
+
- per-voxel
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
license_link: https://github.com/Deep-MI/FastSurfer/blob/070647d/LICENSE
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# FastSurferCNN (v1, pre-VINN) -- Coronal-plane parcellator (79 classes)
|
| 14 |
+
|
| 15 |
+
## Description
|
| 16 |
+
|
| 17 |
+
FastSurferCNN is a per-slice 2D Competitive-Dense-UNet for whole-brain parcellation, the pre-VINN "v1" architecture introduced in Henschel et al. 2020. This ilex bundle ports the FastSurfer release at GitHub commit 070647d (Jun 2022), which is the version DeepPrep pins to. The full triplanar parcellation pipeline combines three independently-trained checkpoints (axial, coronal, sagittal); each sees per-slice 7-thick-slab inputs of shape (7, 256, 256) and predicts per-pixel class logits over a 79-class space (axial / coronal) or 51-class space (sagittal, where left/right hemispheric labels collapse and are recovered downstream). The architecture comprises four CompetitiveEncoderBlocks (the first with an input-variant BN layer), a CompetitiveDenseBlock bottleneck, four CompetitiveDecoderBlocks with skip-connection-Maxout fusion, and a 1x1 classifier Conv2d. The per-block "Maxout" gates take elementwise max of the BN-normalised activation against the previous Maxout output (or the raw input, for the first gate), and the encoder / decoder are coupled via MaxPool / MaxUnpool with stored argmax indices.
|
| 18 |
+
|
| 19 |
+
## Intended use
|
| 20 |
+
|
| 21 |
+
Per-slice 2D parcellation along the coronal plane. Same architecture as the axial variant; pair with axial + sagittal via parcellate() for triplanar view-aggregated parcellation.
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
from ilex.models.fastsurfer_cnn import FastSurferCNN
|
| 27 |
+
model = FastSurferCNN.from_pretrained('ilex-hub/fastsurfer_cnn.coronal.1')
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## Authors
|
| 31 |
+
|
| 32 |
+
Henschel L., Conjeti S., Estrada S., Diers K., Fischl B., Reuter M.
|
| 33 |
+
|
| 34 |
+
## Citation
|
| 35 |
+
|
| 36 |
+
Henschel L., Conjeti S., Estrada S., Diers K., Fischl B., Reuter M. (2020). FastSurfer -- A fast and accurate deep learning based neuroimaging pipeline. NeuroImage 219: 117012. doi:10.1016/j.neuroimage.2020.117012
|
| 37 |
+
|
| 38 |
+
### References
|
| 39 |
+
|
| 40 |
+
- Henschel L., Conjeti S., Estrada S., Diers K., Fischl B., Reuter M. (2020). FastSurfer - A fast and accurate deep learning based neuroimaging pipeline. NeuroImage 219:117012. doi:10.1016/j.neuroimage.2020.117012
|
| 41 |
+
- Roy A. G., Conjeti S., Sheet D., Katouzian A., Navab N., Wachinger C. (2017). Error Corrective Boosting for Learning Fully Convolutional Networks with Limited Data. MICCAI 2017 LNCS 10435:231-239. doi:10.1007/978-3-319-66179-7_27 (the Competitive-Dense-UNet design that FastSurferCNN extends)
|
| 42 |
+
|
| 43 |
+
## License
|
| 44 |
+
|
| 45 |
+
HF Hub license tag: `apache-2.0`
|
| 46 |
+
|
| 47 |
+
**Effective terms:** Apache-2.0 (Image Analysis Lab, German Center for Neurodegenerative Diseases (DZNE), Bonn) on both the network code and the pretrained weights at commit 070647d. No commercial restrictions; no gating required.
|
| 48 |
+
|
| 49 |
+
Upstream license reference: https://github.com/Deep-MI/FastSurfer/blob/070647d/LICENSE
|
| 50 |
+
|
| 51 |
+
### Copyright
|
| 52 |
+
|
| 53 |
+
Network architecture and training code: copyright (c) Image Analysis Lab, German Center for Neurodegenerative Diseases (DZNE), Bonn, distributed under the Apache-2.0 license at https://github.com/Deep-MI/FastSurfer. Pretrained weights (checkpoints/Axial_Weights_FastSurferCNN, checkpoints/Coronal_Weights_FastSurferCNN, checkpoints/Sagittal_Weights_FastSurferCNN, all under Epoch_30_training_state.pkl) ship from the same Apache-2.0 repository and inherit the same license. The ilex JAX / Equinox port code is separately licensed under Apache-2.0 / GPL-3.0 for the port code itself; the ilex license does not override the upstream Apache-2.0 terms governing the pretrained weights.
|
| 54 |
+
|
| 55 |
+
## Upstream source
|
| 56 |
+
|
| 57 |
+
Original weights / reference implementation: https://github.com/Deep-MI/FastSurfer/tree/070647d
|
| 58 |
+
|
| 59 |
+
## Provenance
|
| 60 |
+
|
| 61 |
+
This artefact was produced by [ilex](https://github.com/hypercoil/ilex)'s
|
| 62 |
+
save/load pipeline. The architecture is implemented in
|
| 63 |
+
`ilex.models.fastsurfer_cnn.FastSurferCNN` and the weights have been converted
|
| 64 |
+
from their upstream format. See the upstream source above
|
| 65 |
+
for the canonical reference.
|
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_ilex": {
|
| 3 |
+
"architecture": "ilex.models.fastsurfer_cnn.model.FastSurferCNN",
|
| 4 |
+
"constructor_kwargs": {
|
| 5 |
+
"kernel_h": 5,
|
| 6 |
+
"kernel_w": 5,
|
| 7 |
+
"num_channels": 7,
|
| 8 |
+
"num_classes": 79,
|
| 9 |
+
"num_filters": 64,
|
| 10 |
+
"pool": 2,
|
| 11 |
+
"stride_pool": 2
|
| 12 |
+
},
|
| 13 |
+
"format": "ilex",
|
| 14 |
+
"framework_version": {
|
| 15 |
+
"equinox": "0.13.8",
|
| 16 |
+
"ilex": "0.0.0.dev0",
|
| 17 |
+
"jax": "0.10.0",
|
| 18 |
+
"jaxlib": "0.10.0",
|
| 19 |
+
"numpy": "2.4.4",
|
| 20 |
+
"safetensors": "0.7.0"
|
| 21 |
+
},
|
| 22 |
+
"has_state": false,
|
| 23 |
+
"origin": "ilex-native"
|
| 24 |
+
},
|
| 25 |
+
"authors": "Henschel L., Conjeti S., Estrada S., Diers K., Fischl B., Reuter M.",
|
| 26 |
+
"copyright": "Network architecture and training code: copyright (c) Image Analysis Lab, German Center for Neurodegenerative Diseases (DZNE), Bonn, distributed under the Apache-2.0 license at https://github.com/Deep-MI/FastSurfer. Pretrained weights (checkpoints/Axial_Weights_FastSurferCNN, checkpoints/Coronal_Weights_FastSurferCNN, checkpoints/Sagittal_Weights_FastSurferCNN, all under Epoch_30_training_state.pkl) ship from the same Apache-2.0 repository and inherit the same license. The ilex JAX / Equinox port code is separately licensed under Apache-2.0 / GPL-3.0 for the port code itself; the ilex license does not override the upstream Apache-2.0 terms governing the pretrained weights.",
|
| 27 |
+
"data_type": "nibabel",
|
| 28 |
+
"description": "FastSurferCNN is a per-slice 2D Competitive-Dense-UNet for whole-brain parcellation, the pre-VINN \"v1\" architecture introduced in Henschel et al. 2020. This ilex bundle ports the FastSurfer release at GitHub commit 070647d (Jun 2022), which is the version DeepPrep pins to. The full triplanar parcellation pipeline combines three independently-trained checkpoints (axial, coronal, sagittal); each sees per-slice 7-thick-slab inputs of shape (7, 256, 256) and predicts per-pixel class logits over a 79-class space (axial / coronal) or 51-class space (sagittal, where left/right hemispheric labels collapse and are recovered downstream). The architecture comprises four CompetitiveEncoderBlocks (the first with an input-variant BN layer), a CompetitiveDenseBlock bottleneck, four CompetitiveDecoderBlocks with skip-connection-Maxout fusion, and a 1x1 classifier Conv2d. The per-block \"Maxout\" gates take elementwise max of the BN-normalised activation against the previous Maxout output (or the raw input, for the first gate), and the encoder / decoder are coupled via MaxPool / MaxUnpool with stored argmax indices.",
|
| 29 |
+
"equinox_version": "0.13.8",
|
| 30 |
+
"ilex_version": "0.0.0.dev0",
|
| 31 |
+
"image_classes": "Single-channel 3D T1-weighted MRI volume, conformed to UCHAR intensity, 1 mm isotropic spacing, 256x256x256 spatial extent, RAS+ orientation.",
|
| 32 |
+
"intended_use": "Research only. Per-voxel parcellation of conformed 3D T1-weighted MRI volumes into FreeSurfer aparc.DKTatlas+aseg label space. Inputs must be conformed to UCHAR, 1 mm isotropic, 256x256x256, RAS+ orientation (the upstream uses FreeSurfer's mri_convert -c conform op; the conform step is not yet vendored on the ilex side -- see DEVNOTES.md). The full triplanar pipeline runs the axial, coronal, and sagittal nets and sums per-class softmax probabilities across the three views; the sagittal output is remapped from 51 to 79 classes via map_prediction_sagittal2full before aggregation.",
|
| 33 |
+
"jax_version": "0.10.0",
|
| 34 |
+
"label_classes": "79 FreeSurfer aparc.DKTatlas+aseg label IDs (33 subcortical / structural + 31 left-hemispheric cortical + 14 right-hemispheric cortical), remapped from the contiguous network index space [0, 79) via the LABEL_INDEX_TO_FREESURFER_ID lookup in ilex.models.fastsurfer_cnn._inference.",
|
| 35 |
+
"network_data_format": {
|
| 36 |
+
"inputs": {},
|
| 37 |
+
"outputs": {}
|
| 38 |
+
},
|
| 39 |
+
"numpy_version": "2.4.4",
|
| 40 |
+
"pred_classes": "Per-voxel int32 label IDs in the FreeSurfer aparc.DKTatlas+aseg convention (e.g. 2 = Left-Cerebral-White-Matter, 17 = Left-Hippocampus, 1023 = ctx-lh-posteriorcingulate). The 79-class network output index space is contiguous [0, 79) and is mapped to the FreeSurfer label IDs by the ilex.models.fastsurfer_cnn.pipeline.parcellate entry point.",
|
| 41 |
+
"references": [
|
| 42 |
+
"Henschel L., Conjeti S., Estrada S., Diers K., Fischl B., Reuter M. (2020). FastSurfer - A fast and accurate deep learning based neuroimaging pipeline. NeuroImage 219:117012. doi:10.1016/j.neuroimage.2020.117012",
|
| 43 |
+
"Roy A. G., Conjeti S., Sheet D., Katouzian A., Navab N., Wachinger C. (2017). Error Corrective Boosting for Learning Fully Convolutional Networks with Limited Data. MICCAI 2017 LNCS 10435:231-239. doi:10.1007/978-3-319-66179-7_27 (the Competitive-Dense-UNet design that FastSurferCNN extends)"
|
| 44 |
+
],
|
| 45 |
+
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20240725.json",
|
| 46 |
+
"task": "Per-voxel brain parcellation into FreeSurfer aparc.DKTatlas+aseg label space.",
|
| 47 |
+
"version": "0.0.0"
|
| 48 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a13b15b4914f18ccaf58e0af9181812d8dcee617142381e6fc86b9a789639a6
|
| 3 |
+
size 7226800
|