Find pictures that look alike

Click a picture and a Sparsr device compares it against 4,096 others — one instruction per comparison, whole picture at a time.

Pick any picture in the grid. A Sparsr processor running in your browser compares it against all 4,096 in the library and shows you the twelve that look most like it.

What the machine actually does

Each picture is boiled down to a short string of bits. Comparing two pictures means counting how many of those bits differ — and on Sparsr that is one instruction, because a register is 4,096 bits wide and a whole picture fits inside one.

A machine with 32-bit registers needs 128 operations to compare the same pair.

So a search over the library is about two instructions per picture: one to load the stored code, one to compare it against the query. That is 8,192 instructions for 4,096 pictures.

This is deliberately not the trick the molecule demo uses. There, the library is stored sideways and the whole thing is screened in about twenty instructions. Here the codes are stored one per register, the ordinary way, so the win is the register width and nothing more. Both are honest, and they are different sizes of win — the sideways layout is worth roughly two hundred times more, which is the single most useful thing these two pages say when read together.

The padding is real, and the page says so

A code is 756 bits. A register is 4,096. The other 3,340 bits are zero.

That waste is genuine: the machine compares them anyway, and the instruction count above does not get cheaper because most of the register is empty. It is why the demo reports bits-per-instruction beside the picture rather than only the instruction count.

What "looks alike" means here

The code is a difference hash, not a neural network. One bit per neighbouring pair of pixels, saying which of the two is brighter. Nothing here has been trained on anything and nothing recognises objects.

So it finds pictures that look alike, and it will cheerfully put a coat next to a pullover — because they do look alike. That is the measure behaving correctly, not a bug.

Where the pictures come from

4,096 items from Fashion-MNIST, published by Zalando Research under the MIT licence. They are 28×28 and greyscale, which is why they look the way they do: the entire library has to be small enough to send to a browser.

What this does not tell you

Nothing about speed. The processor here is a software model running in your browser, so how long a search takes is a property of your laptop rather than of Sparsr. The instruction counts are exact; there is deliberately no timing figure beside them.