ph4ntom_drv (0.35)#74
Conversation
Neural semantic compression: 118K-param depthwise FiLM generator that reconstructs frames from SegNet masks + PoseNet pose vectors. 321 KB archive, 111x compression ratio.
|
Thanks for the submission @hypery11! 🤏 A maintainer will review your PR shortly. To run the evaluation, a maintainer will trigger the |
Eval Failed:
|
|
can you add your deps in your submission folder instead of project level? |
|
same as other PRs, please host the assets somewhere else, I would like to keep the repo lightweight |
|
Fixed both — reverted pyproject.toml change and moved deps install to inflate.sh. Removed assets from the repo, images are hosted on release assets now. Ready for re-eval whenever you get a chance. |
There was a problem hiding this comment.
can you revert this?
Eval Failed:
|
|
Synced pyproject.toml with master (brotli was already added by quantizr's merged PR). The previous eval failure was due to brotli not being in the uv environment. Should be fixed now — ready for re-eval. |
Eval Results:
|
Eval Failed:
|
|
@hypery11 Congratulations on making it onto the leaderboard! I hope you had fun competing in the challenge and learned something new along the way. If you are looking for a job or internship, please email [email protected] with a link to this PR. See you in the next challenge! |
submission name:
ph4ntom_drv
upload zipped
archive.ziparchive.zip
report.txt
does your submission require gpu for evaluation (inflation)?
yes (CPU also works, ~5 min)
did you include the compression script? and want it to be merged?
yes
additional comments
You don't need to preserve the video. You need to preserve what the network sees.
Here's a frame from the original 35.8 MB dashcam video, next to our 321 KB reconstruction — a 111× reduction.
They look nothing alike. One is a dark highway at night. The other is... some kind of turquoise painting?
But look at the bottom row:
The insight is simple once you see it: the scoring formula rewards semantic fidelity, not perceptual fidelity. So we built a generator that speaks SegNet and PoseNet's language, and ignores everything else.
What's in the box
The entire minute of video is stored as three files totaling 321 KB:
graph LR subgraph A["321 KB Archive"] M["mask.obu.br<br/>219 KB"] W["model.pt.br<br/>89 KB"] P["pose.npy.br<br/>13 KB"] end subgraph G["Generator · 118K params"] direction TB T["SharedMaskDecoder<br/>mask + coords → features"] MLP["PoseMLP<br/>6D → 64D"] F2["Frame2Head"] F1["Frame1Head + FiLM"] end M -->|"600 masks"| T P -->|"600 pose vectors"| MLP W -->|"FP4 weights"| G T --> F2 --> FR2["Frame 2"] T --> F1 MLP -->|"γ, β"| F1 --> FR1["Frame 1"]mask.obu.brmodel.pt.brpose.npy.brOnly Frame 2's mask is stored — Frame 1 is generated from the same mask plus a pose vector. This halves the mask video size compared to encoding both masks.
The generator uses FiLM conditioning (Feature-wise Linear Modulation): the pose vector gets projected to γ and β, which shift and scale the feature maps. This completely replaces optical flow — and it turns out a learned 64-dim affine transform compresses much better than an explicit flow field under FP4 quantization.
Score anatomy
Rate dominates. SegNet and PoseNet are nearly zero. The mask video alone is 219 KB — that's where the bits go.
The obvious next step is neural mask compression. AV1 is doing its best, but 5-class segmentation maps have very specific structure (large contiguous regions, predictable class co-occurrence) that a learned codec could exploit far more aggressively. I expect this could cut mask size in half, pushing the score toward 0.25.
Training: teaching a tiny network to fool two bigger ones
You can't just train this end-to-end and expect convergence. A 118K-param generator trying to simultaneously minimize SegNet CE + PoseNet MSE under FP4 quantization will just oscillate.
The fix is curriculum:
Each stage switches to QAT (fake-quantize with STE) in its second half, so the weights learn to be FP4-robust rather than being surprised by it at export time. EMA averaging (decay 0.99) smooths checkpoint selection.
One thing that took me embarrassingly long to figure out: the training forward pass must match the eval pipeline exactly. Eval does
interpolate up (384→874) → round → clamp → interpolate down (874→384). If you skip the round/clamp in training, you get a ~15% gap between your proxy score and real eval. Thediff_roundtrick (round in forward, straight-through in backward) fixes this.The failures that got us here
The mask2mask failure was instructive. I spent a week on it, trained for 1000 epochs, and the pose generalization gap was catastrophic. The problem is that explicit flow fields are dense 2D signals — every pixel has dx/dy — and FP4 can't preserve them with enough precision. FiLM collapses that same inter-frame information into a 64-dim vector, which is inherently more compressible.
Why wider helps
+34% parameters → −37% SegNet error, −24% PoseNet error, +7.5% rate.
The wider channels matter most for depthwise separable convolutions specifically. With
depth_mult=1, the depthwise layer is per-channel — wider channels mean more independent spatial filters. The SegNet improvement concentrates at semantic boundaries (road/sky edges, lane marking borders), which is exactly where class disagreements happen.118K parameters. 321 kilobytes. 111× compression. One minute of driving, distilled into what a neural network actually needs to see.