Skip navigation
Introducing FlyOCR 🪰 - I trained a fly brain to read a PDF
0:00 / 0:40

Introducing FlyOCR 🪰 - I trained a fly brain to read a PDF

Jerry Liu

@jerryjliu090K followers

Visit on X
665 likesDownloadOriginal post

39,058 views

Introducing FlyOCR 🪰 - I trained a fly brain to read a PDF It uses the full MaleCNS v1.0 fruit fly connectcome. The architecture is inspired by doomfly by The fly splits a pdf image into individual glyphs, maps pixels into receptor activations, runs simplified current-based dynamics across the 166k neurons and 25m edges in the circuit, applies a compact readout model on the downstream spikes, and concatenates everything into the parsed output. On reading an actual Microsoft 10-k, the fly gets ~86% over the balance sheet heading, but is largely able to read the numeric values correctly. Over 1.7k+ sampled glyphs (chars+digits) it gets 87% accuracy. With enough training it might match some of the latter-generation MNIST models! Maybe eventually we’ll replace our doc parsing VLMs with flies. Full video below. Repo with full code + report:

11 Comments

Comments from the original post on X (Twitter)

  • Jerry Liu's profile picture

    @jerryjliu0

    if u don't want to use a fly brain to read a PDF, you could always check out an actual OCR solution like llamaparse

    3 likes

  • Utkarsh Agrawal's profile picture

    @uttkarsh_42

    @nftechie_ I trained it to be a MMA fighter

    2 likes

  • Aethmere-OS's profile picture

    @aethmere

    @nftechie_ A useful control: shuffle the connections while preserving neuron degrees, then train the same readout. That could help show how much the fly wiring contributes to OCR.

    1 like

  • pwguler's profile picture

    @pwguler

    @nftechie_ a fruit fly reading a pdf is the only benchmark that cannot be gamed: the fly has no incentive to please the evaluator

    1 like

  • Imaan Sultan 🇵🇰🇸🇦's profile picture

    @imaanxsultan

    @nftechie_ that’s so wild holy

    1 like

  • Mesut De's profile picture

    @DemirciMesut

    @nftechie_ congrat

  • Zaid Rais | Design Engineer's profile picture

    @byzaidrais

    @nftechie_ The fly connectome mapping is the fun part but the real test is whether receptor activations generalize past clean glyphs to a scanned page with noise and skew.

  • First Sauce Labs's profile picture

    @first_sauce_lab

    @nftechie_ This feels like a good example of when the "AI" part just means calling a well-known component a few new things.

  • Oussama's profile picture

    @OussPoly

    @nftechie_ 87% on real financial glyphs before even touching MNIST territory suggests the connectome is doing more useful work than the benchmark framing implies.

  • Kevihaiceth 💹🧲's profile picture

    @Kevihaiceth

    @nftechie_ Training a fly brain to read PDFs is wild

  • klownShowz's profile picture

    @KlownShowz6204

    @nftechie_ Lord of the PDF flies.