Coder Social home page Coder Social logo

xhelenfu / cnn_segmentation_histology Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 6.0 25 KB

Segmentation of histological images and fibrosis identification with a convolutional neural network

License: MIT License

Python 100.00%
segmentation convolutional-neural-networks machine-learning deep-learning deep-neural-networks histological-images histology cardiac-segmentation atrial-fibrillation fibrosis python tensorflow

cnn_segmentation_histology's Introduction

Segmentation of histological images and fibrosis identification with a convolutional neural network

This repository contains an implementation of the convolutional neural network (CNN) described in this paper. The CNN segments biomedical images by predicting the class of each pixel. In the original task, the images were of cardiac histological sections stained with Masson's trichrome. The objective was to segment the RGB images into 3 classes: myocyte, background, or fibrosis.

alt text

The code requires Python and TensorFlow to run.

Training

Training data should be in the ./training set folder. RGB images should be named in the format train_1.png, train_2.png, etc. Ground truth masks should be named in the format train_1_mask.png, train_2_mask.png, etc.

In train.py, ensure the variables in the list from batch_size to keep_rate are correct.

If restore is set to True, a previous model will first be loaded and training will resume. Change the path of the model being restored under the function train_network in network.py.

To train the model, run train.py

A model is saved every epoch in the ./model folder, TensorBoard logs are saved under ./logs. One prediction is saved per epoch under ./predictions training.

Testing

Test data should be in the ./testing set folder. RGB images should be named in the format test_1.png, test_2.png, etc. If available, ground truth masks should be named in the format test_1_mask.png, test_2_mask.png, etc.

In test.py, ensure the variables in the list from n_epochs to n_predict are correct.

To test, run test.py

Predicted segmentations are saved under ./predictions test.

Accuracy and DSC scores are computed for each test image.

cnn_segmentation_histology's People

Contributors

xhelenfu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.