This was a research project at the National Center for Tumor Diseases (NCT Dresden), which was developed between 2020 and 2021. The project aimed to work tightly with the medical department and support the surgeons during operations. For that was developed a novel dataset for the colon operation, annotated by the medical department.
The achieved results in the detection of various tissues and instruments were published at the CURAC 2021 Conference
To get a better understanding was developed a webapp, that demonstrates the results by uploading an example image of the Frist incision phase.
A test image from img/20190917_FIRST_INCISION_00064.png
can be uploaded and will produce a prediction like
In addition to tissue detection, the research project also covers an approach to suggest surgeons where to place a cut on a "first incision plane". Based on a good achieved Intersection over Union score for the "first incision plane", it was made post-processing based on a triangulation technique of the plane.
Contains following phases:
- first incision
- pedicle package
- vascular dissection
- mesocolon gerota
- lateral mobilisation
- TME
Jupyter notebook detectron/repo_structure_tutorial.ipynb
contains a step by step description of how to use the provided network.
- Build image
docker build -t surgery .
- Run container
docker run -it -p 8080:8080 surgery
-
csv
here will be dumped thecsv
files and thejson
files-
detectron/plane_evaluation/
stores everything connected with the planegt_evaluation
stores a analysis of the resection lines GT annoatated from Matthias. Here are all the parameters that can be compared further with the artificial constructed plane
Starting point of resection line End point of resection line lenght Slope of the resection line in degrees Image from OP [598,534] [555,727] 198 12.5
-
-
configs
- contains configs file, which contain initialized parameterconfigs.yaml
- contains the default config fileplane_config.yaml
- contains the config for operation only on the plane
-
data
- contains the nrrd files and the data from nrrd to.png
saved.- the
.png
data is in the folderoutput
images
contains the 4th phase of the op, where only a mask need to be detectedimages_new
is for the 1st phase -> where the resection line needs to be estimated- for the training and validation with detectron2 the directories have to have a form of:
train
val
masks
masks_val
- the
-
detectron
contains files and directories connected with the Maks-RCNN approach implementation by FAIR.plane_processing
contains all the postprocessing files after the detection of the planeresec_line_length_estimation.py
is for analysing the training datasets resectrion line length. This allows to estimate how long the line should be if we draw an artificial one. Saves this aslength.json
img_gt_resec.py
contains the implementation of the construction of the resection line based on the planes centroidsplane_evaluation.py
analyses the distance from the centroid to the neighrest point GT resection line pointoutput
here will be various results of the constructed images with the artificial generated resection line saved
- in the root:
dataset_new_data.py
saves the images from NRRD and creates a description json which is needed for detectron2 training procedure. Parameter for saving and locations of the files are stored in theconfig.yaml
underCREATE_DATASET
nrrd_mapping.py
contains mapping for the layers of the various nrdds. This is needed because while annotating in Slicer App the mask layers f.e plane, resection line etc are created in a random order. This dict allows to get a consistent mapping over all OPs.detectron2_run.py
performs the training and evaluation. Parameters are taken fromNEW
andOLD
plane_dataset_creator.py
creating a dataset with plane only img