Blog

Engineering

When a car climbs a wall, only SAM3 still sees a car

Three fast COCO detectors and SAM3 watch a car drive up a wall and fly. On the ground the detectors find it; on the wall they lose it on most frames. SAM3 keeps it on 97%.

Tesla's recent Roadster demo has the car drive up a vertical wall, fly off it on thrusters, land in a cloud of smoke and do it again. It is a fun video. It is also a very good test for an object detector, because the object never changes - it is a car in every shot - but almost nothing about how the car looks matches the cars a detector was trained on.

So we ran four models on every frame of the 46-second clip and counted one thing: on how many frames did the model find a car?

TL;DR: On frames where the car is on the ground, the COCO specialists are fine - D-FINE-seg X finds the car on 95% of frames, at about 9 ms per frame. Once the car is on the wall or in the air, D-FINE X and D-FINE-seg X drop to 23% and 32%. SAM3, prompted with the single word "car", finds it on 97% of those frames. It is about 11x slower.

The setup

All four models ran on our production inference box (one NVIDIA H200), with the same preprocessing our platform uses.

Results

model frames with a car image-level recall p50 latency
SAM3 1,024 / 1,094 93.6% 94.6 ms
D-FINE-seg X 660 / 1,094 60.3% 8.6 ms
D-FINE X 579 / 1,094 52.9% 8.4 ms
RF-DETR L 316 / 1,094 28.9% 5.8 ms

One result we did not expect: the instance segmentation model finds more cars than the detection model - D-FINE-seg X is 7 points ahead of D-FINE X overall, 11 on the ground and 9 on the wall (only in smoke is D-FINE X ahead). Both are X-size models with the same inference code, but different checkpoints: the segmentation model is also trained to predict a mask for every object. A guess is that this extra task teaches it more about object shape, which helps when the car looks unusual. The training runs also differ in other ways, so we have not tested this.

The total hides the interesting part. Split the video by what the car is doing, and the story is clear:

scene frames SAM3 D-FINE-seg X D-FINE X RF-DETR L
car on the ground 494 100% 95% 84% 30%
car on the wall or in the air 432 97% 32% 23% 21%
landing in smoke 168 68% 33% 38% 45%

On the ground, D-FINE-seg X is almost as good as SAM3 and 11x faster. This is the domain it was trained for: a car, wheels down, seen from the side or the front. Put the same car on a wall and the specialists lose 68-79% of the frames. SAM3 loses about one in thirty.

Where the specialists lose the car

Here is one frame from the top of the wall. The car is large, sharp and well lit. SAM3 finds it with a score of 0.95. None of the three specialists returns a car box at all:

The car at the top of the wall, in four panels. SAM3 boxes it as car 0.95. RF-DETR L, D-FINE X and D-FINE-seg X, with only the car class enabled, find no car.

The clip at the top of the post shows six seconds of the climb and the jump. For the first second the car is still on the ground, and all four models find it. Once it turns onto the wall, D-FINE X does not find it again for the rest of the clip, and D-FINE-seg X and RF-DETR L find it only now and then. SAM3 finds it on all but 3 of the 144 frames.

Why SAM3 holds up

SAM3 is not a better-tuned car detector. It does not have a fixed list of classes at all. You give it a short text prompt, and it finds and segments every instance of that concept in the image. It learned this from a very large and very diverse training set, so its idea of "car" is not limited to cars on roads seen from the street.

That is the whole difference. For the specialists, a car on a vertical wall at night with rocket exhaust is a large shift from their training data. For SAM3 it is a small one. The same property lets SAM3 handle the new car design itself - the shape of this car is not in COCO either.

The price is speed. At 95 ms per frame, SAM3 is 11-16x slower than the specialists. On one GPU that is the difference between about 10 frames per second and more than 100.

So which one should you use?

Both, for different jobs:

Keeping it honest

FAQ

What is domain shift in object detection?

Domain shift is the gap between the images a model was trained on and the images it sees in production. A COCO detector learned cars mostly from street photos. A car driving up a vertical wall at night is far outside that, so the detector's recall drops, even though the object is still a car.

Is SAM3 better than D-FINE or RF-DETR for car detection?

Not in general. On normal driving footage in this test, D-FINE-seg X found the car on 95% of frames against SAM3's 100%, at about 11x lower latency. SAM3's advantage is robustness: on the wall and in the air it stayed at 97% while the COCO detectors fell to 21-32%.

How fast is SAM3 compared to D-FINE and RF-DETR?

On an NVIDIA H200, the median round trip for one frame was 94.6 ms for SAM3, 8.6 ms for D-FINE-seg X, 8.4 ms for D-FINE X and 5.8 ms for RF-DETR L.

Can SAM3 detect objects it was not trained on?

SAM3 is prompted with text, so it has no fixed class list. It found the car in this video zero-shot, with no fine-tuning and only the prompt "car", including a new car design in poses that are rare in any training data.

Written by

Argo Saakyan
Argo Saakyan
Principal Computer Vision Engineer, Agnify

Author of D-FINE-seg. Works on turning always-on camera feeds into operational answers at Agnify. Writes about computer vision, spatial AI, and what the footage on the floor is really telling you.

LinkedIn

More from the blog