muawiaimti/efficientnet0
By muawiaimti · ↓ 0 · ♥ 0 · Updated 2025-04-25
What's in this repo
This page lists the files in muawiaimti/efficientnet0, including efficientnet0.onnx.
- 1 ONNX models (.onnx files)
- 4 files, including 1 .md, 1 .h5, 1 .onnx
- Last updated 2025-04-25
ONNX files
| File | Size | Download |
|---|---|---|
| efficientnet0.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
EfficientNetB0 Eye Disease Classification Model Model Overview This is a pre-trained EfficientNetB0 model for eye disease classification, saved in HDF5 format (efficientnet0.h5). It classifies eye images into one of the following categories:
Classes:
Normal Diabetic Retinopathy Glaucoma Myopia AMD (Age-related Macular Degeneration) Hypertension Not an eye Image Others
Architecture: EfficientNetB0
Framework: TensorFlow/Keras
Task: Image Classification
Input: Images resized to 224x224 pixels, normalized to [0, 1]
Output: Predicted disease label (one of the above classes)
Usage To use this model for inference, you can load it using TensorFlow/Keras:
Install dependencies: pip install tensorflow pillow numpy
Load the model in Python: from tensorflow.keras.models import load_model model = load_model("efficientnet0.h5")
Preprocess your image (resize to 224x224, convert to RGB if needed, normalize), then run inference: from PIL import Image import numpy as np img = Image.open("your_image.jpg") img_d = img.resize((224, 224)) if len(np.array(img_d).shape) < 3: rgb_img = Image.new("RGB", img_d.size) rgb_img.paste(img_d) else: rgb_img = img_d rgb_img = np.array(rgb_img, dtype=np.float64) rgb_img = rgb_img.reshape(1, 224, 224, 3) predictions = model.predict(rgb_img) predicted_class = int(np.argmax(predictions)) classes = ["Normal", "Diabetic Retinopathy", "Glaucoma", "Myopia", "AMD", "Hypertension", "Not an eye Image", "Others"] predicted_disease = classes[predicted_class] if 0 <= predicted_class < len(classes) else "Unknown"
Notes
This model is hosted on Hugging Face for storage. The Inference API may not support .h5 models directly. For inference, you can download the model and run it locally, or deploy a custom backend (e.g., using Flask). The model expects images to be preprocessed as described above.
License Specify your license here (e.g., MIT, Apache 2.0).
Files (4)
Related models
More from muawiaimti
No other models by this author.
More models
No task type declared.