Skip to content

Using Convolutional Neural Networks on Chest X-Ray images to detect Pneumonia

License

Notifications You must be signed in to change notification settings

Daheer/Pneumonia-Detection

Repository files navigation

Pneumonia-Detection

Pneumonia

Pneumonia is a form of acute respiratory infection that affects the lungs. The lungs are made up of small sacs called alveoli, which fill with air when a healthy person breathes. When an individual has pneumonia, the alveoli are filled with pus and fluid, which makes breathing painful and limits oxygen intake.

Diagnosis

An X-ray helps your doctor look for signs of inflammation in your chest. If inflammation is present, the X-ray can also inform your doctor about its location and extent.

Pneumonia-Detector

Pneumonia-Detector attempts to automate methods to detect and classify pneumonia from medical x-ray images using a Convolutional Neural Network. It is able to detect correctly 88% of pneumonia cases but it is NOT in any way a substitute for consulting a professional medical examiner.

Model Architecture Plot

Click to view full architecture

Yolo Driving Environment Model Architecture

Built Using (v1)

Built Using (v2)

Prerequisite and Installation (v1)

Project Structure

│   training.ipynb (v2)
│   inference.ipynb (v2)
│   detect-voila.ipynb (v1)
│   script.py (v1)
│   pneumonia-detection.ipynb (v1)
│
├───utils (v1)
│   ├──constants.py (v1)
│   ├──pneumonia_model.py (v1)
│   └───utils.py (v1)
│
└───weights
    └─── pneumonia_detector_model.pth (v1)

Usage (v1)

For coders: Use the 'diagnose' method in script.py either by importing or editing the script file itself. Pass an x-ray image (either a PIL.Image, torch.tensor, numpy.array or even a path to the image file) as argument to the function.

For non-coders: Visit this Binder link, wait for it to render, sip some coffee as you wait :).

Usage (v2)

Visit the Colab notebook by clicking here

Demo (v1)

Visit Binder to try it yourself.

Placeholder Prediction

Usage (v2)

Visit the Colab notebook by clicking here and interact with the Gradio Interface

References

Contact

Dahir Ibrahim (Deedax Inc) - http://instagram.com/deedax_inc
Email - [email protected]
YouTube - https://www.youtube.com/@deedaxinc
Twitter - https://twitter.com/DeedaxInc
Project Link - https://github.com/Daheer/Pneumonia-Detection