This is a Keras detector of
neurons on medical images of brain slices of rats.
This implementation achieve approximately 80% F1 score on
dataset of 61 annotated images. Solution is tested and
worked well on Linux Ubuntu 14.0 and Windows 10 with
Python3
First you should install tensorflow (CPU or GPU version if you have Video Card with Cuda Compute Capability 3.0) https://www.tensorflow.org/install/
Then install all dependencies by
pip install requirements.txt
The dataset included to repository:
data/labeled_images
Each image is annotated by LabelImg:
https://github.com/tzutalin/labelImg
Just download binaries for any platform from repo for
looking and editing the neurons annotations.
For training just run:
python train.py
Training takes ~2 hours on Tesla P40.
After training the model weights with quality report will
be created in data/trained_weights/vgg
data/trained_weights/vgg/best_weights.hdf5
data/trained_weights/vgg/best_weights_quality_report.txt
Last trained weights for VGG-like network you can download from here:
https://drive.google.com/file/d/11h7gJpFrQgUPx_Uq7YLxPANx7BjYemLo
This weights should be placed here:
data/trained_weights/vgg/best_weights.hdf5
For testing trained net on dataset:
python estimate_quality.py
For making detections on new images run:
python detect.py <images_mask>
e.g.
python detect.py data/validation_images/*.jpg
This script creates for each image the xml file with annotated rects in LabelImg format