Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

411 Adding depth map estimation bundle #447

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions models/bronchoscopic_depthmap_estimation/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This work is licensed under a Creative Commons Attribution 4.0 International License: https://creativecommons.org/licenses/by/4.0/
85 changes: 85 additions & 0 deletions models/bronchoscopic_depthmap_estimation/configs/inference.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"imports": [
"$import glob",
"$import os"
],
"bundle_root": ".",
"ckpt_dir": "$@bundle_root + '/models'",
"output_dir": "$@bundle_root + '/eval'",
"data_list_file_path": "$@bundle_root + '/configs/datalist.json'",
"device": "$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')",
"amp": true,
"network_def": {
"_target_": "ResNet",
"init_filters": 16,
"in_channels": 1,
"out_channels": 1
},
"network": "$@network_def.to(@device)",
"preprocessing": {
"_target_": "Compose",
"transforms": [
{
"_target_": "LoadImaged",
"keys": "image",
"image_only": false
},
]
},
"dataset": {
"_target_": "Dataset",
"data": "@test_datalist",
"transform": "@preprocessing"
},
"dataloader": {
"_target_": "DataLoader",
"dataset": "@dataset",
"batch_size": 1,
"shuffle": true,
"num_workers": 4
},
"postprocessing": {
"_target_": "Compose",
"transforms": [
{
"_target_": "SaveImaged",
"keys": "depth",
"meta_keys": "pred_meta_dict",
"output_dir": "@output_dir",
"output_postfix": "depth",
"output_dtype": "float32",
"resample": false,
"squeeze_end_dims": true
}
]
},
"handlers": [
{
"_target_": "CheckpointLoader",
"load_path": "$@bundle_root + '/models/model.pt'",
"load_dict": {
"model": "@network"
}
},
{
"_target_": "StatsHandler",
"iteration_log": false
}
],
"evaluator": {
"_target_": "SupervisedEvaluator",
"device": "@device",
"val_data_loader": "@dataloader",
"network": "@network",
"inferer": "@inferer",
"postprocessing": "@postprocessing",
"val_handlers": "@handlers",
"amp": true
},
"initialize": [
"$setattr(torch.backends.cudnn, 'benchmark', True)"
],
"run": [
"[email protected]()"
]
}
62 changes: 62 additions & 0 deletions models/bronchoscopic_depthmap_estimation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.0.1",
"changelog": {
"0.0.1": "initializing the model package structure"
},
"monai_version": "1.2.0rc5",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {

},
"name": "Bronchoscopy Depth Map Estimation",
"task": "Depth map generation from bronchoscopic images",
"copyright": "CC BY 4.0",
"description": "A model for generation of depth map images from bronchoscopic images",
"authors": "Surgical Navigation and Robotics Lab",
"image_classes": "single channel data, intensity scaled to [0, 255]",
"network_data_format": {
"inputs": {
"image": {
"type": "image",
"format": "magnitude",
"modality": "regular",
"num_channels": 1,
"spatial_shape": [
200,
200
],
"dtype": "int",
"value_range": [
0,
255
],
"is_patch_data": false,
"channel_def": {
"0": "image"
}
}
},
"outputs": {
"pred": {
"type": "image",
"format": "magnitude",
"num_channels": 1,
"spatial_shape": [
200,
200
],
"dtype": "float32",
"value_range": [
0,
1
],
"is_patch_data": false,
"channel_def": {
"0": "depth"
}
}
}
}
}
28 changes: 28 additions & 0 deletions models/bronchoscopic_depthmap_estimation/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Model Title

### **Authors**
Artur Banach, Franklin King, Fumitaro Masaki, Hisashi Tsukada, and Nobuhiko Hata
National Center for Image-guided Therapy, Brigham and Women’s Hospital and Harvard Medical School

### **Tags**
Bronchoscopy, Grayscale, Lung, Depth map

## **Model Description**
This model is in accordance with the following publication: Banach et al. "Visually Navigated Bronchoscopy using three cycle-Consistent generative adversarial network for depth estimation", Med. Image Anal. 73, 102164 (2021), https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8453111/

## **Data**
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/8MNI49

#### **Preprocessing**
Model takes as input grayscale 200x200 images scaled from 0 to 255.

## **Citation Info**
@article{banach2021visually,
title={Visually navigated bronchoscopy using three cycle-consistent generative adversarial network for depth estimation},
author={Banach, Artur and King, Franklin and Masaki, Fumitaro and Tsukada, Hisashi and Hata, Nobuhiko},
journal={Medical image analysis},
volume={73},
pages={102164},
year={2021},
publisher={Elsevier}
}
1 change: 1 addition & 0 deletions models/bronchoscopic_depthmap_estimation/docs/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This work is licensed under a Creative Commons Attribution 4.0 International License: https://creativecommons.org/licenses/by/4.0/
9 changes: 9 additions & 0 deletions models/bronchoscopic_depthmap_estimation/large_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
large_files:
- path: "models/model.pt"
url: "https://drive.google.com/uc?export=download&id=1hBsBRrET40FbB9WJcNg5hIL67h2p2pRi"
hash_val: "5883296f3d06021b7068d024a00ac0c7"
hash_type: "md5"
- path: "models/model.onnx"
url: "https://drive.google.com/uc?export=download&id=184YGCmG7kHScBC8Cf5cxrt1qJCcfo9Zh"
hash_val: "636a469d5fbf72ab568dd232c8aa965c"
hash_type: "md5"