Spaces:
Running on Zero
Running on Zero
File size: 2,013 Bytes
95a86f7 d6ea92f 95a86f7 d6ea92f 95a86f7 d6ea92f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ---
title: ObjectModel-v1 Detection
emoji: 🔍
colorFrom: red
colorTo: green
sdk: gradio
sdk_version: 6.24.0
app_file: app.py
short_description: NMS-free COCO object detection with ObjectModel-v1
python_version: "3.12"
startup_duration_timeout: 30m
---
# ObjectModel-v1 — compact NMS-free object detection
Demo of [`bench-labs/objectmodel-v1`](https://huggingface.co/bench-labs/objectmodel-v1), a
40.8M-parameter clean-room object detector trained from scratch on COCO 2017
(AP 0.358 / AP50 0.544 at epoch 95).
The architecture compresses multi-scale pyramid features into a fixed 64-slot latent memory
for global semantics, then recovers geometry with query-conditioned local sampling whose
radius scales with each query's current box. Prediction is a fixed set of 300 object
queries trained with Hungarian matching — no anchors and no NMS.
## What this Space does
- Letterboxes the uploaded image to 640×640 (grey padding, ImageNet normalisation), exactly
as the upstream evaluation pipeline does.
- Runs a single forward pass of the released EMA checkpoint (`objectmodel_v1_best.pt`) on a
ZeroGPU worker.
- Takes the per-query max-sigmoid score, keeps the top-k above the confidence threshold, and
maps boxes back into original image coordinates.
- Renders boxes plus a table of `label / score / x0 y0 x1 y1`.
## Notes
- Small objects are the model's known weak spot (AP_small 0.188 vs AP_large 0.493), and
out-of-domain footage degrades faster than COCO-style photography.
- Because there is no NMS, overlapping duplicate boxes are suppressed by the set-prediction
training rather than post-processing; raising the confidence threshold is the intended way
to clean up marginal detections.
## Credits
Model and inference code © Bench Labs, Apache-2.0. The `objectmodel_v1/` package in this
Space is vendored unchanged from the model repository. Example images come from
[`linoyts/repo-to-space-example-inputs`](https://huggingface.co/datasets/linoyts/repo-to-space-example-inputs).
|