Skip to content

v1.3.0: Pipeline Composition & Embedding Search/Dedup

Latest

Choose a tag to compare

@zjykzj zjykzj released this 02 Sep 14:40
· 2 commits to main since this release

Added

  • Pipeline task (detect β†’ crop β†’ classify): sync api /predict/pipeline behind INFERFORGE_PIPELINE=1 β€” composes the detect + classify registry DEFAULTS (no model request field; tasks/pipeline.py owns no predictors, reusing tasks.detection/tasks.classification caches), target classes via INFERFORGE_PIPELINE_TARGETS (default car,truck,bus; a class outside the detect model's class table β†’ code 3 naming the variable), per-box crop (10% margin, clipped) classified to top-5 β€” payload items carry detect_class + fine_class/fine_confidence/fine_top5 plus the annotated image; the classifier loads lazily on the first kept crop; readiness/preflight/warmup treat classify as enabled when EITHER INFERFORGE_CLS or INFERFORGE_PIPELINE is on; apis/schemas.py gains an ImageSourceRequest base (shared image/url validation) + PipelineRequest; scripts/run_pipeline.py + test_sync_pipeline.py; smoke tests (tests/test_sync_pipeline.py, app/health switch tests); docs updated (api.md Β§4 + renumbered sections, architecture.md, model-registry.md, stack.md, quick-start.md, READMEs, CLAUDE.md)

  • Embedding capability (DINOv2-small + three business tasks): engines/dinov2.py (ViT-S/14, 384-d, CLS token + L2 normalize, self-written pre/post; official weights CC-BY-NC-4.0 β€” commercial deployments substitute the backbone) + EmbeddingResult + registry embed capability (INFERFORGE_EMBED_MODEL_PATH fallback); batch near-duplicate detection POST /predict/dedup (sync, INFERFORGE_DEDUP=1, 2-50 images, NΓ—N cosine + INFERFORGE_DUP_THRESHOLD (default 0.95) + union-find β€” transitive grouping, representative + confidence, 0-based ids, identification only); gallery search POST /predict/search/query + duplicate check POST /predict/search/check (async query-only, INFERFORGE_SEARCH=1 requires INFERFORGE_ASYNC=1 β€” the milvus-lite index is single-process exclusive so the tasks are worker-only; pymilvus[milvus-lite] worker-only lazy import; gallery bound to the embed default model, no model field; top_k 1-50; dupcheck answers {found, match, threshold}); scripts/build_gallery.py (index builder, run with the worker stopped) + run_search.py + run_dedup.py + test_sync_dedup.py; readiness/preflight/warmup wire embed (readiness probes embed only when DEDUP is on β€” search alone would keep web perpetually 503); predict_phase_seconds/predictor_loaded carry task="embed"; docs/embedding.md (three-scenario design: search vs dupcheck vs dedup) + api.md Β§5/Β§14/Β§15 + renumbering; 45 tests model-free and milvus-free (search_gallery seam)

  • Tooling: model export scripts: scripts/export_dinov2.py (torch.hub β†’ ONNX with a wrapper module pinning the single-input contract images β†’ (1,257,384) β€” the hub backbone's dict output otherwise leaks a bogus masks graph input; static batch + legacy exporter for torch>=2.6; auto shape verification) and scripts/export_yolo.py (subprocess yolo export CLI β€” never imports ultralytics; per-task input shapes incl. cls 224; auto output-shape verification); READMEs/quick-start switch the manual yolo export + cp steps to these scripts

Fixed

  • Agent: the detection tool is registry-driven β€” the model request field picks a registered detect model (submit-time code 10 rejection + worker drift re-check, like detection), class names come from that model's classes table (per-model classes files honored; the hardcoded COCO table could crash or mislabel with custom detect models), and INFERFORGE_AGENT_TARGET_CLASS (default person) selects the target class (not in the table -> code 3 naming the variable, checked before the paid call); docs updated (agent.md, api.md, stack.md)

Docs

  • README Testing sections + coverage policy: README bilingual gains a "Testing / ζ΅‹θ―•" section (test + coverage commands, model-free/service-free rationale, link to docs/testing.md); docs/testing.md Β§3.4 documents the coverage command and the "coverage is informational, not gated" policy (scripts/ and defensive error branches are intentionally not unit-tested)
  • CLAUDE.md skill pointers: git workflow skills now reference the maestro plugin (maestro:commit / maestro:release / maestro:claude / maestro:spec) instead of the removed local .claude/skills; Release Configuration examples refreshed from 1.1.0 to 1.2.0

See CHANGELOG.md for the full change history.