Skip to content

Commit 546c939

Browse files
Quantization support
1 parent 71f9551 commit 546c939

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

backends/openvino/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Before you begin, ensure you have openvino installed and configured on your syst
4646

4747
```bash
4848
git clone https://github.com/daniil-lyakhov/openvino.git
49-
cd openvino && git checkout dl/executorch/yolo12
49+
# WIP
50+
cd openvino && git checkout dl/yolo12_complete_support
5051
git submodule update --init --recursive
5152
sudo ./install_build_dependencies.sh
5253
mkdir build && cd build

examples/models/yolo12/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ set(_common_include_directories ${EXECUTORCH_ROOT}/..)
3232
find_package(executorch CONFIG REQUIRED PATHS ${EXECUTORCH_ROOT}/cmake-out)
3333
target_link_options_shared_lib(executorch)
3434

35+
add_subdirectory(${EXECUTORCH_ROOT}/third-party/gflags gflags)
3536
set(link_libraries gflags)
3637
list(APPEND link_libraries portable_ops_lib portable_kernels)
3738
target_link_options_shared_lib(portable_ops_lib)

examples/models/yolo12/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ This example demonstrates how to perform inference of [Ultralytics YOLO12 family
1010
- [OpenVINO](../../../backends/openvino/README.md)
1111
- [XNNPACK](../../../backends/xnnpack/README.md)
1212

13+
# Performance Evaluation
14+
15+
| CPU | Model | Backend | Device | Precision | Average Latency, ms |
16+
|--------------------------------|---------|----------|--------|-----------|-----------------|
17+
| Intel(R) Core(TM) Ultra 7 155H | yolo12s | openvino | CPU | FP32 | 88.3549 |
18+
| Intel(R) Core(TM) Ultra 7 155H | yolo12s | openvino | CPU | INT8 | 53.066 |
19+
| Intel(R) Core(TM) Ultra 7 155H | yolo12l | openvino | CPU | FP32 | 317.953 |
20+
| Intel(R) Core(TM) Ultra 7 155H | yolo12s | openvino | CPU | INT8 | 150.846 |
21+
| Intel(R) Core(TM) Ultra 7 155H | yolo12s | xnnpack | CPU | FP32 | 169.36 |
22+
| Intel(R) Core(TM) Ultra 7 155H | yolo12l | xnnpack | CPU | FP32 | 436.876 |
23+
1324

1425
# Instructions
1526

@@ -42,12 +53,16 @@ OpenVINO:
4253
python export_and_validate.py --model_name yolo12s --input_dims=[1920,1080] --backend openvino --device CPU
4354
```
4455

56+
OpenVINO quantized model:
57+
```bash
58+
python export_and_validate.py --model_name yolo12s --input_dims=[1920,1080] --backend openvino --quantize --video_input /path/to/calibration/video --device CPU
59+
```
60+
4561
XNNPACK:
4662
```bash
4763
python export_and_validate.py --model_name yolo12s --input_dims=[1920,1080] --backend xnnpack
4864
```
4965

50-
> **_NOTE:_** Quantization is comming soon!
5166

5267
Exported model could be validated using the `--validate` key:
5368

examples/models/yolo12/export_and_validate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def main(
228228
model = YOLO(model_name)
229229

230230
if quantize:
231-
raise NotImplementedError("Quantization is comming soon!")
232231
if video_path is None:
233232
raise RuntimeError(
234233
"Could not quantize model without the video for the calibration."

0 commit comments

Comments
 (0)