AI Training & Precision
# AI Training & Precision Architecture — Fabrika AI
Full operational details and commands live in ../ai_training/README.md.
What is trained now
- Engine-bay component detector v1 (YOLOv8n, 26 component classes, 1,201 MIT-licensed images, 9,989 boxes).
- Held-out test (96 images, conf 0.50): P 0.701 · R 0.471 · mAP50 0.453; default operating point P 0.659 · R 0.622 · mAP50 0.635.
- Artifacts:
ai_training/models/engine_bay_v1/best.pt,best.onnx. - This is component recognition only. It has no fault labels and is not shipped as a diagnostic model. The deployment gate is in
MODEL_CARD.md.
What is not claimed
- Audio training baseline (not deployed): 1,067 clips (healthy/knock/misfire), 4-zone propagation augmentation, 41 features, RandomForest → test accuracy 0.799, macro-F1 0.787, real-test any-fault recall 0.763; healthy precision only 0.776. The production path remains FFT/DSP + 4-zone 3D localization with abstention when confidence/zone quality is low. See
../ai_training/acoustic/MODEL_CARD.md. - No QLoRA LLM is shipped. The production assistant is deterministic/retrieval-grounded; a QLoRA model would only be added after a golden evaluation set and a hallucination gate.
- No full copyrighted manual is bundled in the APK. The app contains paraphrased facts and links to manual sources.
Why the app is safer now
- No visual “OK” verdict. The old
FABRIKA_VISUAL_OKflow is removed from the production path; a single image cannot certify a car. - Quality gate. Images below 65/100 quality return
VISION_RETAKE; no diagnosis. - Corroboration gate. One visual cue returns
VISION_MORE_EVIDENCE; at least two cues with one strong cue are needed forVISION_ATTENTION. - No charge on uncertainty.
VISION_RETAKE,VISION_INVALID_IMAGE,VISION_INCONCLUSIVE,VISION_MORE_EVIDENCE,ACOUSTIC_INCONCLUSIVE, andACOUSTIC_SIGNAL_LOWare excluded from monthly quota counting. - Costs removed from unconfirmed visual cues. The user gets next steps, not a false repair bill.
- Acoustic gate. Low-SNR, clipped, low-zone-consistency or low-confidence clips return
ACOUSTIC_INCONCLUSIVE/ACOUSTIC_SIGNAL_LOWand do not consume quota. 3D localization reports active/consistent zones and signal quality. - Grounded retrieval. Knowledge is filtered by active model; exact fluid/fuse/timing facts come from catalog/manual data, not model imagination.
- Tests. 26/26 automated tests pass, including low-quality, corrupt-image, single-cue, no-false-OK, acoustic silent/noise rejection, 3D zone consistency, knowledge coverage, DTC lookup and no-charge code tests.
Data and source policy
- 11 full owner manuals downloaded for internal extraction only; 31 model source entries in
manual_sources.json. - 9,533 generic OBD-II codes from OBDex (CC0), with source links.
- 102 curated Arabic general/safety/maintenance chunks + 93 model-specific chunks.
- Manuals are copyrighted; do not redistribute. The app opens official/manual links for exact specs.
Next training gate
To ship a fault model for paid use, collect Egypt-specific 31 models × 6 angles × 3 lighting conditions, annotate 18 classes plus hard negatives, label real fault states, and require:
- per-class precision ≥ 0.90;
- false-positive rate on clean engines ≤ 5%;
- calibrated confidence error ≤ 0.05;
- out-of-distribution rejection;
- acoustic macro-F1 ≥ 0.85 on real workshop recordings;
- human mechanic review for 0.45–0.78 confidence samples.
Do not deploy a model before passing these gates. The app is intentionally conservative until then.