← All Cracked ML projects
PL-B10NOT STARTEDBEGINNERMLPYTHONIMPACT ★★☆☆☆

An image codec that is an MLP (NumPy, hand backprop)

Overfit a tiny sine-activated MLP to one photo, store its weights as the compressed file, and beat JPEG at 0.3 bits per pixel.

EST.8 h
REWARD+200 XP
AFTERDupont et al. + 1

ML-ARENA BENCHMARKS

PROOF: BENCH
METRICINDUSTRYMINE
PSNR (peak signal-to-noise ratio) at 0.3 bpp (bits per pixel, counting only the size of the weights) on 6 Kodak images; gradient-check relative error
GOAL · beat JPEG's PSNR at 0.3 bpp on ≥ 4/6 images; gradient-check relative error < 1e-6 in fp64
JPEG via Pillow at matched bpp · measured locally (the COIN paper reports beating JPEG at low bitrates)—
no results yet
YOUR RESULTS

Your recorded results appear here.

Brief

Write a NumPy-only SIREN-style coordinate MLP: a network that takes a pixel's (x,y) position and outputs its colour, using sine activations so it can represent fine detail. Derive backprop by hand and gradient-check it against finite differences (nudge each weight slightly and measure how the loss changes). Write Adam by hand as well. Train the network to map (x,y) to RGB on Kodak images, quantise the weights to fp16, that is 16-bit floats, and count the bits. With no autograd library, every gradient is yours.

VICTORY CONDITIONS

  1. beat JPEG's PSNR at 0.3 bpp on ≥ 4/6 images; gradient-check relative error < 1e-6 in fp64 (PSNR (peak signal-to-noise ratio) at 0.3 bpp (bits per pixel, counting only the size of the weights) on 6 Kodak images; gradient-check relative error).
  2. A public repository with a README that shows your result and how to reproduce it.

Terms in plain words

Coordinate MLP
A network whose input is a position, here (x,y), and whose output is the value at that position, here a colour.
SIREN
A coordinate MLP that uses sin() as its activation so it can fit sharp edges and fine texture.
Gradient check
Comparing your backprop gradients with slow numerical estimates from tiny weight nudges to prove they are correct.
bpp (bits per pixel)
File size in bits divided by the number of pixels; 0.3 bpp is heavy compression.

Why it rates ★★☆☆☆

A from-scratch MLP with a real, non-toy target is a far better backprop demo than XOR or MNIST.