File size: 1,232 Bytes
b708b7c
 
 
 
 
 
209d261
b708b7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---

language: en
library_name: onnxruntime
pipeline_tag: image-classification
tags: [plant-disease, image-classification, onnx, onnxruntime, cpu-inference]
---


# Cambium Plant Disease Detector

CPU-optimized MobileNetV2 image classifier exported to ONNX and validated with ONNX Runtime.

## Model details

- Runtime: ONNX Runtime
- Execution provider: CPUExecutionProvider
- Input: `pixel_values`, float32 NCHW tensor with shape `[1, 3, 224, 224]`
- Preprocessing: RGB, resize to 257px, center crop to 224px, then ImageNet normalization.
- Output: `logits`; map output indices using `idx_to_class.json`.

## Intended use

Research and demonstration plant-disease image classification only. This is not a substitute for advice from a qualified agronomist or plant pathologist.

## Files

- `model.onnx`: portable ONNX model.
- `model_optimized.onnx`: ONNX Runtime graph-optimized CPU model.
- `idx_to_class.json`: output-index mapping.
- `metadata.json`: parity and latency validation results.

## Validation

The export script compares PyTorch and ONNX logits and fails if maximum absolute error exceeds `1e-3`. It also benchmarks CPU inference and records mean and p95 latency in `metadata.json`.