YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
ResNet-18 Peripheral Blood Cell Classifier
Model Description
This is a ResNet-18 model fine-tuned for peripheral blood cell (PBC) classification using fastai. The model can classify blood cell images into 8 different cell types with 98.07% validation accuracy.
Model Details
- Model Type: ResNet-18 with transfer learning
- Framework: fastai (version <2.8.0)
- Task: Image Classification
- Dataset: Peripheral Blood Cell (PBC) dataset
- Classes: 8 cell types
- Validation Accuracy: 98.07%
Cell Types
The model can classify the following blood cell types:
- Basophil - A type of white blood cell involved in inflammatory reactions
- Eosinophil - White blood cells that fight parasites and allergic reactions
- Erythroblast - Immature red blood cells
- IG (Immature Granulocyte) - Immature white blood cells
- Lymphocyte - White blood cells that fight infections
- Monocyte - Large white blood cells that become macrophages
- Neutrophil - Most common white blood cells that fight bacterial infections
- Platelet - Cell fragments that help blood clotting
Training Details
- Training Images: 13,674
- Validation Images: 3,418
- Architecture: Pretrained ResNet-18 backbone with custom head
- Training Strategy:
- 4 epochs with frozen backbone
- 6 epochs with fine-tuning
- Input Size: 224x224 pixels
- Preprocessing: Standard ImageNet normalization
Performance
- Validation Accuracy: 98.07%
- All cell types: >95% precision and recall
- Best performers: Eosinophil and Platelet (100% precision)
Usage
from fastai.vision.all import *
# Load the model
learn = load_learner('cell_classifier.pkl')
# Predict on an image
pred, pred_idx, probs = learn.predict('path/to/blood_cell_image.jpg')
print(f"Predicted: {pred}")
print(f"Confidence: {probs[pred_idx]:.2%}")
Requirements
fastai>=2.7.0,<2.8.0
numpy<2.0
pillow>=10.0.0
Model Files
cell_classifier.pkl- Complete fastai learner with model and preprocessingcell_classifier_weights.pth- PyTorch weights onlyconfusion_matrix.png- Validation confusion matrixclassification_report.csv- Detailed classification metricstraining_summary.json- Training configuration and results
Citation
If you use this model, please cite:
@misc{pbc-cell-classifier-2024,
title={ResNet-18 Peripheral Blood Cell Classifier},
author={Your Name},
year={2024},
howpublished={Hugging Face Hub},
url={https://huggingface.co/your-username/pbc-cell-classifier}
}
License
This model is released under the MIT License.
Created For
HuggingFace Agents-MCP-Hackathon Track 1 - MCP Tool/Server
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support