Giter VIP home page Giter VIP logo

surgicalphaserecognition's Introduction

Phase detection in hernia surgery

Authors : Antonin Vidon and Hugo Artigas

State-of-the-art CNN based architectures have been developed to automatically recognize surgical phases in a supervised learning fashion. This repo contains our work (team HAAV) on a dataset of 193 hernia surgery videos whose frames all belonged to one of 14 phases treated as labels. We exploited pretrained CNN architectures such as ResNet and MobileNet to serve as backbone of our models. We completed our architectures with LSTM (MobileNetLSTM) or linear layers (MobileNetFC) to model temporal correlation between frames and eventually added stage of the operation as feature (MobileNetStage). In order to ensure higher performance, we processed the label predictions of our models with a smoothing function. Our best model achieved an accuracy of 80.0% on the test set.

Preprocessing

python videos-to-images.py # converts videos to frames
python label.ipynb # create label dataframe
python split.ipynb # split into training and validation, oversample, ...

Organization of this directory

├── dfs
│   |── labels.pkl
│   |── master_training_no_temp.pkl
│   |── master_training_temp.pkl
│   |── testing.pkl
│   |── training_no_temp_os.pkl
│   |── training_no_temp.pkl
│   |── training_temp.pkl
│   |── validation_no_temp_os.pkl
│   |── validation_no_temp.pkl
│   └── validation_temp.pkl
├── images
├── predictions
│   |── BEST.csv # best prediction on test set, reaching 80.0% accuracy
│   └── other predictions
├── report
│   |── Assignement2_av3023_ha2605.pdf
│   └── models.png
├── surgery.videos.hernia
├── weights # all weights
├── label.ipynb # create label df
├── models.py # all models
├── README.md
├── split.ipynb # split data into training, validation and testing set with/without oversampling and temporal organization
├── train-predict.py # script to train and make predictions on test set
├── train-predict.sh # template to train and make predictions on test set
├── train-validate.py # script to train and validate model with argparse
├── train-validate.sh # template to train and validate model with argparse
├── utils.py # all useful functions for preprocessing, training, predicting, ...
├── video.phase.trainingData.clean.StudentVersion.csv # initial labeling data
└── videos-to-images.py # script to convert and save videos to images

Models

models

Results

Model Validation acc. Macro F1 score
MobileNet 0.8037 0.5545
MobileNetStage 0.7988 0.5239
MobileNetLSTM 0.7011 0.3265
MobileNetFC 0.7002 0.3124

surgicalphaserecognition's People

Contributors

anvdn avatar github-classroom[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.