Spaces:
Running on Zero
Running on Zero
|
Download docs/specific-objects.md from muhammadpriv001/Object-Intelligence-Backend: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/spaces/muhammadpriv001/Object-Intelligence-Backend/resolve/main/docs/specific-objects.md
- Command line
-
hf download hf://spaces/muhammadpriv001/Object-Intelligence-Backend/docs/specific-objects.md
-
curl -L -o specific-objects.md https://huggingface.co/spaces/muhammadpriv001/Object-Intelligence-Backend/resolve/main/docs/specific-objects.md
1.41 kB
A newer version of the Gradio SDK is available: 6.29.1
Specific Object Recognition (Visual Embeddings)
Overview
Pipeline 3 answers the crucial question: "Is this the exact physical object I taught the platform previously?" (e.g., distinguishing "My Cup" from generic cups).
Object Reference Crop βββΊ Vision Embedding Backbone βββΊ 512-dim L2 Vector
β
Query Frame Crop βββββββΊ Vision Embedding Backbone βββΊ Cosine Similarity (>= 0.65) βββΊ Match "My Cup"
How Teaching Works
- Name & Metadata: User inputs unique object name (e.g. My Coffee Mug).
- Reference Photos: User uploads 3-10 reference photos from various angles and lighting.
- Feature Extraction: Deep PyTorch vision backbone extracts normalized vector embeddings.
- Vector Persistence: Embeddings stored in SQLite object database (
objects.db). - Real-time Recognition: Detected bounding box crops are continuously compared against stored embeddings.
Code Example
from object_intelligence import ObjectDetector
detector = ObjectDetector()
# Teach new object
detector.add_object(
name="My Blue Mug",
images=["mug_side.jpg", "mug_front.jpg"],
category="Drinkware",
description="Personal ceramic mug with handle"
)
# Run specific object recognition
detector.set_mode("specific")
detections = detector.detect(frame)