764 Bytes per Pixel: Notes from the comma Video Compression Challenge
I spent a week trying to beat the top of comma.ai's video compression challenge. I didn't. What I got instead was one number I think every entrant should know before writing a line of code, a dead idea that I can now prove is dead, and a measurement rig precise enough to tell a 0.3% gain apart from noise — which is how I found out my idea was noise.
I'm a PhD student in Computer Science and Engineering at Ohio State, and I'm looking for a Summer 2027 internship. That's the reason this is going on the blog instead of into a notes folder.
The game
One minute of dashcam video: 0.mkv, 37.5 MB, 1164×874, 20 fps, 1200 frames — a rainy night on the highway, 600 frame pairs. Compress it. Then the score:
1 | |
The thing that makes this challenge interesting is what "distortion" means. Nobody compares pixels.
- SegNet is a
UNet(efficientnet_b2)doing 5-class semantic segmentation at 512×384. It looks only at the second frame of each pair, and distortion is the fraction of pixels whose argmax class changed. - PoseNet is a
FastViT-T12that takes two consecutive frames and predicts ego-motion; distortion is the MSE of the first 6 dimensions. - Rate is archive size over 37.5 MB.
So you are not asked to reconstruct the video. You are asked to reconstruct the two networks' opinions about the video, and the 5 classes turn out to be brutal in a useful way: sky, trees, road signs and streetlights are all one class called "background"; a windshield wiper gets classified as a vehicle.
The leaderboard right now: #157 at 0.103, archive 136 KB. The reference baseline_fast is 4.39.
The only exchange rate you need
Take the score apart and everything becomes a currency question. One byte of archive costs 6.66e-7 points. One pixel wrong in one frame costs 5.09e-4. Divide:
1 | |
That is the whole competition. Every design decision is "am I willing to be wrong here so I can be smaller there", and for the leaderboard's solution the answer is no, almost everywhere: 88% of #157's score is still rate, and it only gets 23 pixels wrong per frame. It is not compressing video anymore; it is transmitting a very carefully maintained lie about a video.
My idea
Storing pixels is wasteful. A driving scene is mostly structure:
- There are three regions — sky, hood, road — and the first two do not matter at all. Replace them with something flat.
- Lane markings are straight line segments. Store them as vectors; it is both smaller and "better for driving models".
- Vehicles are contours. Taillights, oncoming headlights, reflections on the hood, raindrops on the windshield — none of that can possibly matter.
- The wiper sweep does matter. Handle it separately.
- Extreme version: describe the whole frame as layered vector polygons and rebuild it.
I wrote that down as five bullets, then spent the week finding out which of them survive contact with the metric. Each bullet became a question I could answer in bytes and pixels.
Eleven experiments, one honest table
Every experiment is scored in the same unit: bytes saved, and pixels of SegNet disagreement bought. Hardware was a laptop 5080 with 16 GB.
| # | Question | Answer |
|---|---|---|
| E0 | What does SegNet actually see? | 5 classes, 72.5% of pixels never change class; wiper = vehicle |
| E1 | Can I render without a neural renderer? | No. Best naive render: 1,662 px/frame wrong |
| E2 | How many bytes is the class map, losslessly? | 232 KB with spatial context, vs 401 KB for xz |
| E3 | Does road-plane motion help? | Yes, −12% (185 → 163 KB) — but #157 already does this |
| E5 | Can I just lie about the class map? | ~−0.003 score. The leaderboard already does it |
| E6/E7 | Vector lanes + vehicle motion as coding context | −11.1% on a weak baseline |
| E8 | Same idea, but on #157's real token maps | −1.5% |
| E9 | Same idea, on top of #157's real encoder | −0.3%, and negative after parameter costs |
| E10 | Rebuild the whole frame as vector polygons | 2.6–11× worse than #157 |
What killed it
The metric rewards reproducing SegNet's mistakes. In the far field, SegNet's class boundaries are not straight, and they are not noise either — they are irregular aliasing artifacts with a specific shape. A vector description produces the correct line; SegNet wants the squiggly one. At 764 bytes per wrong pixel per frame, being geometrically right is expensive.
The regions I wanted to delete were already free. The hood, including reflections, costs about 8 KB total across the whole video. The sky costs approximately nothing. I had a great plan for throwing away the cheapest things in the file.
Vector replacement is not new and does not work. PR #140 tried parametric lane curves replacing dense lane tokens; every variant was larger, the best being 1.7× the original. My own E10 agrees from the other direction: with 291 KB of polygon vertices I still get 73 px/frame wrong, where #157 gets 23 px/frame wrong in 116 KB.
And as a coding hint, the gain evaporates as the encoder gets better. This is the part that stings:
- weak baseline (context table + small MLP): −9.4%
- strong baseline that replicates every context #157 uses (7-neighbourhood, previous frame, t−2, road-plane warp, row/column position): −1.5%
- actual #157 encoder, measured on real probabilities: −0.3%
A large enough neighbourhood plus motion compensation already implies "lanes are locally straight". I was not adding information; I was adding a slower way to express information the encoder had.
Where the bytes actually go
The useful part came from refusing to trust my own baselines. To measure a real effect I decoded #157's archive with its own decoder and recorded, for every single token, the real 5-class probability it fed into its range coder. Then I could finally ask where its bytes go.

2.2% of the pixels eat 95% of the bytes. The interior of a region costs essentially nothing (4.7 KB for the whole video). Boundaries cost 98.2 KB.
Within that, 52% is the road/lane seam — the single most expensive object in the video is the edge between asphalt and paint at 40 metres. 73% of all bytes sit in rows 160–224, the far field near the horizon. And it is not the whole frame changing: only 1.25% of pixels differ from the previous frame, and those consume 58.2 KB of the total.
If you want to beat 0.103, you need to save about 19.5 KB. There is no version of that which does not involve the far-field lane boundary. That single sentence is what I got out of the week.
The bit I'm actually proud of
Anybody can get a percentage improvement on a weak baseline. The reason I trust my negative result is that I built the rig to measure the real thing:
- Decode the leaderboard's archive with the leaderboard's decoder, and hook the range coder to record the true probability of every symbol.
- Verify the hook: the summed code length is 105,371 bytes; the actual token stream in the archive is 105,372 bytes. One byte of error over 105 thousand.
- Train a one-level corrector on top of the frozen encoder, zero-initialised so the starting point is #157. Any gain is a real gain in the real encoder.
- Always include a control: a corrector with no new inputs at all.
The control is what saved me. It turns out that a corrector allowed to see nothing but its own context buys 0.28 KB just from re-calibration. Adding all my lane geometry buys 0.32 KB over that. The parameters to encode the corrector cost more than both. Without the control I would have written "lane geometry saves 0.6 KB" and believed it.
That rig is reusable for any idea on this leaderboard: 4 minutes per decode, and it will tell you in an afternoon whether your idea is a 2% idea or a 0.3% idea.
What I got wrong
In the interest of the thing being useful:
- One video. Everything here is measured on 1,200 frames of night rain. The challenge ships
test_videos.zipwith 64 more videos; I did not run them. - My estimators are weaker than the real encoder. My best context model needs 159 KB where #157's needs 116 KB. Gains measured against a strong-but-not-real baseline are upper bounds.
- I never retrained HPAC with lane channels. I bolted a corrector on top instead. Retraining might buy something, but the strong-baseline experiment says the ceiling is around 1.5%.
- E10 assumes a perfect renderer, and my vector bitstream is entropy-coded in a lazy way. The real gap would be worse, not better.
What I'd do next
The far field. 73% of the bytes, on lane and road-edge boundaries that jitter frame to frame. Two routes I have not ruled out:
- Move the burden into the renderer. Let the far-field class map be coarse, and train the renderer jointly so it still produces an image SegNet classifies correctly. Right now the class map is treated as ground truth and the renderer merely obeys; the encoder and renderer should be negotiating.
- Change the representation premise. Every submission so far stores a per-pixel class map, then renders. If the far field is 2% of pixels but 73% of bytes, maybe it should not be a pixel map at all.
And the honest small one: if the constraint were CPU-only decoding or a much smaller encoder, the vector lane hint is worth a real −8%, because there you are not competing against a conv net with a 7×7 receptive field.
I'd be glad to hear from anyone who has attacked the far-field jitter — especially if you concluded it is hopeless for a reason I have not thought of.
How much of this is AI?
The idea, the decomposition into three questions (rate, renderer, motion), the decision gates ("≥8% on a weak baseline before spending a day on the real one", "≥5% on the real encoder before writing a submission"), and every decision to kill a line came from me. Claude Code wrote and ran the experiment code under my direction and produced the internal report; the post itself was drafted with AI assistance from that report.
I want to be explicit about it because comma's policy is deliberately strict — no AI-written PR descriptions, no AI-written submissions. I'm not submitting anything here. This is a write-up of a dead end, and the dead end is documented in my own logs: script names, commands, one bug I had to fix (my first corrector trained only on hard pixels, unweighted, and "improved" the code length by 170 KB in the wrong direction).
About me
I'm a PhD student at Ohio State, and I like problems where the unit of progress is a byte and you have to build the instrument before you can trust the number. This challenge was that, and even a negative result was worth a week.
I'm looking for a Summer 2027 internship in ML systems, inference optimization, or anything codec-shaped — compression, on-device deployment, evaluation infrastructure. I'm on an F-1 visa, so a summer internship goes through CPT.
Find me on GitHub.
Thanks to the people ahead of me on the leaderboard, especially darskkaa (#157, and #151/#140 before it) for publishing a decoder that made this measurement possible, and #140/#146/#150 for negative results that lined up with mine.