Downloads · 30 days
8
10% of all-time downloads
RahulKate-173/rt_detrv2_finetuned_trashify_box_detector_v2
rt_detrv2_finetuned_trashify_box_detector_v2 is a object detection model from RahulKate-173. Use it when you need objects located in an image. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of PekingU/rtdetrv2r50vd trained on the custom waste and environment object detection dataset mrdbourke/trashifymanuallabelledimages.
Downloads · 30 days
8
10% of all-time downloads
All-time downloads
77
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 model is a fine-tuned version of PekingU/rtdetr_v2_r50vd trained on the custom waste and environment object detection dataset mrdbourke/trashify_manual_labelled_images.
The model is designed to detect trash items, disposal bins, and hands or robotic arms interacting with waste in real-time or from static imagery. It is intended for integration into automated waste sorting facilities, smart recycling infrastructure, or robotic pickup pipelines.
This model should not be used in critical safety-first applications without human verification or generalized open-world object detection outside its predefined classes.
The model tracks 7 target classes specialized for waste interaction:
binnot_binhandnot_handtrashnot_trashtrash_armThe model was evaluated after completing 10 full training epochs using torchmetrics.detection.mean_ap.MeanAveragePrecision.
0.8721 (87.21%)0.9976 (99.76%)0.9629 (96.29%)0.40000.85570.8854| Class Name | mAP (Mean Average Precision) | mAR @ 100 (Mean Average Recall) |
|---|---|---|
bin | 0.9146 | 0.9576 |
hand | 0.8838 | 0.9190 |
not_bin | 0.7510 | 0.7833 |
not_hand | -1.0000 * | -1.0000 * |
not_trash | 0.7627 | 0.7951 |
trash | 0.9204 | 0.9400 |
trash_arm | 1.0000 | 1.0000 |
* Note on
-1.0000metrics: The random evaluation dataset split lacked representative ground-truth instances for thenot_handclass during the evaluation pass, yielding an expected placeholder value. This does not indicate model failure, but a data split constraint.
1e-4 (Optimized via CustomTrainer split)1e-51e-40.1from transformers import AutoImageProcessor, AutoModelForObjectDetection
import torch
# Load model and processor directly from Hugging Face Hub
model_id = "RahulKate-173/rt_detrv2_finetuned_trashify_box_detector_v2"
processor = AutoImageProcessor.from_pretrained(model_id)
model = AutoModelForObjectDetection.from_pretrained(model_id).to("cuda")
# Inference setup
inputs = processor(images=your_image, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model(**inputs)
# Post-process predictions
results = processor.post_process_object_detection(
outputs,
threshold=0.3,
target_sizes=[your_image.size[::-1]]
)[0]
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
print(f"Detected {model.config.id2label[label.item()]} with confidence {score.item():.2f}")