Downloads · 30 days
28
13% of all-time downloads
Tahira96/rtdetr-blood-cell-detection
rtdetr-blood-cell-detection is a object detection model from Tahira96. Use it when you need objects located in an image. It is set up for transformers. The card lists the license as mit.
This is a fine-tuned RT-DETR (Real-Time DEtection TRansformer) model for detecting blood cells in microscopy images. The model can detect three types of cells:
Downloads · 30 days
28
13% of all-time downloads
All-time downloads
214
Public
Parameters
42.9M
172 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors172 MB · 100%
From the Hugging Face model README
This is a fine-tuned RT-DETR (Real-Time DEtection TRansformer) model for detecting blood cells in microscopy images. The model can detect three types of cells:
import torch
from transformers import RTDetrForObjectDetection, AutoImageProcessor
from PIL import Image
# Load model and processor
model = RTDetrForObjectDetection.from_pretrained("Tahira96/rtdetr-blood-cell-detection")
processor = AutoImageProcessor.from_pretrained("Tahira96/rtdetr-blood-cell-detection")
# Load image
image = Image.open("blood_smear.jpg")
# Preprocess
inputs = processor(images=image, return_tensors="pt")
# Inference
with torch.no_grad():
outputs = model(**inputs)
# Post-process results
target_sizes = torch.tensor([image.size[::-1]])
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.5)[0]
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
print(f"{model.config.id2label[label.item()]}: {score:.3f}")
Trained on BCCD dataset.