LungsAI - Pneumonia Detection Model

Model Description

LungsAI is a deep learning image classification model designed to analyze chest X-ray images and predict the presence of pneumonia. This AI-powered tool was developed to assist in fast and efficient medical image analysis.

  • Developed by: Md Shahed Rahman
  • Model type: Deep Learning Image Classification
  • Application: Also deployed as a web application using Streamlit
  • License: MIT

Model Details

The model weights are saved in the .h5 format (pneumonia_model.h5), making it fully compatible with the Keras and TensorFlow frameworks.

How to Get Started with the Model

You can easily load and run predictions using this model in Python. Here is a basic code snippet to get you started:

import tensorflow as tf
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing import image
import numpy as np

# 1. Load the model
model = load_model('pneumonia_model.h5')

# 2. Define a prediction function
def predict_pneumonia(img_path):
    # Note: Adjust the target_size based on how your model was trained (e.g., 150x150 or 224x224)
    img = image.load_img(img_path, target_size=(224, 224)) 
    img_array = image.img_to_array(img)
    img_array = np.expand_dims(img_array, axis=0) / 255.0
    
    # Get the prediction
    prediction = model.predict(img_array)
    return prediction

# 3. Test with an image
# result = predict_pneumonia('path_to_your_xray_image.jpg')
# print(result)

Intended Uses & Limitations

    Intended Use: This model is built for educational, research, and portfolio purposes to demonstrate the power of deep learning in healthcare.

    Limitations: This AI model is not a substitute for professional medical diagnosis. It should not be used for real-world clinical decision-making without the supervision of a certified doctor or radiologist.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support