infrastructure tier

infrastructure-vision

Local computer-vision ops for OSINT/investigation: face detection (SCRFD) + face embedding (ArcFace, 512-d, L2-normalized), NMS, cosine similarity, and image preprocessing — built on infrastructure-onnx (ADR 0020). Default build is dependency-free (types + pure ops + stubs); the real ONNX models and image decode are behind feature `ort`.

Local computer-vision ops for OSINT/investigation: face detection (SCRFD) + face embedding (ArcFace, 512-d, L2-normalized), NMS, cosine similarity, and image preprocessing — built on infrastructure-onnx (ADR 0020). Default build is dependency-free (types + pure ops + stubs); the real ONNX models and image decode are behind feature `ort`.

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/vision
Edition2021
Targetsinfrastructure_vision, real_model
Public items2 across 0 modules
Tests8

What it is for

infrastructure-vision — local computer-vision ops for OSINT/investigation.

Face detection (SCRFD) + face embedding (ArcFace, 512-d, L2-normalized) on top of infrastructure_onnx, plus the pure ops (NMS, cosine similarity, letterbox + CHW preprocessing math). Local-only, no egress — the consumer owns privilege, biometric policy, and the vector store (ADR 0020).

The default build is dependency-free: the FaceDetector/FaceEmbedder traits, the pure ops, the value types, and StubFaceDetector/ StubFaceEmbedder all build with zero native deps. The real ONNX models + image decode live behind the ort feature (ScrfdDetector, ArcFaceEmbedder).

Capabilities

FaceDetector

infrastructure-vision — local computer-vision ops for OSINT/investigation.

Item
pub trait FaceDetector

FaceEmbedder

infrastructure-vision — local computer-vision ops for OSINT/investigation.

Item
pub trait FaceEmbedder

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub trait FaceDetectorDetects faces in a decoded RGB image (interleaved HWC u8, width*height*3 bytes)
pub trait FaceEmbedderEmbeds a single, already-cropped/aligned face into a comparable vector

Re-exports. Exported here, defined elsewhere.

ExportDefined in
{ArcFaceEmbedder,ScrfdDetector}model::{ArcFaceEmbedder,ScrfdDetector}
{BBox,DetectedFace,FaceEmbedding,VisionError}types::{BBox,DetectedFace,FaceEmbedding,VisionError}
{StubFaceDetector,StubFaceEmbedder}stub::{StubFaceDetector,StubFaceEmbedder}
{cosine_similarity,decode_scrfd_stride,l2_normalize,letterbox_params,nchw_from_rgb,nms,Letterbox,}ops::{cosine_similarity,decode_scrfd_stride,l2_normalize,letterbox_params,nchw_from_rgb,nms,Letterbox,}

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/vision
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-onnx`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
image^0.25jpeg, png, webpyesalways
thiserror^2noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
image^0.25jpeg, pngnoalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_vision["application-vision"] -->|uses| SELF
  SELF["infrastructure-vision"]
  SELF -->|runtime| n_infrastructure_onnx["infrastructure-onnx"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

FeatureEnablesOn by default
defaultyes
ortdep:image, infrastructure-onnx/ortno
flowchart LR
  n_default["default"]
  n_ort["ort"] --> n_dep_image["dep:image"]
  n_ort["ort"] --> n_infrastructure_onnx_ort["infrastructure-onnx/ort"]

Targets

KindNameSource
libinfrastructure_vision`src/lib.rs`
testreal_model`tests/real_model.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: application-vision.

Verification

KindCount
Unit tests7
Integration tests1
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root202

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc22
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 2
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files5
Source lines727
Code lines535
Public API items2
Public modules0
Tests8
Examples0
Cargo features2
Direct runtime dependencies3
Workspace reverse dependencies1
pie showData
    title Public API by kind
    "trait" : 2
pie showData
    title Rust source composition
    "Code" : 535
    "Blank or comment" : 192

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All infrastructure · Manual