Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ericspod authored Aug 28, 2024
2 parents 578de7f + 1e09634 commit a5d4bbb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion 3d_classification/densenet_training_array.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
],
"source": [
"if not os.path.isfile(images[0]):\n",
" resource = \"http://biomedic.doc.ic.ac.uk/brain-development/downloads/IXI/IXI-T1.tar\"\n",
" resource = \"https://drive.google.com/file/d/1f5odq9smadgeJmDeyEy_UOjEtE_pkKc0/view?usp=sharing\"\n",
" md5 = \"34901a0593b41dd19c1a1f746eac2d58\"\n",
"\n",
" dataset_dir = os.path.join(root_dir, \"ixi\")\n",
Expand Down
54 changes: 27 additions & 27 deletions 3d_regression/densenet_training_array.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@
},
{
"cell_type": "markdown",
"source": [
"## Setup data directory"
],
"metadata": {
"id": "QVfv5JUVR892"
}
},
"source": [
"## Setup data directory"
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -196,16 +196,16 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"is_executing": true,
"ExecuteTime": {
"start_time": "2024-06-23T00:20:35.525723Z"
},
"id": "1zcWs3THeVPn"
"id": "1zcWs3THeVPn",
"is_executing": true
},
"outputs": [],
"source": [
"if not os.path.isfile(images[0]):\n",
" resource = \"http://biomedic.doc.ic.ac.uk/brain-development/downloads/IXI/IXI-T1.tar\"\n",
" resource = \"https://drive.google.com/file/d/1f5odq9smadgeJmDeyEy_UOjEtE_pkKc0/view?usp=sharing\"\n",
" md5 = \"34901a0593b41dd19c1a1f746eac2d58\"\n",
"\n",
" dataset_dir = os.path.join(root_dir, \"ixi\")\n",
Expand All @@ -216,19 +216,19 @@
},
{
"cell_type": "markdown",
"source": [
"## Create data loaders"
],
"metadata": {
"id": "P3-MIx_lSNKF"
}
},
"source": [
"## Create data loaders"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"is_executing": true,
"id": "yVvt3XtHeVPn"
"id": "yVvt3XtHeVPn",
"is_executing": true
},
"outputs": [],
"source": [
Expand All @@ -255,19 +255,19 @@
},
{
"cell_type": "markdown",
"source": [
"## Create model and train"
],
"metadata": {
"id": "YgH8asdqSaiT"
}
},
"source": [
"## Create model and train"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"is_executing": true,
"id": "peVze9d7eVPo"
"id": "peVze9d7eVPo",
"is_executing": true
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -357,8 +357,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"is_executing": true,
"id": "66kVvM1eeVPp"
"id": "66kVvM1eeVPp",
"is_executing": true
},
"outputs": [],
"source": [
Expand All @@ -368,6 +368,11 @@
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
Expand All @@ -383,12 +388,7 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"colab": {
"provenance": [],
"gpuType": "T4"
},
"accelerator": "GPU"
}
},
"nbformat": 4,
"nbformat_minor": 0
Expand Down
2 changes: 2 additions & 0 deletions generation/maisi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ The information for the inference input, like body region and anatomy to generat
- `"autoencoder_sliding_window_infer_size"`: in order to save GPU memory, we use sliding window inference when decoding latents to image when `"output_size"` is large. This is the patch size of the sliding window. Small value will reduce GPU memory but increase time cost. They need to be divisible by 16.
- `"autoencoder_sliding_window_infer_overlap"`: float between 0 and 1. Large value will reduce the stitching artifacts when stitching patches during sliding window inference, but increase time cost. If you do not observe seam lines in the generated image result, you can use a smaller value to save inference time.

To generate images with substantial dimensions, such as 512 × 512 × 512 or larger, using GPUs with 80GB of memory, it is advisable to configure the `"num_splits"` parameter in [the auto-encoder configuration](./configs/config_maisi.json#L11-L37) to 16. This adjustment is crucial to avoid out-of-memory issues during inference.

#### Execute Inference:
To run the inference script, please run:
```bash
Expand Down
2 changes: 1 addition & 1 deletion modules/public_datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
"outputs": [],
"source": [
"class IXIDataset(Randomizable, CacheDataset):\n",
" resource = \"http://biomedic.doc.ic.ac.uk/\" + \"brain-development/downloads/IXI/IXI-T1.tar\"\n",
" resource = \"https://drive.google.com/file/d/1f5odq9smadgeJmDeyEy_UOjEtE_pkKc0/view?usp=sharing\"\n",
" md5 = \"34901a0593b41dd19c1a1f746eac2d58\"\n",
"\n",
" def __init__(\n",
Expand Down

0 comments on commit a5d4bbb

Please sign in to comment.