apocaliss92 commited on
Commit
4ea7cdd
Β·
verified Β·
1 Parent(s): 50e6bdc

source: the INT8 recipe decision is D818 (renumbered from D798)

Browse files
source/build-camstack-models.py CHANGED
@@ -45,7 +45,7 @@ Formats:
45
  int8 convert_lib.quantize_openvino_int8: NNCF post-training quantisation
46
  of the ONNX, calibrated on the first N images (sorted by path,
47
  recursively; an export folder's frames/ only) of --calib-dir
48
- (default $CAMSTACK_CALIB_DIR or ./calibration-images). Recipe (D798):
49
  preset MIXED, full bias correction, the Detect head in float β€”
50
  its own ops (DFL + box decode) for a YOLOv9 head, all of it for
51
  YOLO26's end-to-end head; every conv before it is INT8
@@ -62,18 +62,18 @@ equivalent but not bit-identical IR (NNCF picks ranges from the data).
62
  Which recipe each hosted INT8 IR carries. All were built from the HOSTED ONNX
63
  with OpenVINO 2026.2.1 + NNCF 3.2.0 on the first N COCO val2017 images
64
  (reproduce with `--reuse-onnx`, the mirror's .onnx placed under --out):
65
- D798 recipe (this script, since 2026-10-09 β€” MIXED, full bias correction,
66
  the Detect head in float; docs/benchmarks/2026-10-09-int8-recipe.md):
67
  yolov9{t,s,m,c}-{320,640}, yolo26{n,s,l} @640, yolo26n-320,
68
  yolo26{n,s}-256
69
  NNCF defaults, centred calibration (convert_lib 2026-10-08 β†’ 2026-10-09,
70
- the mirror's source/archive/convert_lib-before-2026-10-09.py β€” kept: the D798
71
  build was more accurate but 11-22 % slower on the Intel iGPU):
72
  yolo26{m,x} @640, yolo26{m,l}-256
73
  NNCF defaults, top-left calibration (convert_lib before 2026-10-08,
74
  source/archive/convert_lib-before-2026-10-08.py β€” kept, same reason):
75
  yolo26{s,m,l}-320
76
- The D798 build reproduces every replaced IR's .bin bit for bit
77
  (docs/benchmarks/2026-10-09-int8-recipe.md).
78
 
79
  Toolchain: each recipe names the Ultralytics / torch / coremltools / OpenVINO
 
45
  int8 convert_lib.quantize_openvino_int8: NNCF post-training quantisation
46
  of the ONNX, calibrated on the first N images (sorted by path,
47
  recursively; an export folder's frames/ only) of --calib-dir
48
+ (default $CAMSTACK_CALIB_DIR or ./calibration-images). Recipe (D818):
49
  preset MIXED, full bias correction, the Detect head in float β€”
50
  its own ops (DFL + box decode) for a YOLOv9 head, all of it for
51
  YOLO26's end-to-end head; every conv before it is INT8
 
62
  Which recipe each hosted INT8 IR carries. All were built from the HOSTED ONNX
63
  with OpenVINO 2026.2.1 + NNCF 3.2.0 on the first N COCO val2017 images
64
  (reproduce with `--reuse-onnx`, the mirror's .onnx placed under --out):
65
+ D818 recipe (this script, since 2026-10-09 β€” MIXED, full bias correction,
66
  the Detect head in float; docs/benchmarks/2026-10-09-int8-recipe.md):
67
  yolov9{t,s,m,c}-{320,640}, yolo26{n,s,l} @640, yolo26n-320,
68
  yolo26{n,s}-256
69
  NNCF defaults, centred calibration (convert_lib 2026-10-08 β†’ 2026-10-09,
70
+ the mirror's source/archive/convert_lib-before-2026-10-09.py β€” kept: the D818
71
  build was more accurate but 11-22 % slower on the Intel iGPU):
72
  yolo26{m,x} @640, yolo26{m,l}-256
73
  NNCF defaults, top-left calibration (convert_lib before 2026-10-08,
74
  source/archive/convert_lib-before-2026-10-08.py β€” kept, same reason):
75
  yolo26{s,m,l}-320
76
+ The D818 build reproduces every replaced IR's .bin bit for bit
77
  (docs/benchmarks/2026-10-09-int8-recipe.md).
78
 
79
  Toolchain: each recipe names the Ultralytics / torch / coremltools / OpenVINO
source/convert_lib.py CHANGED
@@ -160,7 +160,7 @@ def int8_ignored_patterns(head: str, end_to_end: bool) -> "list[str]":
160
  def quantize_openvino_int8(
161
  onnx_path: str, out_xml: str, calib_dir: str, imgsz: int, max_samples: int = 300
162
  ) -> None:
163
- """NNCF post-training INT8. For an Ultralytics detector (D798): preset MIXED
164
  (asymmetric activations), full bias correction, and the Detect head in
165
  float β€” its own ops for a DFL head, all of it for an end-to-end one
166
  (`int8_ignored_patterns`). Any other model keeps NNCF's defaults. Measured in
@@ -188,7 +188,7 @@ def quantize_openvino_int8(
188
  "fast_bias_correction": False,
189
  "ignored_scope": nncf.IgnoredScope(patterns=int8_ignored_patterns(head, end_to_end), validate=False),
190
  }
191
- # Not an Ultralytics detector: NNCF defaults, as before D798 (unmeasured otherwise).
192
  quantized = nncf.quantize(ov_model, dataset, subset_size=len(images), **options)
193
  Path(out_xml).parent.mkdir(parents=True, exist_ok=True)
194
  ov.save_model(quantized, out_xml)
 
160
  def quantize_openvino_int8(
161
  onnx_path: str, out_xml: str, calib_dir: str, imgsz: int, max_samples: int = 300
162
  ) -> None:
163
+ """NNCF post-training INT8. For an Ultralytics detector (D818): preset MIXED
164
  (asymmetric activations), full bias correction, and the Detect head in
165
  float β€” its own ops for a DFL head, all of it for an end-to-end one
166
  (`int8_ignored_patterns`). Any other model keeps NNCF's defaults. Measured in
 
188
  "fast_bias_correction": False,
189
  "ignored_scope": nncf.IgnoredScope(patterns=int8_ignored_patterns(head, end_to_end), validate=False),
190
  }
191
+ # Not an Ultralytics detector: NNCF defaults, as before D818 (unmeasured otherwise).
192
  quantized = nncf.quantize(ov_model, dataset, subset_size=len(images), **options)
193
  Path(out_xml).parent.mkdir(parents=True, exist_ok=True)
194
  ov.save_model(quantized, out_xml)