Skip to main content

Inside Outside Discrimination Algorithm (IODA)

Project description

Inside Outside Detection (IODA)

Abstract

Background

Laparoscopic videos are increasingly being used for surgical artificial intelligence (AI) and big data analysis. The purpose of this study was to ensure data privacy in video recordings of laparoscopic surgery by censoring extraabdominal parts. An inside-outside-discrimination algorithm (IODA) was developed to ensure privacy protection whilst maximizing the remaining video data.

Methods

IODAs neural network architecture was based on a pretrained AlexNet augmented with a long-short-term-memory. The data set for algorithm training and testing contained a total of 100 laparoscopic surgery videos of 23 different operations with a total video length of 207 hours (124 min ± 100 min per video) resulting in 18,507,217 frames (185,965 ± 149,718 frames per video). Each video frame was tagged either as abdominal cavity, trocar, operation site, outside for cleaning, or translucent trocar. For algorithm testing, a stratified 5-fold cross-validation was used.

Results

The distribution of annotated classes were abdominal cavity 81.39%, trocar 1.39%, outside operation site 16.07%, outside for cleaning 1.08%, and translucent trocar 0.07%. Algorithm training on binary or all five classes showed similar excellent results for classifying outside frames with a mean F1-score of 0.96 ± 0.01 and 0.97 ± 0.01, sensitivity of 0.97 ± 0.02 and 0.0.97 ± 0.01 and a false positive rate of 0.99 ± 0.01 and 0.99 ± 0.01, respectively.

Conclusion

IODA is able to discriminate between inside and outside with a high certainty. In particular, only a few outside frames are misclassified as inside and therefore at risk for privacy breach. The anonymized videos can be used for multi-centric development of surgical AI, quality management or educational purposes. In contrast to expensive commercial solutions, IODA is made open source and can be improved by the scientific community.

Cross-validation of IODA

Cross-validation of IODA using a custom data set can be done using the "run_cross_validation.sh" script. The experiments variable needs to be changed to the location of the custom data set. Additional parameters, like batch size or the number of epochs, can be changed at the top of the script.

Trained models

The repository contains the trained models from the cross-validation experiments described in the paper (trained_models/) as well as a model trained on the complete data set (src/IODA/IODA_model.pt). As mentioned in the paper, the human annotator did make some mistakes annotating the videos. These mistakes were corrected before training the model on the complete data set. The parameters used for training are: batch size = 32, step = 5, epochs = 5.

Anonymizing videos using the docker image

A pre-built docker image of this repository can be found on docker hub. The repository also contains the script "anonymize.sh" that can be used to anonymize videos using the docker image. The scripts expects the path to the folder that contains the video, the file name of the video and the file name of the anonymized video that will be saved in the same folder. Anonymization uses the model trained on the complete data set.

PyPI

This project is also available on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ioda-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ioda-1.0.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file ioda-1.0.0.tar.gz.

File metadata

  • Download URL: ioda-1.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for ioda-1.0.0.tar.gz
Algorithm Hash digest
SHA256 21e6705dde596492bc56c3872c8034fa714bb68347d10940d5a9fd0c02404c2d
MD5 6e5d8989e142f3f8db6c18817dcffbf9
BLAKE2b-256 48305d68b800a5bdbb518766e730826ac3d9bfd176151a42734fad494d2f3c7f

See more details on using hashes here.

File details

Details for the file ioda-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ioda-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for ioda-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d03b9b2e52da8941efa63803c96b9cb25b783bfad93aeb3c9dc8b015602a7cf8
MD5 a91a23487113b24d84b13d73a002c862
BLAKE2b-256 094ed5d64a26f3a96428263eb0e43b196a0a92db7bcb98cd19cabf165e6509fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page