Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 10, 2023
1 parent 553a21c commit aacb8d1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions modules/GDS_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,18 @@
" hash_func: Callable[..., bytes] = pickle_hashing,\n",
" hash_transform: Callable[..., bytes] | None = None,\n",
" reset_ops_id: bool = True,\n",
" device : int = None,\n",
" device: int = None,\n",
" **kwargs: Any,\n",
" ) -> None:\n",
" super().__init__(\n",
" data=data,\n",
" transform=transform,\n",
" cache_dir=cache_dir,\n",
" hash_func = hash_func,\n",
" hash_transform = hash_transform,\n",
" reset_ops_id = reset_ops_id,\n",
" **kwargs\n",
" )\n",
" hash_func=hash_func,\n",
" hash_transform=hash_transform,\n",
" reset_ops_id=reset_ops_id,\n",
" **kwargs,\n",
" )\n",
" self.device = device\n",
" self.shape_dict = {}\n",
"\n",
Expand Down Expand Up @@ -238,9 +238,7 @@
"source": [
"sample_url = \"https://github.com/Project-MONAI/MONAI-extra-test-data/releases\"\n",
"sample_url += \"/download/0.8.1/totalSegmentator_mergedLabel_samples.zip\"\n",
"monai.apps.download_and_extract(\n",
" sample_url, output_dir=root_dir, filepath=\"samples.zip\"\n",
")\n",
"monai.apps.download_and_extract(sample_url, output_dir=root_dir, filepath=\"samples.zip\")\n",
"\n",
"base_name = os.path.join(root_dir, \"totalSegmentator_mergedLabel_samples\")\n",
"input_data = []\n",
Expand Down Expand Up @@ -289,7 +287,12 @@
" mt.EnsureTypeD(keys=(\"image\", \"label\"), device=device),\n",
" mt.SpacingD(keys=(\"image\", \"label\"), pixdim=1.5),\n",
" mt.RandRotateD(\n",
" keys=(\"image\", \"label\"), prob=1.0, range_x=0.1, range_y=0.1, range_z=0.3, mode=(\"bilinear\", \"nearest\"),\n",
" keys=(\"image\", \"label\"),\n",
" prob=1.0,\n",
" range_x=0.1,\n",
" range_y=0.1,\n",
" range_z=0.3,\n",
" mode=(\"bilinear\", \"nearest\"),\n",
" ),\n",
" mt.RandZoomD(keys=(\"image\", \"label\"), prob=1.0, min_zoom=0.8, max_zoom=1.2, mode=(\"trilinear\", \"nearest\")),\n",
" mt.ResizeWithPadOrCropD(keys=(\"image\", \"label\"), spatial_size=(200, 210, 220)),\n",
Expand Down

0 comments on commit aacb8d1

Please sign in to comment.