Documentation
¶
Overview ¶
Package embedded ships the redesign_v5 detection models inside the binary (compiled in with the standard library's embed package), so the full pipeline runs turnkey with no external files. Weights are stored in fp16 (half the size of fp32, negligible inference impact — the pure-Go onnx engine reads FLOAT16 initializers natively); see scripts/build_embedded.sh + scripts/quantize_fp16.py.
It is an OPT-IN subpackage: importing it links ~50 MB of model bytes, so only callers that want the embedded models pay that weight — the core gate package and every light f5 path stay model-free.
Two pipelines:
- NewBundle() Tier-1: distilled m_enc student detector + recompression gate
- NewTier2Bundle() Tier-2: 4-member m_enc5 luma ensemble + the same gate
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available reports whether real models were embedded at build time.
func ModelBytes ¶
func ModelBytes() []byte
ModelBytes returns the embedded Tier-1 detector (m_student_m) ONNX bytes, or nil if none was embedded.
func NewBundle ¶
NewBundle constructs the embedded Tier-1 2-stage pipeline (m_student_m detector + recompression gate) — no external files.
func NewDetector ¶
NewDetector constructs the Tier-1 single detector (m_student_m) from the embedded bytes, defaulting to gate.F5T (0.71). Returns gate.ErrWeightFileMissing when no model was embedded.
func NewFastBundle ¶
NewFastBundle constructs the FASTEST pipeline: the single distilled detector (m_student_m) + the 5 recompb gate CNNs — 6 small inferences, NO calibration/ cooc members (so no crop-4 cover estimate / JPEG re-encode per image). The inference COUNT is the per-image bottleneck, so this is the throughput choice for first-pass triage of large corpora; re-scan its hits at a higher tier.
func NewTier2Bundle ¶
NewTier2Bundle constructs the embedded Tier-2 2-stage pipeline: the 4-member m_enc5 luma ensemble + the recompression gate. This is the best DETECTION ensemble — encoder/cover-invariant (news-cover recall 79%) with no regression on standard f5.jar.
func NewV10Bundle ¶
NewV10Bundle maps the v10 CLI tier onto the same 4-member m_enc5 ensemble as Tier-2 — the old 33-member set it named was superseded (and removed). Kept as a distinct constructor so `-tier v10` callers keep working.
Types ¶
This section is empty.