Blood Cancer Resnet18
Fine-tuned ResNet18 for classifying blood cell images into 4 classes.
Modellquelle
- Art
- Other
- Dateigröße
- 42,6–42,7 MB
- Version
- vRevision 4bf6639
- Aktualisiert
- 24. Okt. 2026
- Downloads
- 4
- Quelle
- Hugging Face
Quellenbeschreibung
Blood Cell Cancer Classifier (ResNet18)
Fine-tuned ResNet18 for classifying blood cell images into 4 classes.
Classes
- Benign
- Malignant Pre-B
- Malignant Pro-B
- Malignant early Pre-B
Performance
- Validation Accuracy: 99.38%
Usage
from huggingface_hub import PyTorchModelHubMixin
import torch.nn as nn
from torchvision import models
class BloodCancerResNet18(nn.Module, PyTorchModelHubMixin):
def __init__(self, num_classes=4):
super().__init__()
base = models.resnet18(weights=None)
base.fc = nn.Linear(base.fc.in_features, num_classes)
self.model = base
def forward(self, x):
return self.model(x)
model = BloodCancerResNet18.from_pretrained("your-username/blood-cancer-resnet18")
model.eval()
Training Data
Trained on the Blood Cell Cancer ALL-4class dataset.
Quellen
1 Quelle
Quellen
1 QuelleVerifiziert 19. Aug.
Modellartefakte
2 Artefakte
Modellartefakte
2 ArtefakteQuellenauszüge
2 Auszüge
Quellenauszüge
2 Auszüge--- license: mit tags: - image-classification - pytorch - medical-imaging - resnet18 --- # Blood Cell Cancer Classifier (ResNet18) Fine-tuned ResNet18 for classifying blood cell images into 4 classes. ## Classes 0. Benign 1. Malignant Pre-B 2. Malignant Pro-B 3. Malignant early Pre-B ## Performance - Validation Accuracy: 99.38% ## Usage ```python from huggingface_hub import PyTorchModelHubMixin import torch.nn as nn from torchvision import models class BloodCancerResNet18(nn.Module, PyTorchModelHubMixin): def __init__(self, num_classes=4): super().__init__() base = models.resnet18(weights=None) base.fc = nn.Linear(base.fc.in_features, num_classes) self.model = base def forward(self, x): return self.model(x) model = BloodCancerResNet18.from_pretrained("your-username/blood-cancer-resnet18") model.eval() ``` ## Training Data Trained on the [Blood Cell Cancer ALL-4class dataset](https://www.kaggle.com/datasets/mohammadamireshraghi/blood-cell-cancer-all-4class).
Source context: 4 downloads · 0 likes · Pipeline image-classification · Repo NaumanHa/blood-cancer-resnet18
