A model that exports successfully is not necessarily a complete standalone inspection system. For buyers evaluating embedded anomaly detection, the difficult question is often what happens after the accelerator produces feature tensors. Those tensors still need alignment, nearest-neighbor search, scoring and a reliable output path.
PatchCore edge inference is feasible only when every stage has a supported execution location and fits the device's memory and timing budget. Use the checks below to separate a promising backbone demonstration from a deployable inspection pipeline, then request evidence for the complete workload before selecting hardware.
Decide what standalone operation must include
Treat PatchCore as a pipeline rather than a single neural network. Its inference path generally extracts local features, forms patch embeddings and compares them with representative embeddings from normal training images. The resulting distances support an anomaly map and an image-level decision.
Exporting the feature extractor to ONNX establishes an interchange artifact. It does not establish that a target device can compile the graph, store the memory bank or execute the search.
Define standalone operation explicitly: after configuration, the device must acquire images, process them, load its bank, produce decisions and recover from ordinary restarts without an external inference host. A workstation used for training does not violate that definition.
| Pipeline stage | Possible execution location | Evidence to request |
|---|---|---|
| Image preparation | Image processor, CPU or accelerator | Matching crop, resize, normalization and layout |
| Backbone feature extraction | Neural accelerator or CPU | Successful compilation and numerical comparison |
| Feature alignment and patch embedding | Accelerator or CPU | Supported operations, shapes and output values |
| Memory-bank storage | Persistent storage plus working memory | Bank size, load time and runtime residency |
| Nearest-neighbor search | CPU or another supported compute engine | Executable implementation and measured search latency |
| Map generation and scoring | CPU or accelerator | Agreement with the reference implementation |
| Decision output | Application runtime | Result association, fault handling and output timing |
For deployment mechanics beyond this architecture check, use the guide to swapping a neural network model on edge vision hardware. Here, the purchasing decision depends on fitting the complete pipeline, not just replacing its backbone.
Verify operators, tensor shapes and numerical agreement
Prepare an interface sheet for every boundary between stages. Record the tensor name, shape, element type, layout and owning runtime. Include intermediate feature outputs, not only the final image score.
A backbone can compile while its surrounding feature processing remains unsupported. Resize modes, padding, pooling, concatenation, indexing and dynamic shape operations deserve separate checks. Operator names alone are insufficient: compiler support can depend on attributes, dimensions and data types.
Fixed image and tensor shapes often simplify compilation and buffer allocation. They also make workload estimates repeatable. However, a fixed input does not prove that every intermediate operation is supported.
Request a compiler report showing which operations execute on the accelerator and which fall back to the CPU. A successful conversion with extensive fallback may perform very differently from an accelerator-only demonstration.
Compare the reference and target implementations at these boundaries:
- Prepared input image, including channel order and normalization.
- Each selected backbone feature map.
- Aligned and concatenated patch embeddings.
- Nearest-neighbor distances for selected patches.
- Final map, image score and pass/fail decision.
Use normal samples, clear anomalies and borderline examples. Agreement on a few obvious defects does not establish agreement near the production threshold.
Size the memory bank and the search workspace
Start with the stored embedding matrix. Its minimum data size follows directly from the number of bank vectors, their dimension and their representation.
Here, N is the bank vector count, D is the embedding dimension, and b is bytes per embedding element. Q is the query patch count per image, while s is bytes per stored distance.
For an illustrative bank containing 20,000 vectors with 512 elements stored as 32-bit floating point:
That is only the bank matrix. It excludes executable code, network weights, feature maps, image buffers, search indexes and temporary allocations. It also excludes any second bank copy created during loading or transfer.
Suppose an image produces 784 query embeddings. Their storage is:
Materializing every query-to-bank distance as a 32-bit value would require:
A blocked search can retain current nearest distances instead of allocating that full matrix. Its working memory still depends on block size, numerical representation and the selected search implementation.
These examples use decimal megabytes. Use consistent units when comparing your estimates with runtime memory reports, which may display binary units.
Request measured peak memory during startup and steady operation. A bank that fits after initialization can still fail while the loader temporarily holds multiple representations.
Choose a nearest-neighbor implementation deliberately
An accelerator that runs the backbone does not automatically provide a nearest-neighbor runtime. Confirm whether the intended library can execute on the device's operating system, processor architecture and available compute interfaces.
If that library is unavailable, the legitimate alternatives include a supported exact-search implementation, a supported approximate index, or a revised deployment architecture. Each requires validation; changing the search backend is not merely a packaging task.
For exhaustive search, the rough comparison workload grows with Q × N × D. Using the preceding example:
This is a workload indicator, not an execution-time prediction or an exact instruction count. Vectorization, memory access, blocking and distance formulation strongly affect runtime.
| Search choice | Main advantage | Main check before adoption |
|---|---|---|
| Exact blocked search | Straightforward comparison with a reference | Throughput and temporary memory |
| Approximate search | Potential reduction in search work | Missed neighbors and score changes |
| Smaller representative bank | Lower storage and search workload | Coverage of normal variation |
| Lower-precision embeddings | Reduced storage and transfer volume | Distance accuracy and threshold stability |
Approximate search can miss the true nearest normal embedding. Quantization can change distances in either direction. Both can shift anomaly scores, so evaluate detection performance again rather than retaining the original threshold automatically.
Also establish whether the scoring implementation uses Euclidean or squared Euclidean distances. The nearest vector may remain the same, but the score scale and any subsequent weighting can change.
For multiple product families, decide whether recipes need separate banks. The discussion of training anomaly detection across multiple product classes helps distinguish shared appearance variation from genuinely separate inspection tasks.
Budget CPU–accelerator transfers and complete latency
Splitting feature extraction onto an accelerator and search onto an onboard CPU can be reasonable. The split succeeds only if tensor access, synchronization and search fit the timing budget together.
Trace the data path. Does the runtime expose intermediate embeddings directly? Must it copy them into host-accessible memory? Does changing layout allocate another buffer? Can the next image run while the previous image is searched?
For the illustrative query tensor, a CPU-side search would consume about 1.6 MB of embeddings per image. That figure excludes intermediate feature tensors and any duplicated copies. It is not a measured transfer rate or a claim about a particular device.
The guide to feeding GPU tensors to a vision model without a CPU round trip explains why memory ownership and runtime interoperability matter. Shared physical memory does not, by itself, establish a zero-copy application path.
Build a serial timing estimate before considering overlap:
For an illustrative sequence, assume stage times of 6, 3, 14, 4, 18 and 2 milliseconds:
A requirement of 20 images/s gives a 50 ms interval, leaving only 3 ms of nominal margin. That is a fragile result before scheduling variation and other application work.
Pipeline overlap may improve throughput without reducing single-image latency. Measure both, and reject designs whose queues grow continuously under sustained input. Follow the distinction between CPU time and wall-clock time in vision benchmarking when reporting timing evidence.
Choose hardware by execution evidence, not category labels
Start with smart cameras and vision sensors when a self-contained inspection device is the preferred architecture. Use the camera finder to narrow acquisition requirements, then verify software deployment separately.
The LS-SMC-0063 is a catalog candidate for the acquisition discussion. Its listing does not establish support for a custom PatchCore runtime, accessible intermediate tensors or an onboard nearest-neighbor implementation.
- Interface
- GigE
- Resolution
- Up to 3 MP
Consider vision controllers when the workload needs a separate processing device. This changes the system boundary: the camera supplies images while the controller executes the inspection application. It is not camera-only inference.
The MV-VC2140-128G40-1T is a catalog candidate for that controller discussion. Confirm the required operating environment, runtime dependencies and measured performance before choosing it for this workload.
- LAN ports
- 3-4 LAN ports
- USB 3 ports
- 2 USB 3 ports
- Light outputs
- 4 built-in channels
- Memory
- 8 GB
Neither product card is evidence of algorithm compatibility. Ask for a written support matrix and a representative end-to-end demonstration, or plan a feasibility evaluation before committing the machine design.
Verify the result path and unattended startup
A fast feature extractor is not useful if its score changes meaning after deployment. Preserve feature alignment, distance calculation, map interpolation and image-score aggregation from the validated reference, or document and validate each intentional change.
Some PatchCore implementations include image-score weighting beyond a simple maximum patch distance. Replacing that logic with a different reduction creates a different scoring pipeline. For the downstream decision process, use ONNX anomaly detection inference from maps to pass/fail.
Require each result to retain its image or trigger identifier. When processing overlaps, completion order may differ from acquisition order. A correct score attached to the wrong part is an inspection failure.
Test cold startup without an external inference host. Verify bank loading, recipe selection, threshold loading and readiness reporting before accepting triggers. Missing or incompatible assets should produce an explicit inspection fault, not a normal-part decision.
Checks before ordering and when to change architecture
Use this acceptance checklist with the actual model, representative bank and intended image stream:
- Confirm compiled operators, fallback locations and fixed tensor interfaces.
- Record network, bank, index and preprocessing versions together.
- Measure peak memory during startup, recipe changes and sustained operation.
- Compare intermediate embeddings and final decisions against the reference.
- Report median, upper-percentile and maximum observed end-to-end latency.
- Test the largest intended bank and the slowest supported recipe.
- Verify bounded queues and correct result-to-trigger association.
- Restart without an inference host and confirm explicit readiness and fault states.
Choose a different architecture when search dominates latency, the runtime cannot expose embeddings, or memory headroom disappears during bank loading. Options include reducing the bank with validation, selecting a lighter feature extractor, using a separate controller, or evaluating an anomaly method with a different inference structure.
Do not make camera-only execution the acceptance criterion if it compromises defect detection or operational reliability. The useful outcome is a validated inspection system with a clear execution boundary.
Bring your tensor shapes, bank dimensions, compiler report and latency target to applications support before selecting parts. Those details allow a meaningful hardware discussion instead of an assumption based on model export alone.
Questions
Does exporting PatchCore to ONNX prove it can run standalone?
No. An ONNX export may represent only the feature extractor or part of the embedding pipeline. Standalone deployment also needs supported preprocessing, memory-bank loading, nearest-neighbor search, scoring and decision output. Verify the complete execution path on the intended device rather than relying on export success.
How much memory does a PatchCore memory bank need?
Multiply the bank vector count by the embedding dimension and bytes per element to estimate matrix storage. Then add search-index overhead, feature tensors, temporary buffers, runtime allocations and possible loading copies. Measure peak memory because steady-state bank storage alone does not describe the full requirement.
Can feature extraction run on an accelerator while search runs on the CPU?
Yes, that split is possible when the device provides a compatible CPU runtime and access to the required embeddings. Its suitability depends on search workload, tensor copies, synchronization and total latency. Accelerator performance alone cannot establish whether the split meets an inspection deadline.
Is approximate nearest-neighbor search suitable for inspection?
It can be useful, but it changes the search behavior and may change anomaly scores. Compare it with exact search on normal variation, representative defects and borderline samples. Revalidate thresholds and detection performance before treating its speed improvement as a deployment benefit.
What should buyers request before selecting an embedded device?
Request a complete inference run using representative images and the intended bank size, including startup and output handling. Review operator placement, peak memory, score agreement and latency distribution. A backbone benchmark or product category label does not establish support for the complete application.

