A deep neural network based approach to classify medical echocardiography images into 8 standard views.
Echocardiography images (echo) are ultrasound scans of the heart. There is a set of 8 standard echo views, namely: PLAX, PSAX-AV, PSAX-MV, PSAX-AP, A2C, A3C, A4C, A5C. Each view shows a different perspective of the heart, and are thus used for different diagnosis of heart diseases. To assist doctors or junior cardiologists, an automatic computer vision based classifier proves helpful in identifying the views with high accuracy (93.9% on a set of 10,000 images).
The neural network is built using TensorFlow Keras library, with a VGG16 convolutional network plus a custom fully-connected network. The output is passed through a softmax layer to predict 1 out of 8 views.
This Python file is tested on
- Python 3.6
- NumPy 1.15
- Pandas 0.23
- TensorFlow 1.12
Pull
or download repository to your local directory.- Download trained model weight from this Dropbox to the folder
model/
in the local directory. - There are already sample images provided in
sample/test/
. Feel free to add your own echo images to evaluate the model. Note: DICOM file is not supported. - Run the Python script
python classify.py
- Classification results are saved in
results.csv
file.
Here are 2 example outputs from the classifier, evaluated on the provided sample images. Both are correct predictions. The sample images are obtained from public domain.
Prediction: plax | Prediction: psax-ap |
Confidence: 99.6% | Confidence: 95.1% |