- OS: Ubuntu / macOS
- CMake >= 3.20
- gcc
- g++
- Python >= 3.6
git clone --branch 5.x https://github.com/opencv/opencv
import onnxscript as ost | |
from onnxscript import opset19 as op | |
import numpy as np | |
import onnx | |
import onnxruntime as ort | |
import time |
cmake_minimum_required(VERSION 3.5) | |
project(tests) | |
set(ORT_ROOT_DIR "/path/to/onnxruntime") | |
set(ORT_INCLUDE_DIR "${ORT_ROOT_DIR}/include") | |
set(ORT_BUILD_DIR "${ORT_ROOT_DIR}/build/MacOS/RelWithDebInfo") | |
#set(OCV_ROOT_DIR "/path/to/opencv") | |
#set(OCV_BUILD_DIR "${OCV_ROOT_DIR}/build/install") |
cmake_minimum_required(VERSION 3.13) | |
project("CLBlast performance test") | |
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
find_package(OpenCL) | |
find_package(CLBlast HINTS "/home/opencv-cn/Workspace/others/CLBlast/build/install") | |
message(STATUS "CLBlast_FOUND=${CLBlast_FOUND}, CLBlast_INCLUDE_DIRS=${CLBlast_INCLUDE_DIRS}, CLBlast_LIBS=${CLBlast_LIBS}") |
''' | |
| Configuration | Gemm | InnerProduct | | |
| - | - | - | | |
| A=, B=, C=, transA=, transB=| - | - | | |
''' | |
import argparse |
# Installation
wget -q https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.2/linux/l_openvino_toolkit_ubuntu22_2023.2.0.13089.cfd42bd2cb0_x86_64.tgz -O openvino.tgz
sudo mkdir -p /opt/intel/openvino
sudo tar -xf openvino.tgz -C /opt/intel/openvino --strip-components=1
sudo apt-get install -y libtbb2 libpugixml1v5
# Install dependencies
cd /opt/intel/openvino/install_dependencies
sudo -E ./install_openvino_dependencies.sh
FROM ubuntu:18.04 | |
WORKDIR /root | |
RUN cp -a /etc/apt/sources.list /etc/apt/sources.list.bak \ | |
&& sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list \ | |
&& sed -i "s@https://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list \ | |
&& sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list \ | |
&& sed -i "s@https://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list \ | |
&& apt-get -y update \ | |
&& DEBIAN_FRONTEND=noninteractive apt install -y tzdata \ |
CANN (Compute Architecture of Neural Networks), developped by Huawei, is a heterogeneous computing architecture for AI. With CANN backend in OpenCV DNN, you can run your AI models on the Ascend NPU. Learn more about Ascend NPU and the CANN library from en_doc, cn_doc. Please note that OpenCV DNN supports CANN backend on Ascend 310 for now.
To use OpenCV DNN with CANN backend, read the following sections:
cmake_minimum_required(VERSION 3.16.3) | |
project(ascend-conv2d) | |
# Find OpenCV | |
find_package(OpenCV 4.5.4 REQUIRED) | |
include_directories(${OpenCV_INCLUDE_DIRS}) | |
FROM yuentau/ocv_ubuntu:20.04 | |
WORKDIR /opt | |
RUN git clone https://github.com/opencv/opencv | |
RUN cmake -B opencv-build -D WITH_TIMVX=ON opencv | |
RUN cmake --build opencv-build -j 8 | |
# unit tests | |
# 1. setup env var | |
# 2. run tests |