Downloads · 30 days
10
23% of all-time downloads
meghashyamreddy014/brain-mri-classifier
brain-mri-classifier is a machine learning model from meghashyamreddy014. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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…
Downloads · 30 days
10
23% of all-time downloads
All-time downloads
43
Public
Repo size
57.4 MB
Likes
0
Public
Click a slice to open those files.
.h557.4 MB · 100%
From the Hugging Face model README
This EfficientNet-B0 model is designed for detecting neurological diseases from brain MRI scans. It can classify brain scans into three categories:
pip install huggingface_hub tensorflow pillow numpy
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}%")
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.
This model is released under the MIT License for research and educational use.
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}
}
For questions or issues, please open an issue in the repository or contact the development team.