Views
No views yet
yolov10n_full_integer_quant.tflite uses INT8 input and output tensors.
The other two artifacts expose FP32 input and output boundaries. Applications
must select preprocessing and post-processing according to the tensor metadata
of the chosen artifact.| File | Input | Output | Quantized tensors | Bytes | SHA-256 |
|---|---|---|---|---|---|
yolov10n_full_integer_quant.tflite | INT8 [1,640,640,3], scale 1/255, zero point -128 | INT8 [1,300,6], scale 0.310396, zero point -128 | 504 | 3,092,615 | 8dcf014175eb327af880661f295d3c97faf31f4cc52d246e26e4854273388875 |
yolov10n_integer_quant.tflite | FP32 [1,640,640,3] | FP32 [1,300,6] | 503 | 3,092,559 | eaa6447d1516db8cc45b37a7deb904790342886654ce7a7bb32f84ff80477597 |
yolov10n_int8.tflite | FP32 [1,640,640,3] | FP32 [1,300,6] | 77 | 3,125,847 | 6319e564bac432d8fc95d82fee06c4cb37879ce4830eb5bb1c292a65e644f105 |
1import numpy as np
2from PIL import Image
3import tensorflow as tf
4
5interpreter = tf.lite.Interpreter("yolov10n_full_integer_quant.tflite")
6interpreter.allocate_tensors()
7inp = interpreter.get_input_details()[0]
8out = interpreter.get_output_details()[0]
9
10rgb = Image.open("image.jpg").convert("RGB").resize((640, 640))
11real = np.asarray(rgb, dtype=np.float32)[None] / 255.0
12in_scale, in_zero = inp["quantization"]
13input_int8 = np.clip(np.rint(real / in_scale + in_zero), -128, 127).astype(np.int8)
14
15interpreter.set_tensor(inp["index"], input_int8)
16interpreter.invoke()
17raw = interpreter.get_tensor(out["index"])
18out_scale, out_zero = out["quantization"]
19detections = (raw.astype(np.float32) - out_zero) * out_scale
20print(detections.shape) # (1, 300, 6)[x1, y1, x2, y2, score, class_id], but
the missing original export manifest means this convention must be confirmed
with a known test image before production use.1QnnDelegate.Options qnn = new QnnDelegate.Options();
2qnn.setSkelLibraryDir(context.getApplicationInfo().nativeLibraryDir);
3qnn.setCacheDir(context.getCacheDir().getAbsolutePath());
4qnn.setModelToken("yolov10n_full_integer_quant");
5qnn.setBackendType(QnnDelegate.Options.BackendType.HTP_BACKEND);
6qnn.setHtpPerformanceMode(
7 QnnDelegate.Options.HtpPerformanceMode.HTP_PERFORMANCE_BURST);
8qnn.setHtpPrecision(QnnDelegate.Options.HtpPrecision.HTP_PRECISION_QUANTIZED);
9
10QnnDelegate delegate = new QnnDelegate(qnn);
11Interpreter.Options options = new Interpreter.Options();
12options.setUseNNAPI(false);
13options.setUseXNNPACK(false);
14options.addDelegate(delegate);
15Interpreter interpreter = new Interpreter(modelBuffer, options);HTP_RUNTIME_QUANTIZED, and verify there is no unintended CPU fallback.Ultralytics/YOLO11 as the base model while the
repository and files are named YOLOv10n. The TFLite binaries do not contain
enough embedded text metadata to resolve that discrepancy. The base-model tag
is therefore intentionally omitted until the original checkpoint and export
command are recovered.