diff --git a/Graph-API.md b/Graph-API.md index 11e96e6..411e89a 100644 --- a/Graph-API.md +++ b/Graph-API.md @@ -13,7 +13,7 @@ What it is? * G-API GPU backend implements the majority of available functions and allows to run OpenCL kernels on available OpenCL-programmable devices. At the moment, GPU backend is based on OpenCV Transparent API; in future versions it will be extended to support integration of arbitrary OpenCL kernels (and likely be renamed to "OpenCL backend"). -* G-API ONNX backend implements [ONNX models](https://github.com/onnx/models) inference operations on input data and outputs the results. At the moment, ONNX backend is based on [ONNX Runtime](https://github.com/microsoft/onnxruntime) C/C++ API. +* G-API ONNX backend implements [ONNX models](https://github.com/onnx/models) inference operations on input data and outputs the results. At the moment, ONNX backend is based on [ONNX Runtime](https://github.com/microsoft/onnxruntime) C/C++ API, build & run instruction can be found [here](https://github.com/opencv/opencv/wiki/Using-G-API-with-MS-ONNX-Runtime). # Building G-API @@ -52,27 +52,6 @@ cmake /path-to-opencv -DPlaidML2_DIR=path-to-miniconda3/share/plaidml2 -DWITH_PL /path-to-opencv-build/bin/opencv_test_gapi --gtest_filter=*GAPI_PlaidML_Pipelines* ``` -## Building with Microsoft ONNX Runtime support - -* Build and install the ONNX RT (currently tested with v1.14.1): - -```bash - $ git clone --recursive https://github.com/microsoft/onnxruntime.git - $ cd onnxruntime - $ git checkout v1.14.1 - $ git submodule update --init - $ ./build.sh --config Release --build_shared_lib --parallel \ - $ --cmake_extra_defines CMAKE_INSTALL_PREFIX=/path-to-install-dir - $ cd build/Linux/Release - $ make install -``` - -* Then specify extra options to OpenCV CMake: - -```bash - $ cmake /path-to-opencv -DWITH_ONNX=ON -DORT_INSTALL_DIR=/path-to-ort-install-dir -``` - ## Building with oneVPL Toolkit support * Build (https://github.com/oneapi-src/oneVPL) or install `oneVPL` from installation manager (https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html) @@ -230,30 +209,6 @@ $ ./downloader.py -o /path/to/opencv_extra/testdata/dnn/omz_intel_models/ \ --name age-gender-recognition-retail-0013 $ export OPENCV_DNN_TEST_DATA_PATH=/path/to/opencv_extra/testdata/dnn ``` -## With ONNX Runtime - -When you build G-API with ONNX Runtime support, tests for inference are enabled and require `OPENCV_GAPI_ONNX_MODEL_PATH` to be set: -```bash -$ export OPENCV_TEST_DATA_PATH=/path-to-opencv-extra/testdata -$ export OPENCV_GAPI_ONNX_MODEL_PATH=/path-to-onnx-models/ -``` -and [models](https://github.com/onnx/models) are downloaded using the commands: -```bash -$ git clone --recursive https://github.com/onnx/models.git -$ cd models -$ git lfs pull --include=path-to-desired-onnx-model --exclude="" -``` - -The following models are known to be required as for OpenCV 4.7: -```bash -git lfs pull --include vision/body_analysis/emotion_ferplus/model/emotion-ferplus-8.onnx --exclude="" -git lfs pull --include vision/classification/squeezenet/model/squeezenet1.0-9.onnx --exclude="" -git lfs pull --include vision/object_detection_segmentation/faster-rcnn/model/FasterRCNN-10.onnx --exclude="" -git lfs pull --include vision/object_detection_segmentation/ssd-mobilenetv1/model/ssd_mobilenet_v1_10.onnx --exclude="" -git lfs pull --include vision/object_detection_segmentation/tiny-yolov2/model/tinyyolov2-8.onnx --exclude="" -git lfs pull --include vision/object_detection_segmentation/yolov3/model/yolov3-10.onnx --exclude="" -``` - Submitting G-API PRs ====================