Neon inspection — VisA circuit boards
This model inspects photos of printed circuit boards for visible defects, using the pcb4 category of Amazon's VisA dataset. You provide one circuit-board photo; it returns a short inspection sentence, such as “pass no visible anomaly.” or “reject visible anomaly.”, and a decision: PASS (no defect detected), REJECT (defect detected), or UNCERTAIN (needs human review). It has been evaluated on this specific board category, not arbitrary circuit boards or every category in VisA.
A real dataset example
Input: the original test photo below, from pcb4/Data/Images/Anomaly/022.JPG. Dataset label: Defective circuit board.
Actual recorded model output in summary mode:
{
"raw_generated": "reject visible anomaly.",
"decision": "REJECT"
}
In plain terms: the model flags this item as defective. This is one selected example, not the overall accuracy. The model does not return a defect outline or bounding box.
After installing the dependencies below, try this included photo:
python run.py --image examples/defect.jpg --mode summary
Photo: VisA / Amazon.com, Inc. or its affiliates, CC BY 4.0. Dataset source. The photo is unmodified. Example provenance and recorded output.
Scope: only pcb4. It is not a general-purpose VLM or a proven industrial quality-control system. Both releases failed the project's overall quality acceptance criteria. Host inference has been run; physical Coral-board inference has not been verified.
Download and run
Supported host: Linux x86-64, Python 3.11. No GPU is required. Other hosts need a separately validated native-library build. Inference runs locally after the initial download and dependency installation.
python3.11 -m venv .venv-neon
source .venv-neon/bin/activate
python -m pip install huggingface_hub
hf download euhidaman/neon-inspection-visa --local-dir neon-inspection-visa
cd neon-inspection-visa
python -m pip install -r requirements.txt
python verify.py
python run.py --image /path/to/your/photo.jpg
Output is printed as JSON and appended to inspection.jsonl. Look at raw_generated for the sentence and decision for PASS, REJECT or UNCERTAIN. The confidence/policy check can withhold a decision even when the sentence sounds definite. Controller actions are simulated, not instructions to real machinery.
For a quick installation check, run python run.py without an image. That uses an included training fixture, not an independent accuracy test. Use --mode summary for the alternative supported report mode. On Nibi, run inference inside a Slurm allocation.
Do not write new files inside package/: the SDK checks its complete inventory and hashes. Keep virtual environments, downloaded caches and output outside that directory. Hugging Face download metadata stays at the repository root.
Use the SDK
From the repository directory:
import sys
sys.path.insert(0, "package/sdk")
from neon_sdk.coral_inspection import load_inspection_package
model = load_inspection_package("package", threads=1)
result = model.inspect("/path/to/your/photo.jpg", mode="location")
print(result["raw_generated"])
print(result["decision"])
For continuous local file arrivals, use the existing CLI:
python package/tools/neon_inspect.py --package package \
--directory /path/to/incoming --watch --output inspection.jsonl
Model and training
- Frozen ImageNet-initialized MobileNetV2 alpha 0.35 prefix, through block 13 expansion; 224 × 224 RGB input.
- New image/instruction-conditioned GRU decoder, trained from random initialization: 257,961 parameters, 41-token vocabulary, at most 24 output tokens.
- INT8 encoder and row-wise INT8 decoder matrices; decoder arithmetic/activations remain FP32. This is not an all-integer or 1.58-bit model.
- Deployed compiled encoder + decoder payload is about 0.58 MB. The full repository is larger because it includes SDK code, reference weights, firmware, fixtures, evidence and deployment tools. Payload size is not peak RAM.
- The VisA 2cls_highshot split: 603 normal and 60 anomalous source training images. These were split into 482 normal + 48 anomalous training images and 121 normal + 12 anomalous validation images, with additional synthetic unclear views. Forty test photographs had historical project exposure; the full test is not a fresh confirmation benchmark.
- Sentences were supervised from dataset labels/annotations. At inference the decoder generates tokens from image features and the supported instruction. It is not fine-tuning of an existing Neon foundation model.
Recorded results
All 442 official test images in this category have saved host-SDK predictions. These counts use location mode, matching the website, and compare defect presence only:
| Outcome | Images |
|---|---|
| Correctly detects a defect | 37 |
| Correctly identifies no defect | 377 |
| Misses a defect | 3 |
| False alarm | 11 |
| Needs human review | 14 |
Correct defect detection does not guarantee the generated location is correct. The model does not produce a segmentation mask or defect bounding box. Red annotations on the demo website come from the datasets.
See results.json, per-image predictions, and package/evidence/ for training, reference/INT8 evaluations, runtime and policy evidence. Historical evidence includes original development paths; those are provenance records, not paths required for the quickstart. Grammar validity does not imply factual correctness. Results on these objects do not establish generalization to other products or a real production line.
Coral Dev Board Micro
The target package contains the Edge TPU-compiled encoder and M7 firmware. The encoder targets the Edge TPU; the text decoder runs on the M7 CPU. No successful physical-board execution, latency, energy or peak-memory measurement is claimed. The host runtime is not a board/TPU simulator.
The deployment companion is included here. Prepare a flashing directory without connecting to USB:
python device-support/prepare-flash.py --package package --output ../visa-flash
This checks the artifacts and prints the official flashing command. Follow device testing instructions and the command generated on your own workstation. Install the USB/OS dependencies and device-support/sdk/scripts/requirements.txt there. Historical absolute commands in the original notes refer to the development cluster; use the preparation helper to generate your local paths.
Start with the fixture application. Add --camera to the preparation command for the experimental camera firmware, which captures one image per boot. It is not a continuous video tracker. Read memory notes. This package targets the original Coral Dev Board Micro, not STM32 or other Coral boards.
Files and licences
package/model/: inference weights, vocabulary, calibration and normalization.package/sdk/,package/tools/,package/runtime/: host SDK, CLI and native decoder.package/source/,package/reference/: training/export source snapshots and reference weights. Source snapshots include development-specific paths; they are not a turnkey platform training service.package/target/,device-support/: experimental firmware and deployment tools.package/golden/: documented training fixtures and expected intermediate values.package/evidence/,results.json,test-predictions.jsonl: recorded evidence.package/licenses/,device-support/licenses/: original component and dataset notices.
VisA dataset material is CC BY 4.0; preserve attribution. This does not by itself establish a blanket licence for all model components. Read LICENSE-NOTES and the bundled notices. Public availability does not grant a new blanket licence to Zevion code/weights or override third-party terms. The original release notes flag unresolved standalone licensing provenance for the pretrained ImageNet weights; this is not a commercially cleared release.
The included training fixture and example test photo are dataset material and retain their original licences and attribution. No entire training/test image collection is uploaded here. This research release is version 0.1.1; the Hugging Face packaging adds documentation and a convenience launcher without changing the trained weights or inference policy.