GithubHelp home page GithubHelp logo

vladzalevskyi / calcification-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joaco18/calc-det

0.0 0.0 0.0 307.24 MB

Calcification Detection Model's Implementation and Comparison for Digital Mammograms

License: MIT License

Python 0.68% Jupyter Notebook 99.32%

calcification-detection's Introduction

Advance Image Analysis & Machine and Deep Learning Final Project

Calcification Detection in Mammography Images

MAIA Master 2022


Team Members

  • Cortina Uribe Alejandro

  • Seia Joaquin Oscar

  • Zalevskyi Vladyslav

alt text alt text

Instructions

This repository contains all the code and analysis notebooks for our final project on microcalcifications (MC) detection on mammography images that we develpped for our AIA and ML-DL courses. The project included the development of three different pipelines for MC detection, one based on AIA+ML and two deep learning based. The full report can be checked here.

The main final results analysis notebooks are:

Even if the repository is self-contained and it be fully reproduced following the undegoing instructions, the reader might be interested first in checking and runing examples of the final pipelines we generated. To do so, you should do:

  • Environmental set up
  • Download the checkpoints for the models
  • Download the example image (or provide one of your own)
  • Run the examples

The mentionned steps are here provided in bash command line format:

Environment set up

Start by creating a new conda environment

conda update -n base -c defaults conda &&
conda create -n calc_det anaconda &&
conda activate calc_det &&
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

Install requirements:

pip install -r requirements.txt

Download checkpoints of pretrained models

Deep learning detection by classification

mkdir deep_learning/classification_models/checkpoints &&
cd deep_learning/classification_models/checkpoints &&
gdown https://drive.google.com/uc?id=16BbvvZcS2Qx421v9QKpKH4JrVKF1Efcf &&
unzip classification_checkpoints.zip &&
rm -rf classification_checkpoints.zip &&
cd ../../../

Deep learning detection with FasterRCNN

mkdir deep_learning/detection_models/checkpoints &&
cd deep_learning/detection_models/checkpoints &&
gdown https://drive.google.com/uc?id=1R8fxd_CdyG5ec1grobRUut8UqCKbVFdp &&
unzip detection_checkpoints.zip &&
rm -rf detection_checkpoints.zip &&
cd ../../../

Machine Learning

mkdir machine_learning/checkpoints &&
cd machine_learning/checkpoints &&
gdown https://drive.google.com/uc?id=1TOJ3nsXnxfvMxygeXGQHxKH5-qOXeTBL &&
unzip ml_cascade_checkpoints.zip &&
rm -rf ml_cascade_checkpoints.zip &&
cd ../../

Download Example image

mkdir example_img &&
cd example_img &&
gdown https://drive.google.com/uc?id=1VYPWmU2QuEZ3Ys9LhAsDZp19dZmaaT4r &&
cd ../

Runing a full case

This terminal commands should be excecuted locally not in colab.

AIA-ML

python mc_detector.py --dcm-filepath <ABOSULTE_PATH_TO_REPO>/example_img/24065734_5291e1aee2bbf5df_MG_L_CC_ANON.dcm --detector-type 'aia_ml' --ouput-path /<ABOSULTE_PATH_TO_REPO>/example_img/ --store-csv --v

Deep learning classification based detection

python mc_detector.py --dcm-filepath <ABOSULTE_PATH_TO_REPO>/example_img/24065734_5291e1aee2bbf5df_MG_L_CC_ANON.dcm --detector-type 'classification_dl' --ouput-path /<ABOSULTE_PATH_TO_REPO>/example_img/ --store-csv --v --batch-size 224

Deep learning detection based detection

python mc_detector.py --dcm-filepath <ABOSULTE_PATH_TO_REPO>/example_img/24065734_5291e1aee2bbf5df_MG_L_CC_ANON.dcm --detector-type 'detection_dl' --ouput-path /<ABOSULTE_PATH_TO_REPO>/example_img/ --store-csv --v --batch-size 1

Further instructions

If the reader wants to run the full code, then downloading and preparation of the INBreast should be done as following:

Download and prepare INBreast database

cd data &&
gdown https://drive.google.com/uc?id=1ebw9N2vZY19TuELBZb39eAJhPjY1eFZX &&
unzip 'INbreast Release 1.0.zip' &&
rm -rf 'INbreast Release 1.0.zip' &&
cd ../ &&
python database/parsing_metadata.py --ib-path data/INbreast\ Release\ 1.0/ --rp --cb --pect-musc-mask

calcification-detection's People

Contributors

joaco18 avatar vladzalevskyi avatar alexcortinau 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.