Auto-Labeling Unknown Objects: A Vision Model Pipeline for What Models Can’t See
From the publisher’s feed, collected in the ZeroLabs newsroom.
SAM3 + Grounding DINO + VLM: run several strategies in parallel and keep the best one for your object.1. Annotation Is a GrindTraining an object detector needs labeled data, and a lot of it. Getting that data by drawing bounding boxes by hand is miserable work, so I went looking for a way out.You know the loop. Open an image, find the object, drag a rectangle around it, move to the next one. Then do that a few thousand more times. It’s slow, it wears you down, and you start missing things once your attention slips. Nobody enjoys it.Open-vocabulary models like Grounding DINO and SAM3 looked like they might save me. Type “cat” and they find cats. Type “traffic light” and they get it. So the obvious question: can they label my objects too?If the model already knows the concept, sure. For anything inside an open-vocabulary model’s training vocabulary, a text prompt is enough to auto-generate annotations you can actually use.The interesting case is when the model has never seen your object.For this experiment I went with shrimp in underwater footage. Feed “shrimp” to Grounding DINO and here’s what comes back:"shrimp" → Recall = 0.000"fish" → Recall = 0.761"crab" → Recall = 0.843Zero. Not low confidence, zero detections. The word “shrimp” simply isn’t in the model’s vocabulary. I tried 11 vision models across both text and visual prompting, and not one of them could reliably detect shrimp from reference images alone.What This Article CoversI built a pipeline that auto-labels unknown objects from a handful of reference crops. No object names, no fine-tuning, no iterative training.Full automation was never the goal. The point is to change what the work feels like:Before: open each image, hunt for the object, draw a box from scratchAfter: look at pre-generated candidate crops and hit Accept or RejectNo more searching, no more drawing, just making calls. Even that change on its own is a big throughput win.One caveat before we start. The results and settings here are specific to underwater shrimp, and a different object will have a different sweet spot. The pipeline is built to be tuned: you run several strategies in parallel and converge on whatever works for your object.2. Experimental SetupDatasetAAU Brackish Underwater Dataset (CC BY 4.0), underwater footage with six classes: crab, fish, jellyfish, shrimp, small_fish, starfish. None of them are in COCO-80, so they’re all genuinely unknown to a standard open-vocabulary detector.Target: shrimp, 76 instances across 1,467 validation images. Small, translucent, and easy to lose against the background.Hardware and ModelsGPU: NVIDIA RTX 5090 (32GB VRAM)SAM3: Segment Anything 3 (via Ultralytics, SAM3SemanticPredictor)Grounding DINO v1: text-guided detection (HuggingFace transformers)Qwen3-VL-8B: vision-language model, used here for environment detectionDesign Philosophy: Don’t Try to Nail It in One ShotGenerating annotations isn’t a real-time job. You build the labels once and then train on them as many times as you like, so there’s no reason to optimize for speed.What you do instead is run several approaches in parallel, compare the outputs, and keep whatever works best for your object. Run SAM3 at a few confidence levels. Generate a range of prompt templates. Mix verification methods. Look at all of it, then decide.No single approach wins everywhere. Each object has its own sweet spot. That “explore in parallel, then choose interactively” mindset is the foundation of the whole design.3. Baseline: Zero-ShotBefore building anything, I benchmarked what already exists. The most informative results from the 11 models I tested are below:Model Mode shrimp F1 Verdict──────────────────────────────────────────────────────────────────────────Grounding DINO v1 Text: "shrimp" 0.000 Not in vocabularyGrounding DINO v1 Text: all 6 classes 0.694 (overall) Best overallSAM3 Text 0.392 ModerateDINO-X API Text 0.119 Paid, and weakOWL-ViT v2 Visual 0.004 FailedYOLOE26 Text / Visual 0.018 / 0.002 FailedDINOv2 Prototype 0.000 FailedRex-Omni Visual 0.000 FailedQwen3-VL-8B VLM grounding 0.019 FailedTwo things stood out:Text prompts are the only path that works. All five visual-prompting approaches failed outright; reference images alone couldn’t carry an unknown object.For known objects, auto-labeling already works fine. The whole problem lives with the unknowns.4. Descriptive Prompts: Detecting What You Can’t NameThis is the part that unlocked everything else.GDino doesn’t know “shrimp.” But it does understand descriptions:"shrimp" → R = 0.000"underwater creature" → R = 0.553"small translucent creature" → R = 0.368The model can’t look up “shrimp” in its vocabulary, but it can match the visual idea of “underwater creature” against what’s in the image. GDino’s text encoder learned to tie descriptive phrases to visual features during pre-training. It just never ran into the specific word “shrimp.”Automating Prompt GenerationUsers shouldn’t have to guess which descriptions land. I use a VLM (Qwen3-VL-8B) to look at the reference crops and detect the environment on its own:Reference crop + full image → VLM → "underwater"→ Templates: "underwater creature", "underwater animal", "underwater organism"Why rigid templates instead of free-form VLM descriptions? Full explanation in Section 6, but the short version is that adjectives wreck GDino’s ability to discriminate.Discovery Is Where It All StartsDescriptive prompts can find shrimp now. The trouble is they also find everything else. GDino returns over 9,000 detections across the dataset, and only about 70 of them are real shrimp.Here’s the part that matters: you can’t annotate what you can’t find. No filter, however good, can recover a ground-truth object that never made it into the candidate pool. So Discovery, the share of GT objects captured at the candidate stage, is the first thing to get right.False positives you can always deal with later. A missed object is gone.5. The Key Shift: Segment First, Then ClassifyI tried filtering GDino’s full-image detections every way I could think of: CLIP similarity, confidence deltas, area filters, VLM verification, SVMs. The best any of them managed was getting about half the labels right.What actually worked was reframing the problem.The Old Way: Detect, Then Filter (didn’t work)Full image → GDino "underwater creature" → 9,145 detections (TP=69, FP=9,076)→ Filter → best result: half the labels wrongGDino’s full-image detections are noisy: overlapping boxes, several objects in one box, plenty of pure background. Sorting good from bad in that pile is hard.The New Way: Segment, Then Classify (worked)Full image → SAM3 segmentation → ~10K clean segments (1 crop = 1 object)→ each crop → GDino "underwater creature" → classification score→ threshold → high-quality labelsWhy it works: SAM3 produces non-overlapping masks with clean boundaries, so each crop holds exactly one thing. At that point GDino isn’t doing noisy detection anymore, it’s doing binary classification: is this crop an underwater creature or not? Telling TPs from FPs gets a lot easier.SAM3 Configuration MattersTwo settings made a real difference.First, domain-specific category words matter.SAM3 with ["object"] only: Recall = 53.9%SAM3 with ["animal", "creature", "object"]: Recall = 78.9%SAM3 is a vision-language model, so broad category words like “animal” pull its attention toward biological things in a way that “object” alone doesn’t. That’s a biology-specific tweak; another domain would want different words.Second, lowering confidence catches more TPs.SAM3 conf = 0.15: Recall = 60.5%, TP = 124SAM3 conf = 0.10: Recall = 80.3%, TP = 215 (+73%)You pick up more false positives on the way, but the GDino classification step downstream cleans those up. The best threshold depends on the object, which is why you run several and compare.from ultralytics.models.sam.predict import SAM3SemanticPredictorpredictor = SAM3SemanticPredictor(overrides={ "model": "sam3.pt", "conf": 0.10, "imgsz": 1008})predictor.prompts = {"text": ["animal", "creature", "object"]}results = predictor(image_path)predictor = SAM3SemanticPredictor(overrides={ "model": "sam3.pt", "conf": 0.10, "imgsz": 1008})predictor.prompts = {"text": ["animal", "creature", "object"]}results = predictor(image_path)One catch: SAM3’s auto-segmentation mode isn’t exposed in the Ultralytics API. You have to use SAM3SemanticPredictor with text prompts.6. Full Automation: What VLMs Should and Shouldn’t DoThe segment-then-classify pipeline worked, but I was still hand-picking the prompts. For it to be reusable, the whole thing has to run on its own.The Adjective TrapFirst attempt: let the VLM write rich descriptions like “smooth undersea item” or “pale round organism.” Seems reasonable. Then I tested it against 9,318 SAM3 crops:Gap = GDino’s TP-vs-FP mean score gap; higher is better.Prompt Gap Note──────────────────────────────────────────────────────────────────"underwater animal" 0.144 2-word template"underwater creature" 0.136 2-word template"pale underwater animal" 0.138 +1 adjective"small underwater creature" 0.122 +1 adjective"underwater smooth round organism" 0.034 +3 adjectives, 4x worseThe more adjectives you pile on, the worse GDino gets at separating TPs from FPs. The reason is that GDino’s text-image matching is a coarse category judgment. Words like “smooth” and “round” match the target crops and the background crops about equally well, so the gap collapses.So the VLM’s job is narrow: just detect the environment.VLM → ENV = "underwater"→ Templates: "underwater creature", "underwater animal", "underwater organism"Again, this is what I found for shrimp, and adjectives might help for other objects. That’s exactly why you generate several prompt candidates, let GDino’s discriminative screening rank them, and go with whatever the data picks.The SAM3 Prompt Contamination ProblemA subtler one. The VLM-generated prompts (“smooth undersea item” and friends) were being handed to SAM3 alongside the template prompts. They didn’t just fail at classification, they actively pulled SAM3’s segmentation in the wrong direction:SAM3 with base + VLM prompts: TP = 173SAM3 with base + templates only: TP = 215 (+24%)The fix: feed only the template prompts to SAM3, and keep everything else for the GDino classification step.Fully Automated ResultsMetric Manual Automated───────────────────────────────────────Human intervention 3 steps 0Label quality Good ComparableThe automated pipeline matches the manual version with no human in the loop. The whole flow, from reference crops to labeling data, runs unattended.7. Discovery: Capturing 96% of Ground TruthWith the pipeline automated, the next question is how many GT objects actually land in the candidate pool. That’s the Discovery rate, and it caps everything downstream. What you don’t find, you can’t annotate.SAM3 + GDino ComplementSAM3 at conf=0.10 catches 61 of 76 GT objects. Running GDino directly on the full images picks up some of what SAM3 misses, because the two models fail in different ways:SAM3 alone: 61/76 GT (80.3%)+ GDino complement: 73/76 GT (96.1%) +16 pointsThat puts 96% of GT objects in the pool, which is the ceiling for what we can label.The trade-off: the GDino complement adds 4,241 extra candidates, and only 18 of them (0.4%) are true positives. A lot more candidates, almost all of it noise. What you do with that depends on your verification strategy.Annotation QualityDiscovery means nothing if the boxes are junk. They aren’t:Mean IoU vs GT: 0.799GT objects with IoU ≥ 0.7: 86%I went through all 73 overlay images by eye. The boxes track the shrimp outlines closely. Pixel-perfect isn’t the goal; what matters is whether a human reviewer would accept them as-is, and they would.The GDino Complement Trade-offWhether to use the complement depends on the object:If SAM3 alone already gives you enough Discovery (say 90%+), skip the complement. It only adds FPs.If SAM3 comes up short (80% to 96% in this case), the complement is a big win.Same theme as everywhere else: don’t commit upfront, run it both ways and compare.8. Verification: Separating Signal from NoiseDiscovery puts 96% of GT in the pool. Now it has to be sorted.Automated Verification AttemptsI wanted to filter down to TPs automatically. A few attempts:Method Result Issue──────────────────────────────────────────────────────────────────────────────────────────────CLIP cosine similarity Near-zero discrimination Underwater crops look too alikeVLM "Is this a creature?" Too many TPs rejected VLM can't judge small, blurry cropsGDino threshold (+ supplements) Supplement FPs swamp it Only 0.4% of supplements are TPsFor shrimp, fully automatic verification hit a wall. But that’s a shrimp-specific result. For more visually distinct objects, or domains where CLIP has better coverage, automatic verification might work a lot better.A Better Use for GDino ScoresGDino scores aren’t reliable enough to filter on automatically, but they’re good for something else: ordering human review.Higher-scoring candidates are more likely to be TPs, and the lower-scoring ones are mostly FPs. Sort by score, review from the top, and stop once you have enough labels.Strategy GT coverage Review time──────────────────────────────────────────────────────Auto-accept high scores only 30% 0hAuto + review top tier 54% ~1hAuto + review mid tier 83% ~2hFull review 96% ~4hWhere you draw the line comes down to how many labels you need and how much time you can spare.9. Not Replacing Humans, Just Making Them FasterThis pipeline doesn’t fully automate annotation. But “can it replace humans” was the wrong question to begin with. The real one is how much faster it makes them.Before vs AfterWithout the pipeline (traditional annotation):Open 1,467 underwater images in a viewerScan each one for shrimp (small, translucent, easy to miss)Draw boxes from scratch for every one you findRepeat. Miss a few. Lose focus. Make mistakes.With the pipeline:Run the pipelineReview pre-generated candidate crops with boxes already drawnAccept or reject each oneExport the accepted labelsThe cognitive load is completely different. No hunting for objects, since the pipeline already found 96% of them. No drawing boxes, since the ones at IoU = 0.80 are ready to go. You’re just making yes/no calls.This isn’t automation falling short. It’s a sensible split of labor: the pipeline does the heavy part (detection and candidate generation), and the human does the easy part (deciding yes or no).10. Pipeline Overview: Customization AxesThree phases, each with a knob worth tuning per object.PHASE 1: Prompt Generation VLM → environment detection → template prompts Customization axis: CATEGORY NOUNS Biology: creature, animal, organism Industrial: part, component, piece (untested) Medical: lesion, tissue, mass (untested)PHASE 2: Discovery SAM3 primary segmentation + GDino complement detection (optional) Customization axis: COMPLEMENT ON/OFF SAM3 sufficient → complement OFF (fewer FPs) SAM3 insufficient → complement ON (higher Discovery)PHASE 3: Verification GDino classification scoring → review / auto-accept Customization axis: VERIFICATION STRATEGY High GDino gap → lean into auto-accept Low GDino gap → lean into human reviewOUTPUT Labeling data (bboxes + class name)Parallel Exploration, Then Interactive SelectionYou can’t know the best configuration up front. So:Run SAM3 at several confidence levels (0.10, 0.12, 0.15) and compare the TP/FP trade-offGenerate several prompt templates and let GDino’s discriminative screening rank themTry it both with and without the GDino complement, weighing Discovery against FP volumeLook at the results, then pick a strategy; the GDino gap tells you which verification approach fitsAll of this runs offline. A single pipeline run gives you everything you need to make the call, and from there you tune based on what the data shows for your object.A different object, say defect inspection on an assembly line, will land on a different setup. That’s expected. The pipeline just gives you the tools to find it.What the Pipeline RequiresInput: 1 to 3 reference crops, 1 full-scene image, and a class name.What it doesn’t need:an object name the model already knowsmodel fine-tuningiterative training loopsreal-time inferencea large labeled dataset11. TakeawaysUnknown objects need a different approach. Open-vocabulary detection fails outside the model’s training vocabulary, and descriptive prompts (“shrimp” → “underwater creature”) bridge the gap.Segment first, then classify. Running GDino on full images makes filtering nearly hopeless. Segment with SAM3 first, classify the individual crops with GDino, and discrimination jumps.Let the VLM detect the environment and nothing more. Adjective-heavy VLM descriptions hurt GDino’s discrimination. The best prompt is just “{environment} {category noun}.” Again, that’s a shrimp finding and may not hold everywhere.Discovery sets the ceiling. You can’t annotate what you can’t find. SAM3 plus the GDino complement captured 96% of GT, with box quality at IoU = 0.80, which is fine for annotation.Don’t try to get it right in one shot. Run multiple confidence levels, prompt variants, and complement settings in parallel, review interactively, and converge on the best setup for your object. Annotation is offline work, so spend the compute.Don’t replace humans, make them faster. Going from drawing boxes to accepting or rejecting pre-made candidates cuts both the cost and the mental load.Every object is different. Everything here is tuned for shrimp, and a different object will call for different settings. The customization axes (category nouns, Discovery strategy, verification strategy) exist for exactly that reason.AppendixA. Detailed ComparisonFor anyone who wants the full picture. Of the 27 methods I tried, the most informative are below.Verification methods:Method Verdict Notes───────────────────────────────────────────────────────────────────v4.4 fixed (auto) best best fully automatedSAM3(+VLM, c=0.10) → GDino good best with manual promptsSAM3(+VLM, c=0.15) → GDino good highest precisionv4.3 template (auto) ok first auto successSAM3 → GDino ok first segment-then-classifySAM3 → CLIP LR ok learning-basedCLIP SVM ok high precision, low recallQuad filter failed best detect-then-filter resultv5.1 GDino + VLM failed VLM verification too limitedCLIP similarity failed ineffective underwaterMulti-prompt intersection failed same region every promptDiscovery methods:Method GT coverage Notes───────────────────────────────────────────────SAM3(c=0.05)+GDino 98.7% FP explosionSAM3(c=0.10)+GDino 96.1% practical bestGDino v1 t=0.15 90.8% standaloneSAM3 c=0.10 80.3% primary methodSAM3 c=0.15 60.5% conservativeB. Key Negative ResultsDead ends, in case they save you some time:GDino scores don’t predict correctness. A high score doesn’t make something a TP, so you can’t threshold your way out.More reference images can make things worse. Averaging dilutes the discriminative signal.CLIP couldn’t separate underwater crops. A domain limitation.Multi-prompt intersection doesn’t filter. GDino lands on the same region regardless of prompt.Letting the VLM choose SAM3’s base nouns fails. It picks the wrong words and recall drops.C. ReferencesModels and libraries:SAM3 (Segment Anything 3), Meta (SAM License)Grounding DINO v1, IDEA Research (Apache 2.0)Qwen3-VL-8B, Alibaba Qwen (Apache 2.0)CLIP ViT-L/14, OpenAI (MIT)Ultralytics, Ultralytics (AGPL-3.0)HuggingFace Transformers, HuggingFace (Apache 2.0)Dataset:AAU Brackish Underwater Dataset, Aalborg University (CC BY 4.0)Related:How to Accelerate SAM3 with TensorRT for Real-Time InferenceAll experiments ran on a single RTX 5090 (32GB VRAM).Auto-Labeling Unknown Objects: A Vision Model Pipeline for What Models Can’t See was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.