Views
No views yet
mrdbourke/trashify_manual_labelled_images.binnot_binhandnot_handtrashnot_trashtrash_armtorchmetrics.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.11from transformers import AutoImageProcessor, AutoModelForObjectDetection
2import torch
3
4# Load model and processor directly from Hugging Face Hub
5model_id = "RahulKate-173/rt_detrv2_finetuned_trashify_box_detector_v2"
6processor = AutoImageProcessor.from_pretrained(model_id)
7model = AutoModelForObjectDetection.from_pretrained(model_id).to("cuda")
8
9# Inference setup
10inputs = processor(images=your_image, return_tensors="pt").to("cuda")
11with torch.no_grad():
12 outputs = model(**inputs)
13
14# Post-process predictions
15results = processor.post_process_object_detection(
16 outputs,
17 threshold=0.3,
18 target_sizes=[your_image.size[::-1]]
19)[0]
20
21for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
22 print(f"Detected {model.config.id2label[label.item()]} with confidence {score.item():.2f}")