Tsokotukha - PTO

Download full offline package   |   Download compact package   |   Download weights

Tsokotukha is a small research model that reads construction drawings through a fly visual circuit. It does not look at a crop once. It moves across 25 overlapping views, passes each view through the 721-column fly eye and joins the responses into one wall probability map.

This repository contains the best saved pure-flyvis checkpoint from our experiments, q16_z3_flyvis_pre_s1.

A white fly inspecting a room drawing

How the model sees a drawing

The input is a 192 x 192 crop. Each of the 25 local views is 64 x 64. The same visual circuit processes every view, then a spatial readout returns the local evidence to its place on the drawing.

Tsokotukha 25-view visual sampling pipeline

Human plan and fly-eye view

The animation shows one pass through the visual demo. The plan stays visible on the left while the fly-eye representation changes beside it.

Animated comparison of a floor plan and its fly-eye representation

Best saved result

Average precision, ROC-AUC and best IoU for the saved checkpoint

Metric Value
Average precision 0.954543
ROC-AUC 0.996236
Best IoU 0.843486
Views per crop 25

The evaluation used 64 synthetic ResPlan source plans with four fixed crops per source. This was a development and model-selection split, not a sealed final test. The result should be quoted with that limitation.

The checkpoint has 1,876 trainable parameters. The flyvis circuit contains 45,669 nodes, 1,513,231 edges and 721 retinal columns. The readout uses 57 non-input cell types.

Why this checkpoint

There are higher numbers elsewhere in the project, but they come from different setups. One uses partial labels. Another adds a CNN decoder. This is the strongest saved result that keeps the flyvis circuit and its spatial readout as the model.

The hatch-recognition experiment below is a separate branch. It uses frozen upstream flyvis model 001 and reaches 0.910 with an extended legend. It has no separately trained checkpoint. Its configuration is included as article_hatch_config.json so the two results stay separate.

A second experiment: hatch recognition

The project also asked whether a frozen fly visual model can describe drawing hatches. The first diagram shows what was compared. The second shows how a moving 64 x 64 patch becomes a 1,368-value descriptor. These are manuscript figures from the hatch branch, not results from the q16 wall checkpoint.

Hatch-recognition study overview

Frozen hatch-descriptor pipeline

Install

Use Python 3.12. A clean virtual environment is recommended.

pip install -r requirements.txt

The flyvis dependency is pinned to the same commit used in the experiment.

Run

For the complete 25-view setup:

python inference.py drawing_crop.png --output prediction.npz --preview probability.png

For one 64 x 64 view:

python inference.py patch.png --single --output single_view.npz

The output file contains logits, probabilities and a binary mask. The included threshold came from the development split. Recalibrate it before using the model on another dataset.

To check the package:

python verify_package.py

What is in the download

  • model.safetensors contains the checkpoint tensors.
  • config.json records the eye, temporal sequence, readout and 25-view plan.
  • metrics.json contains the saved run metrics.
  • inference.py runs either one view or the full 25-view plan.
  • provenance/ contains the original run result and configuration.
  • Tsokotukha-PTO-model-only.zip is the compact package.
  • Tsokotukha-PTO-full.zip also contains the generated connectome cache for offline use.

Limits

This is a research checkpoint trained and evaluated on synthetic wall-segmentation data. It is not a complete drawing reader and it is not a BIM system. Production drawings contain text, tables, symbols, changing scales and drawing styles that were not covered by this result.

No customer drawing, private dataset or real project file is included in this repository.

Project citation

@misc{kuklev2026tsokotukha,
  title  = {Tsokotukha - PTO},
  author = {Kuklev, Dmitry},
  year   = {2026},
  note   = {Research checkpoint for active visual sampling on architectural drawings}
}

Close view of a fly compound eye

Downloads last month
14
Safetensors
Model size
4.95k params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support