Falconsai/ScopeNet
ScopeNet — woven architecture for airborne drone ID on Pi 5 + Hailo-8L
[View in Model Surgeon](https://surgeon.falcons.ai/?hub=Falconsai/ScopeNet)
This card is generated from the surgical record itself; the package's lineage.intoto.jsonl is the signed source of truth (verify it free at the Surgeon's public verifier or with the bundled verify_attestation.py).
Note on this revision. The sections Architecture through Compliance note are reproduced unchanged from the Model Surgeon record. Everything under Training record and Model details was added by the model owner from scopenet_trainer.ipynb and is not covered by the signed attestation.Architecture
- Identification: Vision · Hybrid (98% confidence)
- Source format:
pytorch· Intended task: not declared config.json: synthesized from the anatomy (no source config.json)- Source license: not recorded (uploaded file)
- Lineage chain: 1 surgery (no prior attestation reachable)
- Post-surgery totals: 271,947 parameters · 274 tensors
- Compute estimate: 1.843853 GFLOPs (comparison metric, not a measurement)
Target hardware: Raspberry Pi 5 with AI HAT+ (Hailo-8L, 13 TOPS), drone-mounted, real-time tracking and identification during variable-angle pursuit.
The organising constraint
Hailo-8L is a stateless dataflow accelerator with an offline compiler. It runs static-shape feed-forward CNNs well; it does not run recurrent layers, state-space models, spiking neurons, or dynamic shapes. But the strongest empirical result in the event-vision literature is that recurrent models beat sparse and feed-forward ones by more than 10 mAP.
The whole design follows from resolving that tension: stateless CNN on the NPU, stateful temporal model on the CPU. Per-frame appearance evidence is computed by the accelerator; everything with memory in it lives on the ARM cores, where a few dozen tracks cost microseconds.
Where each piece comes from
Provenance & operations
- Parents: scopenet.pt
- Operations performed: imaging×1, load×1
- Weight merges recorded: 0
- Quantized tensors (F32→F16): 0
Surgery Log (ordered)
- load — scopenet.pt (1.2 MB, pytorch)
- imaging — synthetic image 1x3x64x64 → [1, 2] [PASS]
Validation
- Tissue imaging: PASS
- Structural integrity is testable offline via the packaged
load_and_test.py.
Compliance note
The signed attestation + this card together document model composition, modification history, and validation evidence — the record structure technical-documentation obligations (e.g. EU AI Act Annex IV) ask for. This is evidence, not legal advice.
Training record (owner-supplied, from scopenet_trainer.ipynb)
Summary
ScopeNet is a small (~0.26M learnable parameters) gated mixture of three convolutional "scope experts", each viewing the same image at a different context ratio, combined by a dense softmax gate. The architecture was designed for real-time airborne drone identification on a Raspberry Pi 5 with a Hailo-8L NPU, but this checkpoint was trained on a different task: binary image classification of normal vs sensitive images.
From the inference samples in the notebook, the sensitive class consists of technical and engineering imagery (mechanical drawings, exploded-view diagrams, floor plans, circuit schematics) and the normal class of everyday photographs and graphics. The owner should confirm this reading and state the intended use explicitly (see Intended use).
Model details
The checkpoint also stores the architecture args, hyperparameters, preprocessing (class names, mean, std, resize, colour mode) and the validation metrics below. It can be loaded with load_scopenet() from the notebook.
The stage-B temporal modules defined in the notebook (TrackGRU, TrackGATv2, wingbeat_spectrum) are not part of this checkpoint and were never trained.
Training data
- Folder-per-class dataset at
dataset/images/train: 4,468 images, 2 classes. - No separate validation folder was present, so the notebook made a per-class random split (15% validation, seed 0):
- train 3,798 (
normal1,712 /sensitive2,086) - validation 670
- Of the training split, 35% (1,329 images) was held out for the gate (
V_hold) and 65% (2,469) used to train the experts (V_exp). With all-wrong masking, 1,324 holdout images were used to fit the gate. - Data source, collection method, licensing and labelling criteria are not recorded in the notebook.
Training procedure
- Stage A, experts: each expert trained independently on
V_expwith AdamW (lr 3e-3, weight decay 0.05), 3-epoch linear warmup then cosine decay, up to 40 epochs, batch 64, label smoothing 0.1, gradient clipping at 5.0, EMA 0.999, early stopping with patience 12. Loss = cross-entropy + 0.1 × centroid polarization loss on the re-ID embedding. Augmentation: reflect-pad random shift (±8 px), horizontal flip, random erasing (p = 0.25). - Stage A, gate: experts frozen; gate trained on the holdout features with AdamW (lr 1e-3), up to 300 epochs, patience 60.
- Environment: PyTorch 2.11.0+cu128 on CUDA, Python 3.14.4, Windows.
- Single seed (0).
Evaluation
Validation split, 670 images:
Mean gate weights by image sharpness quartile:
Other checks recorded in the notebook: save/reload agreement 1.0000; an 8-image spot check (4 per class) was 8/8 correct, but those images were drawn from the training set, so it is not evidence of generalization.
Limitations and caveats
- The gate does not earn its place on this task. Gated ScopeNet is 0.15 points below the best single expert, and its weights are almost identical on blurred and sharp images, so the scope-selection mechanism is not functioning. By the notebook's own criterion, a single expert would be the better deployment choice (same or better accuracy at one third of the NPU cost). At 670 validation images the difference is about one image and is within noise either way.
- Validation is optimistic. The split is random, not grouped by source. If the dataset contains near-duplicates (pages from the same document, crops of the same drawing), validation accuracy will overstate real performance. There is no held-out test set, and results come from a single seed.
- Wide scope uses reflect padding. The 1.7 context-ratio expert sees mirrored borders, not real surrounding content.
- Resolution mismatch in the Surgeon imaging test. The imaging check used a 64×64 input; the model was trained at 128×128. The PASS confirms the graph runs, not that 64×64 inputs are classified correctly.
- No edge artifact. ONNX export failed in the recorded run (
onnxscriptnot installed), so no Hailo-compiled or INT8-quantized version exists, and quantization loss has not been measured. - Re-ID head is a weak proxy. It was trained with class labels standing in for track identities and has no meaningful use on this task.
How to load
net, preprocess, metrics = load_scopenet('scopenet.pt', dev='cpu')
# preprocess['classes'] -> ['normal', 'sensitive']
# resize to preprocess['resize'] (128), RGB, scale to [0,1],
# then (x - preprocess['mean']) / preprocess['std']
logits = net(x) # x: [B, 3, 128, 128]load_scopenet and the ScopeNet class definition are in scopenet_trainer.ipynb; the checkpoint is not loadable without them.
Operated with Model Surgeon — verify this package at https://surgeon.falcons.ai/verify © 2026 FALCONS.AI — Model Surgeon record format. The model weights remain their owner's.
