Skip to content

Commit 72728b6

Browse files
authored
960-endoscopy-inbody-classification-tutorial (#962)
Signed-off-by: binliu <binliu@nvidia.com> Fixes #960 . ### Description Add a tutorial of endoscopy inbody classification, in order to detect whether the endoscopy camera is inside patients' body. This may help to protect privacy of patients during surgical operation. ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [ ] Notebook runs automatically `./runner [-p <regex_pattern>]` Signed-off-by: binliu <binliu@nvidia.com>
1 parent b3d851c commit 72728b6

File tree

3 files changed

+537
-3
lines changed

3 files changed

+537
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ This tutorial shows a straightforward ensemble application to instruct users on
204204
**computer_assisted_intervention**
205205
#### [video segmentation](./computer_assisted_intervention/video_seg.ipynb)
206206
This tutorial shows how to train a surgical tool segmentation model to locate tools in a given image. In addition, it also builds an example pipeline of an end-to-end video tool segmentation, with video input and video output.
207+
#### [endoscopic inbody classification](./computer_assisted_intervention/endoscopic_inbody_classification.ipynb)
208+
Tutorial to show the pipeline of fine tuning an endoscopic inbody classification model based on a corresponding pretrained bundle in monai model zoo.
207209

208210
**modules**
209211
#### [bundle](./bundle)

computer_assisted_intervention/endoscopic_inbody_classification.ipynb

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

computer_assisted_intervention/video_seg.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@
233233
"\n",
234234
"For the dataset, we use two instances of `VideoFileDataset`, one for the input video and the other for the ground truth segmentations. We create a `CombinedVidDataset` that enables us to iterate across these two at the same time.\n",
235235
"\n",
236-
"The data loader is the standard."
236+
"The data loader is a thread dataloader, which is able to accelerate inference and training.\n",
237+
"\n",
238+
"When videos cannot be opened by `VideoFileDataset`, check if python-opencv library is installed with ffmpeg. If not, please uninstall and reinstall python-opencv in your environment."
237239
]
238240
},
239241
{
@@ -373,7 +375,7 @@
373375
"There is a pretrained bundle for surgical tool segmentation task in the MONAI model-zoo, the model can be automatically downloaded and loaded to the network by adding codes to the block below:\n",
374376
"```\n",
375377
"pretrained_weights = monai.bundle.load(\n",
376-
" name=\"surgical_tool_segmentation\", bundle_dir=\"./\", version=\"0.2.0\"\n",
378+
" name=\"endoscopic_tool_segmentation\", bundle_dir=\"./\", version=\"0.2.0\"\n",
377379
")\n",
378380
"model.load_state_dict(pretrained_weights)\n",
379381
"```"
@@ -505,7 +507,7 @@
505507
"source": [
506508
"## Generating video\n",
507509
"\n",
508-
"A video with masks will be generated by using the trained model to predict tool segmentation results."
510+
"A video with masks will be generated by using the trained model to predict tool segmentation results. If cannot open video in notebook, please check saved video in local specified directory."
509511
]
510512
},
511513
{

0 commit comments

Comments
 (0)