Color Attribute
The Color Attribute filter reads the color of each detected object in a video stream ("blue car", "white shirt", "black hoodie"). It runs after an object detector in an OpenFilter pipeline, reads the color of every detection box, and writes it back onto the detection so downstream filters and Webvis can use it.
VideoIn ──▶ object detector ──▶ filter-color-attribute ──▶ Webvis
✨ FeaturesDirect link to ✨ Features
- Color per detection — adds
color+color_marginto each entry inframe.data["meta"]["detections"]. - Color per garment, for people — a person is segmented and each garment read from its
own pixels, so the face, hair and background never pollute the answer. Eight garments:
upper,dress,pants,skirt,shoes,hat,bag,scarf. Detections too small to segment fall back to the whole-box read and say so, and are never dropped. - Search by garment word —
GARMENT_ALIASESmaps what an investigator types (hoodie,beanie,jeans,backpack) onto the garment the filter emits, so a query matches even though the filter names the region rather than the sub-type. - Score each object once — a tracked object's color freezes after a few agreeing reads, so a parked car costs a handful of forwards for as long as it stays parked instead of one per frame.
- Three engines, one config key —
siglip2(zero-shot, 70–83% on the benchmark, GPU),hsvandrgb(classical, no GPU). Swap withFILTER_METHOD, no rebuild. - Whole-frame fallback — with no detector upstream, reads the dominant color of the whole frame.
- Visualization topic — publishes a
vizstream with boxes and color names drawn. - Confidence-based abstention —
siglip2yields a margin; belowmargin_thresholdthe filter emits"unknown"instead of guessing (useful at night). - Prompt-driven — the color vocabulary is config, so the same filter extends to other namable attributes without retraining.
🛠️ Use CasesDirect link to 🛠️ Use Cases
- Tag every car and person in a street feed with its color, live, for later color search.
- Probe the dominant color of a feed or a pre-cropped single-object stream (whole-frame mode).
- Run a cheap no-GPU color pass (
hsv/rgb) where accuracy is secondary.
BackgroundDirect link to Background
Approach and benchmark (why SigLIP2 over classical CV, day/night handling, the search-vs-label decision): PlainsightAI/color-demo.