Skip to content

Commit 6b7c6fe

Browse files
authored
Merge branch 'main' into maisi
2 parents 8d33601 + 0f21835 commit 6b7c6fe

File tree

8 files changed

+1036
-0
lines changed

8 files changed

+1036
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ This tutorial shows how to train a surgical tool segmentation model to locate to
226226
##### [endoscopic inbody classification](./computer_assisted_intervention/endoscopic_inbody_classification.ipynb)
227227
Tutorial to show the pipeline of fine tuning an endoscopic inbody classification model based on a corresponding pretrained bundle.
228228

229+
#### <ins>**Hugging Face**</ins>
230+
##### [MONAI Hugging Face Pipeline](./hugging_face/hugging_face_pipeline_for_monai.ipynb)
231+
This tutorial demonstrates how to encapsulate an existing MONAI model workflow into a Hugging Face pipeline, which is widely adopted by the open-source community.
232+
##### [Fine-tuning for Hugging Face Pipeline](./hugging_face/finetune_vista3d_for_hugging_face_pipeline.ipynb)
233+
This tutorial explains the process of fine-tuning a VISTA3D model and integrating it into a Hugging Face pipeline for inference.
234+
229235
#### <ins>**Modules**</ins>
230236
##### [bundle](./bundle)
231237
Get started tutorial and concrete training / inference examples for MONAI bundle features.

figures/hugging_face_general.jpg

190 KB
Loading

figures/hugging_face_model.jpg

144 KB
Loading

figures/hugging_face_pipeline.jpg

109 KB
Loading

hugging_face/finetune_vista3d_for_hugging_face_pipeline.ipynb

Lines changed: 426 additions & 0 deletions
Large diffs are not rendered by default.

hugging_face/hugging_face_pipeline_for_monai.ipynb

Lines changed: 596 additions & 0 deletions
Large diffs are not rendered by default.

modules/omniverse/omniverse_integration.ipynb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"outputs": [],
5858
"source": [
5959
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel]\"\n",
60+
"!python -c \"import skimage\" || pip install -q scikit-image\n",
6061
"!python -c \"import vtk\" || pip install -q vtk\n",
6162
"!python -c \"import pxr\" || pip install -q usd-core\n",
6263
"!python -c \"import trimesh\" || pip install -q trimesh\n",
@@ -466,6 +467,11 @@
466467
" print(f\"Saved whole segmentation {all_organ_filename}\")\n",
467468
"\n",
468469
"\n",
470+
"# if workflow.run() is uncommented and run, an image and a label files will be generated in the output folder\n",
471+
"# for example, file paths are like this:\n",
472+
"# f\"{bundle_root}/output/sample_20250317_065034_415537_image.nii.gz\"\n",
473+
"# f\"{bundle_root}/output/sample_20250317_065034_415537_label.nii.gz\"\n",
474+
"# then you can replace the \"input_nii_path\" below with the generated label file\n",
469475
"input_nii_path = f\"{bundle_root}/datasets/IntegrationTest-AbdomenCT.nii.gz\"\n",
470476
"output_nii_path = f\"{bundle_root}/datasets/monai/nii\"\n",
471477
"output_obj_path = f\"{bundle_root}/datasets/monai/obj\"\n",

runner.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" mask_augmentation_e
8282
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" maisi_inference_tutorial.ipynb)
8383
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" realism_diversity_metrics.ipynb)
8484
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" omniverse_integration.ipynb)
85+
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" hugging_face_pipeline_for_monai.ipynb)
8586

8687
# Execution of the notebook in these folders / with the filename cannot be automated
8788
skip_run_papermill=()
@@ -129,6 +130,7 @@ skip_run_papermill=("${skip_run_papermill[@]}" .*nuclick_infer.ipynb*) # https:
129130
skip_run_papermill=("${skip_run_papermill[@]}" .*unet_segmentation_3d_ignite_clearml.ipynb*) # https://github.com/Project-MONAI/tutorials/issues/1555
130131
skip_run_papermill=("${skip_run_papermill[@]}" .*vista_2d_tutorial_monai.ipynb*)
131132
skip_run_papermill=("${skip_run_papermill[@]}" .*learn2reg_oasis_unpaired_brain_mr.ipynb*)
133+
skip_run_papermill=("${skip_run_papermill[@]}" .*finetune_vista3d_for_hugging_face_pipeline.ipynb*)
132134

133135
# output formatting
134136
separator=""

0 commit comments

Comments
 (0)