YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Brain MRI Classification Model

Model Description

This EfficientNet-B0 model is designed for detecting neurological diseases from brain MRI scans. It can classify brain scans into three categories:

  • CONTROL: Normal brain scan with no signs of neurological disorders
  • AD: Alzheimer's Disease - patterns consistent with Alzheimer's disease
  • PD: Parkinson's Disease - patterns associated with Parkinson's disease

Model Details

  • Architecture: EfficientNet-B0
  • Framework: TensorFlow/Keras
  • Input Size: 150x150x3 (RGB images)
  • Output: 3 classes with confidence scores
  • Model Size: ~20MB
  • Accuracy: 95.8% on test dataset

Usage

Installation

pip install huggingface_hub tensorflow pillow numpy

Loading the Model

from huggingface_hub import hf_hub_download
import tensorflow as tf
import numpy as np
from PIL import Image

# Download model
model_path = hf_hub_download(
    repo_id="your-username/brain-mri-classifier",
    filename="efficient_net_B0.h5"
)

# Load model
model = tf.keras.models.load_model(model_path)

# Preprocess image
def preprocess_image(image_path):
    image = Image.open(image_path).convert('RGB')
    image = image.resize((150, 150))
    image_array = np.array(image)
    image_array = np.expand_dims(image_array, axis=0)
    return image_array

# Make prediction
image_array = preprocess_image("path/to/brain_scan.jpg")
predictions = model.predict(image_array)
class_names = ["CONTROL", "AD", "PD"]
predicted_class = class_names[np.argmax(predictions)]
confidence = np.max(predictions) * 100

print(f"Prediction: {predicted_class}")
print(f"Confidence: {confidence:.2f}%")

Model Performance

  • Overall Accuracy: 95.8%
  • Control Detection: 97.1% accuracy
  • Alzheimer's Detection: 96.2% accuracy
  • Parkinson's Detection: 95.4% accuracy

Important Disclaimer

This AI model is for research and educational purposes only. It should not be used as a substitute for professional medical diagnosis. Always consult with qualified healthcare professionals for proper medical evaluation and diagnosis.

License

This model is released under the MIT License for research and educational use.

Citation

If you use this model in your research, please cite:

@misc{brain-mri-classifier,
  title={Brain MRI Classification Model for Neurological Disease Detection},
  author={Medical AI Team},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/your-username/brain-mri-classifier}
}

Contact

For questions or issues, please open an issue in the repository or contact the development team.

Downloads last month
1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support