Skip to content

About

Real fly anatomy and model-output starter. Custom license requires web UI and repository attribution.

Topics

Resources

Stars

90 stars

Watchers

0 watching

Forks

Repository files navigation

fly-connectome-template: real MaleCNS anatomy and a starter for your own experiment

A browser workbench for building your own fly-connectome experiments. Real anatomy, a replaceable environment, and model outputs mapped by neuron ID.

build Node.js anatomy licence: attribution required


Start with a fly body and measured brain coordinates already on screen. Replace the environment, connect your own model and inspect its outputs against the same MaleCNS neuron IDs. Training and inference stay in your own stack; the browser handles the experiment view.

  • Real anatomy. 124,289 classified brain soma positions from MaleCNS v1.0, rendered without stretching the axes, plus the anatomical Flybody mesh.
  • Replaceable parts. Environment on the left, brain above the body on the right. Each is a separate React component; the layout stacks on mobile.
  • An explicit model boundary. JSON replay with timestamps, body IDs, normalized values and declared provenance. No neural activity is invented when no model is connected.
  • A small web stack. React, TypeScript, Three.js and Vite. No required account, backend, database or hosting provider.

The code is source-available with mandatory attribution in your web UI and repository README. Your own models and weights can remain private. See Licence before reusing.

Start

Use this template to create your repository, then clone it. With Node.js 22.18+:

npm ci
npm run dev

Open the URL printed by Vite. The example stimulus starts automatically; the brain initially shows anatomy only. Load synthetic example, then Play, demonstrates the output pipeline with clearly labeled test values. Load model JSON reads your own replay locally in the browser.

Make it yours

File Replace or connect
src/components/Environment.tsx Your game, video or sensory scene
src/components/BrainScene.tsx Your model's ActivityFrame, keyed by MaleCNS body ID
src/components/FlyScene.tsx Your motor decoder or physics adapter
src/App.tsx Experiment clock, controls and replay/live adapter
src/style.css Your layout and visual design

The model integration guide covers the JSON format, Python-side data layout and live adapters. The validator rejects incompatible datasets, unknown IDs, duplicate IDs, invalid values and unordered timestamps. It validates the format, not the scientific truth of a model's output.

What the anatomy means

These are cell-body positions, not neurite branches or a synaptic graph. The source is the adult male MaleCNS dataset, not female FlyWire. Of 140,024 bundled measured positions, the viewer draws 124,289 classified optic, central and descending somata; it omits VNC-associated and unclassified cells. Missing positions are never generated.

Native 8 nm coordinates are centered, rigidly rotated and uniformly scaled. XY view resets the projection; Orbit controls rotation. Point size and color are display choices. Flybody is a surface mesh here, not a physics simulation. No trained policy, neural simulator or biological firing data is included.

The atlas manifest records source, filters and hashes. The data notice includes the command to reproduce or audit the export. The header image is a sample of those same measured coordinates.

Verify and deploy

npm test                # model-output contract and the bundled fixture
npm run check:assets    # anatomical asset hashes
npm run build           # type check and static build
npm run preview         # inspect dist/ locally

GitHub Actions runs the same checks. Serve dist/ on any static host; assets also work under a subpath. On Cloudflare Pages, use build command npm run build and output directory dist. GPU training and inference run separately and provide replay files or live outputs to the frontend.

Licence

Cobanov Template Attribution License 1.0 is a custom, attribution-required source-available license, not an OSI-approved license. Keep this linked credit in both your web UI and repository README:

Built with fly-connectome-template by Mert Cobanov.

The ready-made UI credit is src/components/Attribution.tsx. You may restyle it or move it to an About/Credits view reachable in one click from the main UI; you may not hide it or remove its links. ATTRIBUTION.md explains the requirements. Derived versions must identify that they were modified. Your own models, weights and modifications do not have to be published.

MaleCNS data remains CC BY 4.0, credited to FlyEM / HHMI Janelia, University of Cambridge, MRC Laboratory of Molecular Biology and Google Research. Flybody remains Apache-2.0. Their licenses are separate from the template's; see third-party notices.

About

Real fly anatomy and model-output starter. Custom license requires web UI and repository attribution.

Topics

Resources

Stars

90 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages