01
No clean photo
There was no clean capture of the testbed sign, so nothing showed what sits under the sticker.
AI SECURITY · PHYSICAL TESTBED
A printed sticker on a stop sign made our test car's detector miss more than half of its approach frames. I built a small network that paints the sticker out of the camera image, so the same detector gets a second, clean look.

THE GAP
On our QCar2 testbed, a printed patch on the physical stop sign dropped the car's YOLOv8s detector from reliable detection to missing more than half of the approach frames. My teammates built the attack and a flagger that watches the detector's confidence for signs of trouble.
Flagging an attack does not make the sign visible again. My part was the next step: clean up the flagged frame so the same detector can read the sign.
01
There was no clean capture of the testbed sign, so nothing showed what sits under the sticker.
02
A fix that alters clean signs, or loses a detection the car already had, is worse than none.
03
Picking checkpoints by synthetic image quality gave a model that looked great in simulation and hurt real crops.
WHAT IT DOES
The restorer is a 3.35M-parameter U-Net with two heads: one paints a repair, the other predicts a mask of where the sticker is. The repair is blended in only where the mask says sticker, so a clean sign passes through almost unchanged, and the mask area doubles as a tamper signal. It is meant to run only on frames the flagger raises, and it gives the same detector a cleaner picture instead of replacing it.
The output is m·g + (1 − m)·x, so pixels the mask calls clean pass through. Clean signs barely change.
Synthetic sticker pairs matched to the real sign's color, noise and scale, plus real crops where the loss ignores the sticker.
Fine-tuning pushes up the deployed detector's stop-sign confidence, and checkpoints are picked on real crops with a heavy penalty for collateral change.
3.35M parameters. 1.4 ms per 256 px crop on a workstation GPU in FP16, about 24 ms on a CPU.
HOW IT WORKS
The deployed YOLOv8s runs on every camera frame as the car approaches the sign.
My teammates' flagger watches the confidence stream and raises frames that look attacked.
The sign is boxed, cropped square at 1.15× the box, and resized to 256 px.
The U-Net predicts a sticker mask and a repair, and changes only masked pixels.
The restored crop goes back into the full frame, matching how the car detects.
The same detector takes a second, clean look, and the car decides.
SYSTEM DESIGN
The detector, attack and flagger came from my teammates; the restorer, its training data and its evaluation are mine. In testing, a stock COCO model boxes the sign because the patch does not fool it; on the car, that box would come from tracking.
Input
QCar2 camera frame
approach frames with the attacked sign
Flagger
teammates' anomaly check on detector confidence
Localize
Sign box
stock COCO YOLOv8s, not fooled by the patch
Square crop
1.15× the box, resized to 256 px
Restore
U-Net encoder-decoder
3.35M parameters, bilinear upsampling
Two heads
repair image g and sticker mask m
Composite
out = m·g + (1 − m)·x
Decide
Paste back
restored crop returns to the full frame
Deployed YOLOv8s
trained on compressed GTSRB, stop class
RESULTS
76%
of attacked frames with the stop sign detected after restoration, up from 48%
7 of 13
missed frames that flipped back to detected
0
frames where restoration took away a detection the car already had
0.13/255
mean pixel change when the input is a clean sign
Scored offline against the deployed detector on 25 full frames from one attacked run, at a 0.25 confidence threshold; the clean-sign check uses synthetic signs, since no clean photo of the testbed sign exists.
WHAT IT TAUGHT ME
The model that worked was the one allowed to do less. My first version regenerated the whole sign and changed pixels outside the sticker by 13.4/255 on average; compositing brought that down to 0.13/255. The six frames it still misses all have the sticker over parts of the sign the detector needs, and a bigger training run, with four times the batch and an extra perceptual loss, did not beat the final checkpoint. The fix is data: a clean photo of the real sign would give the repaint a true target.
BUILT WITH
Like what you see?
Thanks for reading. There's more where this came from.