From 5308224addefe398e55f54f714188ed9a89c1104 Mon Sep 17 00:00:00 2001 From: linxie47 Date: Tue, 17 Dec 2024 12:00:02 +0800 Subject: [PATCH] Refine build (#26) * Use a simple and clear build script * Add CodeQL and using the new build script * Exclude some directories * refine the documents * Further refine the readme --- .github/workflows/codeql.yml | 102 +++++++++++ README.md | 136 +++++++++------ build.sh | 176 +++++++++++++++++++ build_ivsr.sh | 308 --------------------------------- docs/docker_image_build.md | 22 ++- docs/figs/logo.bmp | Bin 135054 -> 0 bytes docs/figs/logo.png | Bin 0 -> 7168 bytes docs/generic_manual_build.md | 16 +- docs/quick_try_manual_build.md | 10 +- ivsr_setupvar.sh | 31 ---- 10 files changed, 391 insertions(+), 410 deletions(-) create mode 100644 .github/workflows/codeql.yml create mode 100755 build.sh delete mode 100755 build_ivsr.sh delete mode 100644 docs/figs/logo.bmp create mode 100644 docs/figs/logo.png delete mode 100755 ivsr_setupvar.sh diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..54bf2d6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,102 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + schedule: + - cron: '19 6 * * 0' + +permissions: + contents: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ matrix.runner-os }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + runner-os: [ 'ubuntu-22.04' ] + language: [c-cpp] + build-mode: [manual] + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + + defaults: + run: + shell: bash + + steps: + - name: 'Harden Runner' + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 + with: + egress-policy: audit + + - name: Checkout repository + #uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2 + + - name: Check disk space + run: df -h + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + #uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 + with: + languages: ${{ matrix.language }} + # Passing a config that excludes specific directories + config: | + paths-ignore: + - ivsr_ffmpeg_plugin/ffmpeg + - ivsr_ov/based_on_openvino_2022.3/openvino + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - name: Git config + run: | + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + + - name: Build + run: | + chmod a+x ./build.sh + ./build.sh --ov_version 2024.5 + echo 'build ivsr completed!' + + - name: Perform CodeQL Analysis + #uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 + with: + category: "/language:${{matrix.language}}" diff --git a/README.md b/README.md index 48a8542..448c3c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- +
@@ -8,7 +8,7 @@ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/OpenVisualCloud/iVSR/badge)](https://api.securityscorecards.dev/projects/github.com/OpenVisualCloud/iVSR) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/9795/badge)](https://bestpractices.coreinfrastructure.org/projects/9795) [![Dependency Review](https://github.com/OpenVisualCloud/iVSR/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/OpenVisualCloud/iVSR/actions/workflows/dependency-review.yml) -[![CodeQL](https://github.com/OpenVisualCloud/iVSR/actions/workflows/codeql.yml/badge.svg)](https://github.com/OpenVisualCloud/iVSR/actions/workflows/codeql.yml)
+[![CodeQL](https://github.com/OpenVisualCloud/iVSR/actions/workflows/codeql.yml/badge.svg)](https://github.com/OpenVisualCloud/iVSR/actions/workflows/codeql.yml) [![License](https://img.shields.io/badge/license-BSD_3_Clause-stable.svg)](https://github.com/OpenVisualCloud/iVSR/blob/master/LICENSE.md) [![Contributions](https://img.shields.io/badge/contributions-welcome-blue.svg)](https://github.com/OpenVisualCloud/iVSR/wiki) [![Ubuntu-DockerFile-Build](https://github.com/OpenVisualCloud/iVSR/actions/workflows/ubuntu-build-docker.yml/badge.svg)](https://github.com/OpenVisualCloud/iVSR/actions/workflows/ubuntu-build-docker.yml) @@ -33,11 +33,9 @@ 5. [License](#5-license) # 1. Overview of iVSR ## 1.1 What is iVSR -iVSR aims to facilitate AI media processing with exceptional quality and performance on Intel's hardware. +iVSR facilitates AI media processing with exceptional quality and performance on Intel hardware. -iVSR offers a patch-based, heterogeneous, multi-GPU, and multi-algorithm solution, -harnessing the full capabilities of Intel's CPUs and GPUs. -And iVSR is adaptable for deployment on a single device, a distributed system, cloud infrastructure, edge cloud, or K8S environment. +iVSR offers a patch-based, heterogeneous, multi-GPU, and multi-algorithm solution, harnessing the full capabilities of Intel CPUs and GPUs. It is adaptable for deployment on a single device, a distributed system, cloud infrastructure, edge cloud, or K8S environment.
@@ -46,10 +44,10 @@ And iVSR is adaptable for deployment on a single device, a distributed system, c ## 1.2 Why is iVSR needed -- Simple APIs are provided, ensuring that any changes to the OpenVINO API remain hidden. -- A patch-based solution is offered to facilitate inference on hardware with limited memory capacity. This is particularly useful for super-resolution of high-resolution input videos, such as 4K. +- Simple APIs ensure that any changes to the OpenVINO API remain hidden. +- A patch-based solution facilitates inference on hardware with limited memory capacity, particularly useful for super-resolution of high-resolution input videos, such as 4K. - The iVSR SDK includes features to safeguard AI models created by Intel, which contain Intel IP. -- The iVSR SDK is versatile and can support a wide range of AI media processing algorithms. +- The iVSR SDK is versatile and supports a wide range of AI media processing algorithms. - For specific algorithms, performance optimization can be executed to better align with customer requirements. ## 1.3 iVSR Components @@ -57,62 +55,89 @@ This repository or package includes the following major components: ### 1.3.1 iVSR SDK The iVSR SDK is a middleware library that supports various AI video processing filters. It is designed to accommodate different AI inference backends, although currently, it only supports OpenVINO.
-For a detailed introduction to the iVSR SDK API, please refer to [this introduction](./ivsr_sdk/README.md#api-introduction).We've also included a `vsr_sample` as a demonstration of its usage.
+For a detailed introduction to the iVSR SDK API, please refer to [this introduction](./ivsr_sdk/README.md#api-introduction). + +We've also included a `vsr_sample` as a demonstration of its usage. -### 1.3.2 iVSR FFmpeg plugin In order to support the widely-used media processing solution FFmpeg, we've provided an iVSR SDK plugin to simplify integration.
-This plugin is integrated into FFmpeg's [`dnn_processing` filter](https://ffmpeg.org/ffmpeg-filters.html#dnn_005fprocessing-1) in the libavfilter library, serving as a new `ivsr` backend to this filter. Please note that the patches provided in this project are specifically for FFmpeg n6.1.
+This plugin is integrated into FFmpeg's `dnn_processing` filter in the [FFmpeg documentation](https://ffmpeg.org/ffmpeg-filters.html#dnn_005fprocessing-1) in the libavfilter library, serving as a new `ivsr` backend to this filter. Please note that the patches provided in this project are specifically for FFmpeg n6.1.
### 1.3.3 OpenVINO patches and extension In [this folder](./ivsr_ov/based_on_openvino_2022.3/patches), you'll find patches for OpenVINO that enable the Enhanced BasicVSR model. These patches utilize OpenVINO's [Custom OpenVINO™ Operations](https://docs.openvino.ai/latest/openvino_docs_Extensibility_UG_add_openvino_ops.html) feature, which allows users to support models with custom operations not inherently supported by OpenVINO.
These patches are specifically for OpenVINO 2022.3, meaning the Enhanced BasicVSR model will only work on OpenVINO 2022.3 with these patches applied.
- ## 1.4 Capabilities of iVSR -Currently, iVSR offers two AI media processing functionalities: Video Super Resolution (VSR), and Smart Video Processing (SVP) for bandwidth optimization. Both functionalities can be run on Intel CPUs and Intel GPUs (including Flex170, Arc770) via OpenVINO and FFmpeg. - +Currently, iVSR offers two AI media processing functionalities: Video Super Resolution (VSR) and Smart Video Processing (SVP) for bandwidth optimization. Both functionalities can be run on Intel CPUs and Intel GPUs (including Flex170, Arc770) via OpenVINO and FFmpeg. ### 1.4.1 Video Super Resolution (VSR) -Video Super Resolution (VSR) is a technique extensively employed in the AI media enhancement domain to upscale low-resolution videos to high-resolution. iVSR supports `Enhanced BasicVSR`, `Enhanced EDSR`, `TSENet`, and has the capability to be extended to support additional models. +Video Super Resolution (VSR) is a technique extensively employed in the AI media enhancement domain to upscale low-resolution videos to high-resolution. iVSR supports `Enhanced BasicVSR`, `Enhanced EDSR`, and `TSENet`. It also has the capability to be extended to support additional models. - #### i. Enhanced BasicVSR `BasicVSR` is a publicly available AI-based VSR algorithm. For more details on the public `BasicVSR`, please refer to this [paper](https://arxiv.org/pdf/2012.02181.pdf).

- We have improved the public model to attain superior visual quality and reduced computational complexity, named `Enhanced BasicVSR`. The performance of the `Enhanced BasicVSR` model inference has also been optimized for Intel GPUs. Please note that this optimization is specific to OpenVINO 2022.3. Therefore, the Enhanced BasicVSR model only works with OpenVINO 2022.3 with the applied patches.

- The input shape of this model is `[1, (channels)3, (frames)3, H, W]`, and the output shape is `[1, (channels)3, (frames)3, 2xH, 2xW]`. + We have improved the public model to attain superior visual quality and reduced computational complexity. This improved model is named `Enhanced BasicVSR`. The performance of the `Enhanced BasicVSR` model inference has also been optimized for Intel GPUs. Please note that this optimization is specific to OpenVINO 2022.3. Therefore, the Enhanced BasicVSR model only works with OpenVINO 2022.3 with the applied patches.

+ The input shape of this model and the output shape are: + ```plaintext + Input shape: [1, (channels)3, (frames)3, H, W] + Output shape: [1, (channels)3, (frames)3, 2xH, 2xW] + ``` - #### ii. Enhanced EDSR `EDSR` is another publicly available AI-based single image SR algorithm. For more details on the public EDSR, please refer to this [paper](https://arxiv.org/pdf/1707.02921.pdf)

- We have improved the public `EDSR` model to reduce the computational complexity by over 79% compared to Enhanced BasicVSR, while maintaining similar visual quality, named `Enhanced EDSR`.

- The input shape of this model is `[1, (channels)3, H, W]`, and the output shape is `[1, (channels)3, 2xH, 2xW]`. + We have improved the public `EDSR` model to reduce the computational complexity by over 79% compared to Enhanced BasicVSR. This improvement maintains similar visual quality and is named `Enhanced EDSR`.

+ The input shape of this model and the output shape are: + ```plaintext + Input shape: [1, (channels)3, H, W] + Output shape: [1, (channels)3, 2xH, 2xW] + ``` - #### iii. TSENet `TSENet` is one multi-frame SR algorithm derived from [ETDS](https://github.com/ECNUSR/ETDS).

We provide a preview version of the feature to support this model in the SDK and its plugin. Please contact your Intel representative to obtain the model package.

- The input shape of this model is `[1, (channels * frames)9, H, W]`, and the output shape is `[1, (channels)3, 2xH, 2xW]`. For each inference, the input data is the `(n-1)th`, `(n)th`, and `(n+1)th` frames combined. The output data is the `(N)th` frame. For the first frame, the input data is `1st`, `1st`, `2nd` frames combined. For the last frame, the input data is the `(n-1)th`, `(n)th`, `(n)th` frames combined.
+ The input shape of this model and the output shape are: + ```plaintext + Input shape: [1, (channels * frames)9, H, W] + Output shape: [1, (channels)3, 2xH, 2xW] + ``` + For each inference, the input data is the `(n-1)th`, `(n)th`, and `(n+1)th` frames combined. The output data is the `(N)th` frame. For the first frame, the input data is `1st`, `1st`, `2nd` frames combined. For the last frame, the input data is the `(n-1)th`, `(n)th`, `(n)th` frames combined. ### 1.4.2. Smart Video Processing (SVP) -`SVP` is an AI-based video prefilter that enhances the perceptual rate-distortion in video encoding. With `SVP`, the encoded video streams maintain the same visual quality while reducing bandwidth.
+`SVP` is an AI-based video prefilter that enhances perceptual rate-distortion in video encoding. With `SVP`, encoded video streams maintain the same visual quality while reducing bandwidth usage.
+ +Two SVP model variants are provided: -Two SVP model variances are provided. `SVP-Basic` model is one efficiency-oriented designed model, it preserves fidelity while reducing the encoded bitrate. Modifications to images/video by SVP-Basic pre-processing cannot be perceived by human eyes while they can be measured by no to minor BD-rates degradation if it’s measured by SSIM or MS-SSIM metrics. SVP-Basic model is adaptive to almost all video scenarios, including live sport, live gaming, livestream sales, VOD, video conference, video surveillance, and 5G video ring.
-`SVP-SE` model is designed for subjective video quality preservation with up to 50% bitrate saving. It targets human eyes plausible enhancement, reduces complex details like human-eyes insensitive patterns and noise; hence it can’t be evaluated by popular full-reference visual quality metrics including PSNR/SSIM/VMAF/etc. It improves the visibility and quality of visuals, making them more vivid and appealing to viewers, so it’s widely used in various industries, including entertainment, media and advertising, to enhance the visual experience and attract audience attention.

-The input and output shape are `[1, (channels)3, H, W]` for RGB based model and `[1, (channels)1, H, W]` for Y based model.
+- **SVP-Basic**: This model is designed for efficiency, preserving fidelity while reducing the encoded bitrate. Modifications made by SVP-Basic are imperceptible to the human eye but can be measured by minor BD-rate degradation when evaluated using SSIM or MS-SSIM metrics. SVP-Basic is adaptable to various video scenarios, including live sports, gaming, livestream sales, VOD, video conferencing, video surveillance, and 5G video streaming.
+ +- **SVP-SE**: This model focuses on subjective video quality preservation, achieving up to 50% bitrate savings. It enhances visuals by reducing complex details and noise that are less perceptible to human eyes. As a result, it cannot be evaluated by traditional full-reference visual quality metrics like PSNR, SSIM, or VMAF. SVP-SE improves the visibility and quality of visuals, making them more vivid and appealing, which is beneficial in industries such as entertainment, media, and advertising.
+ +The input and output shapes are: +- RGB based model: + ```plaintext + Input shape: [1, (channels)3, H, W] + Output shape: [1, (channels)3, H, W] + ``` +- Y based model: + ```plaintext + Input shape: [1, (channels)1, H, W] + Output shape: [1, (channels)1, H, W] + ``` +
# 2. Setup iVSR env on linux The software was validated on: - Intel Xeon hardware platform -- (Optional) Intel Data Center GPU Flex 170(*aka* ATS-M1 150W) -- Host OS: Linux based OS (Ubuntu 22.04 or Rocky Linux 9.3) -- Docker OS: Ubuntu 22.04 or Rocky Linux 9.3 -- OpenVINO: [2022.3](https://github.com/openvinotoolkit/openvino/tree/2022.3.0) or [2023.2](https://github.com/openvinotoolkit/openvino/tree/2023.2.0) or [2024.5](https://github.com/openvinotoolkit/openvino/tree/2024.5.0) +- (Optional) Intel® Data Center GPU Flex 170(*aka* ATS-M1 150W) +- Host OS: Linux-based OS (Ubuntu 22.04 or Rocky Linux 9.3) +- Docker-based OS: Ubuntu 22.04 or Rocky Linux 9.3 +- OpenVINO: [2022.3](https://github.com/openvinotoolkit/openvino/tree/2022.3.0), [2023.2](https://github.com/openvinotoolkit/openvino/tree/2023.2.0), or [2024.5](https://github.com/openvinotoolkit/openvino/tree/2024.5.0) - FFmpeg: [n6.1](https://github.com/FFmpeg/FFmpeg/tree/n6.1) -Building iVSR requires the installation of the GPU driver(optional), OpenCV, OpenVINO, and FFmpeg.
+Building iVSR requires the installation of the GPU driver (optional), OpenCV, OpenVINO, and FFmpeg. We provide **three** ways to install requirements and build iVSR SDK & iVSR FFmpeg plugin:
1. [Install dependencies and build iVSR manually](#22-install-dependencies-and-build-ivsr-manually)
2. [Install dependencies and build iVSR by scripts](#23-install-dependencies-and-build-ivsr-by-scripts)
3. [Install dependencies and build iVSR by Dockerfile](#24-install-dependencies-and-build-ivsr-by-dockerfile)
-Note that to run inference on a **GPU**, it is necessary to have **kernel packages** installed on the bare metal system beforehand. See [Install GPU kernel packages ](#21-optional-install-gpu-kernel-packages) for details.
+Note that to run inference on a **GPU**, it is necessary to have **kernel packages** installed on the bare metal system beforehand. See [Install GPU kernel packages](#21-optional-install-gpu-kernel-packages) for details.
## 2.1 (Optional) Install GPU kernel packages Refer to this [instruction](https://dgpu-docs.intel.com/driver/installation.html#ubuntu-package-installation) for the installation guide on Ubuntu. GPU runtime driver/packages are also installed in script and dockerfile provided. @@ -120,48 +145,49 @@ Refer to this [instruction](https://dgpu-docs.intel.com/driver/installation.html ## 2.2 Install dependencies and build iVSR manually Here are two guides for your reference:
-One is generic in case you are familiar with Intel® devices and have experience in Intel® developed software before, which you can follow the official steps to build OpenCV and OpenVINO by source code. You can get it from: [Generic manual building guide](docs/generic_manual_build.md#generic-manual-build-steps-for-ffmpeg--ivsr-plugin-software)
-Another option is a tutorial for absolute beginners to try to build the project following every step in the guide based on a clean Ubuntu OS installed machine. [Quick manual building guide](docs/quick_try_manual_build.md#manual-build-steps-for-ffmpeg--ivsr-plugin-software-on-ubuntu) +1. **Generic Manual Building Guide**: If you are familiar with Intel® devices and have experience with Intel® developed software, follow the official steps to build OpenCV and OpenVINO from source code. Refer to the [Generic manual building guide](docs/generic_manual_build.md#generic-manual-build-steps-for-ffmpeg--ivsr-plugin-software).
+2. **Quick Manual Building Guide**: For absolute beginners, this tutorial provides step-by-step instructions to build the project on a clean Ubuntu OS. Refer to the [Quick manual building guide](docs/quick_try_manual_build.md#manual-build-steps-for-ffmpeg--ivsr-plugin-software-on-ubuntu).
+ +## 2.3 Install dependencies and build iVSR using scripts +We provide a `build.sh` script to facilitate building the entire project from source on a clean Ubuntu 22.04-based Linux machine. -## 2.3 Install dependencies and build iVSR by scripts -We provide shell scripts `build_ivsr.sh` and `ivsr_setupvar.sh` to assist in building the dependencies from source code and setting up the environment from scratch.
```bash -#ivsr environment building -chmod a+x ./build_ivsr.sh -sudo ./build_ivsr.sh --enable_ov_patch --enable_compile_ffmpeg true --ov_version <2022.3|2023.2|2024.5> -#environment variables setting -source ./ivsr_setupvar.sh --ov_version <2022.3|2023.2|2024.5> +chmod a+x ./build.sh +./build.sh --ov_version [2022.3|2023.2|2024.5] ``` -The scripts accept the following input parameters:
-- `enable_ov_patch`: Determines whether to enable OpenVINO patches, which are necessary to run the Enhanced BasicVSR model.
-- `enable_compile_ffmpeg`: Determines whether to compile FFmpeg. Set this to `false` if you're only using the iVSR SDK sample.
-- `ov_version`: Specifies the OpenVINO version. iVSR supports `2022.3`, `2023.2` and `2024.5`. Note that running the Enhanced BasicVSR model requires `2022.3`.
-Feel free to modify and update these scripts as per your requirements. For new released OpenVINO version, please follow the [manual build](#22-install-dependencies-and-build-ivsr-manually) guide.
+The script accepts the following parameter: +- `ov_version`: Specifies the OpenVINO version. iVSR supports `2022.3`, `2023.2`, and `2024.5`. Note that running the Enhanced BasicVSR model requires `2022.3`. +After the build is complete, set the environment variables. For OpenVINO 2022.3: -## 2.4 Install dependencies and build iVSR by Dockerfile -Dockerfiles are also provided to expedite the environment setup process. Follow the guide to build the docker image and run the application in the docker containers: [Docker image build guide](docs/docker_image_build.md#docker-image-build-guide).
+```bash +source /ivsr_ov/based_on_openvino_2022.3/openvino/install/setupvars.sh +``` + +For other OpenVINO versions installed via official packages, manual environment setup is not required. + +Once the build is successfully completed, refer to [section 3.2](#32-run-with-ffmpeg) for instructions on using the FFmpeg command line to run the pipelines. Feel free to modify and update these scripts as needed. For newly released OpenVINO versions, please follow the [manual build](#22-install-dependencies-and-build-ivsr-manually) guide. + +## 2.4 Install dependencies and build iVSR using Dockerfile +To simplify the environment setup, Dockerfiles are provided. Follow the [Docker image build guide](docs/docker_image_build.md#docker-image-build-guide) to build the Docker image and run the application in Docker containers. # 3. How to use iVSR -Both `vsr_sample` and FFmpeg integration are provided to run inference on the iVSR SDK. Execute the following commands to setup the env before executing them.
+You can run inference on the iVSR SDK using either the `vsr_sample` or the `ffmpeg` integrated with the iVSR plugin. Before running them, set up the environment with the following commands: ```bash source /install/setupvars.sh export LD_LIBRARY_PATH=/ivsr_sdk/lib:/install/lib:$LD_LIBRARY_PATH ``` -Please note that the current solution is of `pre-production` quality.
- +Note that the current solution is of `pre-production` quality. ## 3.1 Run with iVSR SDK sample -`vsr_sample` has been developed using the iVSR SDK and OpenCV. For guidance on how to run inference with it, please refer to this [section](./ivsr_sdk/README.md#vsr-sample).
+The `vsr_sample` is developed using the iVSR SDK and OpenCV. For detailed instructions on running inference with it, refer to this [section](./ivsr_sdk/README.md#vsr-sample). ## 3.2 Run with FFmpeg -Once the FFmpeg plugin patches have been applied and FFmpeg has been built, you can refer to [the FFmpeg cmd line samples](ivsr_ffmpeg_plugin/README.md#how-to-run-inference-with-ffmpeg-plugin) for instructions on how to run inference with FFmpeg.
+After applying the FFmpeg plugin patches and building FFmpeg, refer to [the FFmpeg command line samples](ivsr_ffmpeg_plugin/README.md#how-to-run-inference-with-ffmpeg-plugin) for instructions on running inference with FFmpeg. # 4. Model files -Only models in OpenVINO IR format is supported by iVSR. Please reach out to your Intel representative to obtain the model files which are not included in the package.
- +iVSR supports only models in OpenVINO IR format. Contact your Intel representative to obtain the model files, as they are not included in the repo. # 5. License iVSR is licensed under the BSD 3-clause license. See [LICENSE](LICENSE.md) for details. - diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..f783c99 --- /dev/null +++ b/build.sh @@ -0,0 +1,176 @@ +#!/bin/bash + +set -e + +base_dir=$(pwd) +ov_version=2022.3 + +# Function to display usage information +usage() { + echo "Usage: $0 --ov_version [2022.3|2023.2|2024.5]" + exit 1 +} + +prepare_dependencies() { + echo "Preparing dependencies..." + sudo apt-get install -y --no-install-recommends \ + curl ca-certificates gpg-agent software-properties-common + + sudo apt-get install -y --no-install-recommends --fix-missing \ + autoconf \ + automake \ + build-essential \ + apt-utils cmake cython3 flex bison gcc g++ git make patch pkg-config wget \ + libdrm-dev libudev-dev libtool libusb-1.0-0-dev xz-utils ocl-icd-opencl-dev opencl-headers \ + apt-utils gpg-agent software-properties-common wget python3-dev libpython3-dev python3-pip +} + +config_git_users() { + if [ -z "$(git config --global user.name)" ]; then + git config --global user.name "no name" + fi + + if [ -z "$(git config --global user.email)" ]; then + git config --global user.email "noname@example.com" + fi +} + +install_openvino_from_source() { + echo "Start building OpenVINO" + + ov_repo=https://github.com/openvinotoolkit/openvino.git + ov_branch=${ov_version}.0 + ivsr_ov_dir=${base_dir}/ivsr_ov/based_on_openvino_${ov_version}/openvino + if [ ! -d "${ivsr_ov_dir}" ]; then + git clone --depth 1 --branch ${ov_branch} ${ov_repo} ${ivsr_ov_dir} + git config --global --add safe.directory ${ivsr_ov_dir} + fi + cd ${ivsr_ov_dir} + git submodule update --init --recursive + + ## applying ov22.3 patches to enable Enhanced BasicVSR model + for patch_file in $(find ../patches -iname "*.patch" | sort -n);do + echo "Applying: ${patch_file}" + git am --whitespace=fix ${patch_file} + done + + mkdir -p build && cd build && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=${PWD}/../install \ + -DENABLE_INTEL_CPU=ON \ + -DENABLE_CLDNN=ON \ + -DENABLE_INTEL_GPU=ON \ + -DENABLE_ONEDNN_FOR_GPU=OFF \ + -DENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_PYTHON=ON \ + -DENABLE_OPENCV=ON \ + -DENABLE_SAMPLES=ON \ + -DENABLE_CPPLINT=OFF \ + -DTREAT_WARNING_AS_ERROR=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ + -DENABLE_DEBUG_CAPS=ON \ + -DENABLE_GPU_DEBUG_CAPS=ON \ + -DENABLE_CPU_DEBUG_CAPS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + .. && \ + make -j $(nproc --all) && \ + make install + echo "Build OpenVINO finished." + + source ${PWD}/../install/setupvars.sh +} + +build_install_ivsr_sdk() { + echo "Building and installing iVSR SDK..." + + ivsr_sdk_dir=${base_dir}/ivsr_sdk/ + cd ${ivsr_sdk_dir} + mkdir -p build && cd build && cmake \ + -DENABLE_LOG=OFF -DENABLE_PERF=OFF -DENABLE_THREADPROCESS=ON \ + -DCMAKE_BUILD_TYPE=Release .. && \ + make -j $(nproc --all) + sudo make install + echo "Build ivsr sdk finished." +} + +build_ffmpeg() { + echo "Building FFMPEG with specific libraries support..." + sudo -E apt-get update && \ + DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config nasm yasm libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev \ + python3-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev \ + libcurl4-gnutls-dev librtmp-dev mjpegtools libx264-dev libx265-dev libde265-dev libva-dev libtbb-dev + + # Add commands to build FFMPEG from source + ffmpeg_dir=$base_dir/ivsr_ffmpeg_plugin/ffmpeg + ffmpeg_repo=https://github.com/FFmpeg/FFmpeg.git + + if [ ! -d "${ffmpeg_dir}" ]; then + git clone --depth 1 --branch n6.1 ${ffmpeg_repo} ${ffmpeg_dir} + git config --global --add safe.directory ${ffmpeg_dir} + fi + + # Apply patches + cd ${ffmpeg_dir} && cp -rf $base_dir/ivsr_ffmpeg_plugin/patches/*.patch . + git am --whitespace=fix *.patch + + ./configure \ + --enable-gpl \ + --enable-nonfree \ + --disable-static \ + --disable-doc \ + --enable-shared \ + --enable-version3 \ + --enable-libivsr \ + --enable-libx264 \ + --enable-libx265 + + make -j$(nproc) + sudo make install + sudo ldconfig +} + +install_openvino_from_apt() { + echo "Installing OpenVINO from apt..." + local version=$1 + + wget -qO - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add - + + echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2023.list + echo "deb https://apt.repos.intel.com/openvino/2024 ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2024.list + + sudo -E apt-get update && \ + DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y openvino-$version.0 +} + +main() { + while [ "$1" != "" ]; do + case $1 in + --ov_version ) shift + ov_version=$1 + ;; + * ) usage + exit 1 + esac + shift + done + + prepare_dependencies + config_git_users + if [ "$ov_version" = "2022.3" ]; then + install_openvino_from_source + else + install_openvino_from_apt "$ov_version" + fi + build_install_ivsr_sdk + build_ffmpeg +} + +main "$@" \ No newline at end of file diff --git a/build_ivsr.sh b/build_ivsr.sh deleted file mode 100755 index 4efde04..0000000 --- a/build_ivsr.sh +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/bash -set -e - -PROJECTDIR=${PWD} -# Function to display usage information -usage() { - echo "Usage: $0 --enable_ov_patch [true|false] - --enable_compile_ffmpeg [true|false] - --ov_version [2022.3|2023.2|2024.5]" - exit 1 -} - - - -# Initialize variables -ENABLE_OV_PATCH="false" -ENABLE_COMPILE_FFMPEG="true" -OV_VERSION="2022.3" - - - -# Parse command line arguments -while [ $# -gt 0 ]; do - case "$1" in - --enable_ov_patch) - shift - ENABLE_OV_PATCH=$(echo "$1" | tr '[:upper:]' '[:lower:]') - if [ "$ENABLE_OV_PATCH" != "true" ] && [ "$ENABLE_OV_PATCH" != "false" ]; then - usage - exit 1 - fi - ;; - --enable_compile_ffmpeg) - shift - ENABLE_COMPILE_FFMPEG=$(echo "$1" | tr '[:upper:]' '[:lower:]') - if [ "$ENABLE_COMPILE_FFMPEG" != "true" ] && [ "$ENABLE_COMPILE_FFMPEG" != "false" ]; then - usage - exit 1 - fi - ;; - --ov_version) - shift - if [ "$1" = "2022.3" ] || [ "$1" = "2023.2" ] || [ "$1" = "2024.5" ]; then - OV_VERSION=$1 - else - usage - exit 1 - fi - ;; - *) - # If the flag doesn't match any known option, display usage message - usage - ;; - esac - shift # Move to the next argument -done - -if [ "$OV_VERSION" != "2022.3" ]; then - ENABLE_OV_PATCH="false" - echo "There is no openvino patches for openvino $OV_VERSION, will ignore the setting of ENABLE_OV_PATCH" -fi - - - -# 1.Install pre-requisites -apt-get update && DEBIAN_FRONTEND=noninteractive && apt-get install -y --no-install-recommends --fix-missing \ - build-essential \ - ca-certificates \ - curl \ - cmake \ - cython3 \ - flex \ - bison \ - gcc \ - g++ \ - git \ - libdrm-dev \ - libudev-dev \ - libtool \ - libusb-1.0-0-dev \ - make \ - patch \ - patchelf \ - pkg-config \ - xz-utils \ - ocl-icd-opencl-dev \ - opencl-headers \ - apt-utils \ - gpg-agent \ - software-properties-common \ - wget \ - python3-dev libpython3-dev python3-pip - -apt-get clean -pip --no-cache-dir install --upgrade pip==23.0 setuptools==65.5.0 -pip install numpy==1.23.5 - - - -# 2.Build and Install opencv -echo "Start building OpenCV" -OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz -cd ${PROJECTDIR}/.. && wget -qO - ${OPENCV_REPO} | tar xz -OPENCV_BASE=${PROJECTDIR}/../opencv-4.5.3-openvino-2021.4.2 -cd ${OPENCV_BASE} && mkdir -p build && mkdir -p install && cd build - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${OPENCV_BASE}/install \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - -DWITH_OPENEXR=OFF \ - -DWITH_OPENJPEG=OFF \ - -DWITH_GSTREAMER=OFF \ - -DWITH_JASPER=OFF \ - -DWITH_FFMPEG=OFF \ - -DPYTHON3_EXECUTABLE=/usr/bin/python3 \ - .. - make -j "$(nproc)" - make install -cd ${OPENCV_BASE}/install/bin && bash ./setup_vars_opencv4.sh -echo "Build OpenCV finished." - - - -# 3.install GPU runtime drivers -## 3.1 Add the online network repository of intel graphics. -rm -f /usr/share/keyrings/intel-graphics.gpg -no_proxy=$no_proxy wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg -echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy flex' | \ - tee /etc/apt/sources.list.d/intel.gpu.jammy.list - -## 3.2-1 BKC for OV2022.3 -if [ "$OV_VERSION" = "2022.3" ]; then - apt-get update - # repository to install Intel(R) GPU drivers - xargs apt-get install -y --no-install-recommends --fix-missing < ${PROJECTDIR}/ivsr_sdk/dgpu_umd_stable_555_0124.txt - apt-get install -y vainfo clinfo - apt-get clean -fi - -## 3.2-2 BKC for other OV versions -if [ "$OV_VERSION" != "2022.3" ]; then - apt-get update - apt-get install -y vainfo clinfo - apt-get install -y --no-install-recommends ocl-icd-libopencl1 - apt-get clean - #hadolint ignore=DL3003 - mkdir /tmp/gpu_deps && cd /tmp/gpu_deps - curl -L -O https://github.com/intel/compute-runtime/releases/download/23.05.25593.11/libigdgmm12_22.3.0_amd64.deb - curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13700.14/intel-igc-core_1.0.13700.14_amd64.deb - curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13700.14/intel-igc-opencl_1.0.13700.14_amd64.deb - curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/intel-opencl-icd_23.13.26032.30_amd64.deb - curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/libigdgmm12_22.3.0_amd64.deb - dpkg -i ./*.deb - rm -rf /tmp/gpu_deps - cd ${PROJECTDIR} -fi - - - -# 4. Build OpenVINO -if [ -z "$(git config --global user.name)" ]; then - git config --global user.name "no name" -fi - -if [ -z "$(git config --global user.email)" ]; then - git config --global user.email "noname@example.com" -fi -echo "Start building OpenVINO" -export LD_LIBRARY_PATH=${OPENCV_BASE}/install/lib:$LD_LIBRARY_PATH -export OpenCV_DIR=${OPENCV_BASE}/install/lib/cmake/opencv4 -OV_REPO=https://github.com/openvinotoolkit/openvino.git -OV_BRANCH=${OV_VERSION}.0 -IVSR_OV_DIR=${PROJECTDIR}/ivsr_ov/based_on_openvino_${OV_VERSION}/openvino -git clone ${OV_REPO} ${IVSR_OV_DIR} -cd ${IVSR_OV_DIR} -git config --global --add safe.directory ${IVSR_OV_DIR} -git checkout ${OV_BRANCH} -git submodule update --init --recursive - -## 4.1 applying ov22.3 patches to enable Enhanced BasicVSR model -if [ "$ENABLE_OV_PATCH" = "true" ] && [ "$OV_VERSION" = "2022.3" ]; then - for patch_file in $(find ../patches -iname "*.patch" | sort -n);do - echo "Applying: ${patch_file}" - git am --whitespace=fix ${patch_file} - done -fi - -cd ${IVSR_OV_DIR} -mkdir -p build && cd build && \ -cmake \ - -DCMAKE_INSTALL_PREFIX=${PWD}/../install \ - -DENABLE_INTEL_CPU=ON \ - -DENABLE_CLDNN=ON \ - -DENABLE_INTEL_GPU=ON \ - -DENABLE_ONEDNN_FOR_GPU=OFF \ - -DENABLE_INTEL_GNA=OFF \ - -DENABLE_INTEL_MYRIAD_COMMON=OFF \ - -DENABLE_INTEL_MYRIAD=OFF \ - -DENABLE_PYTHON=ON \ - -DENABLE_OPENCV=ON \ - -DENABLE_SAMPLES=ON \ - -DENABLE_CPPLINT=OFF \ - -DTREAT_WARNING_AS_ERROR=OFF \ - -DENABLE_TESTS=OFF \ - -DENABLE_GAPI_TESTS=OFF \ - -DENABLE_BEH_TESTS=OFF \ - -DENABLE_FUNCTIONAL_TESTS=OFF \ - -DENABLE_OV_CORE_UNIT_TESTS=OFF \ - -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ - -DENABLE_DEBUG_CAPS=ON \ - -DENABLE_GPU_DEBUG_CAPS=ON \ - -DENABLE_CPU_DEBUG_CAPS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - .. && \ -make -j $(nproc --all) && \ -make install -bash ${PWD}/../install/setupvars.sh -echo "Build OpenVINO finished." - - - -#5. Build iVSR-SDK -CUSTOM_OV_INSTALL_DIR=${IVSR_OV_DIR}/install -CUSTOM_IE_DIR=${CUSTOM_OV_INSTALL_DIR}/runtime -CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/lib/intel64 -export OpenVINO_DIR=${CUSTOM_IE_DIR}/cmake -export InferenceEngine_DIR=${CUSTOM_IE_DIR}/cmake -export TBB_DIR=${CUSTOM_IE_DIR}/3rdparty/tbb/cmake -export ngraph_DIR=${CUSTOM_IE_DIR}/cmake -export LD_LIBRARY_PATH=${CUSTOM_IE_DIR}/3rdparty/tbb/lib:${CUSTOM_IE_LIBDIR}:$LD_LIBRARY_PATH - -echo "Start building ivsr sdk." -IVSR_SDK_DIR=${PROJECTDIR}/ivsr_sdk/ -mkdir -p ${IVSR_SDK_DIR}/build -cd ${IVSR_SDK_DIR}/build -cmake .. \ - -DENABLE_LOG=OFF -DENABLE_PERF=OFF -DENABLE_THREADPROCESS=ON \ - -DCMAKE_BUILD_TYPE=Release -make -j $(nproc --all) -make install -echo "Build ivsr sdk finished." - - - -#6. Build ffmpeg with iVSR SDK backend, disable it if you don't need it. -if ${ENABLE_COMPILE_FFMPEG}; then - echo "Start building FFMPEG" - apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ca-certificates tar g++ wget pkg-config nasm yasm libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev \ - libx11-dev \ - libxv-dev \ - libxt-dev \ - libasound2-dev \ - libpango1.0-dev \ - libtheora-dev \ - libvisual-0.4-dev \ - libgl1-mesa-dev \ - libcurl4-gnutls-dev \ - librtmp-dev \ - mjpegtools \ - libx264-dev \ - libx265-dev \ - libde265-dev \ - libva-dev - export LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:/usr/local/lib:$LD_LIBRARY_PATH - FFMPEG_IVSR_SDK_PLUGIN_DIR=${PROJECTDIR}/ivsr_ffmpeg_plugin - FFMPEG_DIR=${FFMPEG_IVSR_SDK_PLUGIN_DIR}/ffmpeg - FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg.git - FFMPEG_VERSION=n6.1 - git clone ${FFMPEG_REPO} ${FFMPEG_DIR} - cd ${FFMPEG_DIR} - git config --global --add safe.directory ${FFMPEG_DIR} - git checkout ${FFMPEG_VERSION} - - cp ${PROJECTDIR}/ivsr_ffmpeg_plugin/patches/*.patch ${FFMPEG_DIR}/ - cd ${FFMPEG_DIR} && { set -e; - for patch_file in $(find -iname "*.patch" | sort -n); do - echo "Applying: ${patch_file}"; - git am --whitespace=fix ${patch_file}; - done; } - if [ -f "${CUSTOM_OV_INSTALL_DIR}/setvars.sh" ]; then - . ${CUSTOM_OV_INSTALL_DIR}/setvars.sh - fi - export LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:${CUSTOM_IE_LIBDIR}:${TBB_DIR}/../lib:"$LD_LIBRARY_PATH" - cd ${FFMPEG_DIR} - ./configure \ - --extra-cflags=-fopenmp \ - --extra-ldflags=-fopenmp \ - --enable-libivsr \ - --disable-static \ - --disable-doc \ - --enable-shared \ - --enable-vaapi \ - --enable-gpl \ - --enable-libx264 \ - --enable-libx265 \ - --enable-version3 - make -j $(nproc --all) - make install - echo "Build FFMPEG finished." -fi - diff --git a/docs/docker_image_build.md b/docs/docker_image_build.md index af64ae0..9d17cef 100644 --- a/docs/docker_image_build.md +++ b/docs/docker_image_build.md @@ -22,15 +22,27 @@ sudo systemctl restart docker cd ./ivsr_ffmpeg_plugin ./build_docker.sh --enable_ov_patch [true|false] --ov_version [2022.3|2023.2|2024.5|2024.5s] --os_version [rockylinux9|ubuntu22] ``` -- `enable_ov_patch`: Set as `true` or `flase` to enable or disable the application of OpenVINO 2022.3 patches, which are needed to support the Enhanced BasicVSR model.
-- `ov_version`: Set the OpenVINO version to `2022.3`, `2023.2`, `2024.5`, `2024.5s`, which will be built and installed, the 2024.5s mean install openvino 2024.5 via apt or yum not build and install from source code. iVSR currently supports both OpenVINO 2022.3, 2023.2 and 2024.5, but the patches to enable the Enhanced BasicVSR model are only for OpenVINO 2022.3.
-- `os_version`: Set OS version of Docker image to ubuntu22(Ubuntu 22.04) or rockylinux9(Rocky Linux 9.3) to build docker image based on specific OS.
-If the docker image builds successfully, you can see a docker image named `ffmpeg_ivsr_sdk_${os_version}_ov${ov_version}` such as `ffmpeg_ivsr_sdk_ubuntu22_ov2022.3` or `ffmpeg_ivsr_sdk_rockylinux9_ov2022.3` in the output of `docker image ls`.
+- `enable_ov_patch`: Set as `true` or `false` to enable or disable the application of OpenVINO 2022.3 patches, which are needed to support the Enhanced BasicVSR model. +- `ov_version`: Set the OpenVINO version to `2022.3`, `2023.2`, `2024.5`, or `2024.5s`. These versions will be built and installed. The `2024.5s` version means installing OpenVINO 2024.5 via apt or yum, not building and installing from source code. iVSR currently supports OpenVINO 2022.3, 2023.2, and 2024.5. However, the patches to enable the Enhanced BasicVSR model are only for OpenVINO 2022.3. +- `os_version`: Set OS version of Docker image to `ubuntu22` (Ubuntu 22.04) or `rockylinux9` (Rocky Linux 9.3) to build docker image based on specific OS. + +If the docker image builds successfully, you can see a docker image named `ffmpeg_ivsr_sdk_${os_version}_ov${ov_version}` such as `ffmpeg_ivsr_sdk_ubuntu22_ov2022.3` or `ffmpeg_ivsr_sdk_rockylinux9_ov2022.3` in the output of `docker image ls`. ### 4. Start Docker Container ```bash -sudo docker run -itd --name ffmpeg_ivsr_sdk_container --privileged -e MALLOC_CONF="oversize_threshold:1,background_thread:true,metadata_thp:auto,dirty_decay_ms:9000000000,muzzy_decay_ms:9000000000" -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy --shm-size=128g --device=/dev/dri:/dev/dri ffmpeg_ivsr_sdk_[ubuntu22|rockylinux9]_[ov2022.3|ov2023.2|ov2024.5]:latest bash +# The backslash at the end of the line indicates that the command continues on the next line +sudo docker run -itd --name ffmpeg_ivsr_sdk_container --privileged \ + -e MALLOC_CONF="oversize_threshold:1,background_thread:true,metadata_thp:auto,dirty_decay_ms:9000000000,muzzy_decay_ms:9000000000" \ + -e http_proxy=$http_proxy \ + -e https_proxy=$https_proxy \ + -e no_proxy=$no_proxy \ + --shm-size=128g \ + --device=/dev/dri:/dev/dri \ + ffmpeg_ivsr_sdk__:latest bash + +# Open another shell terminal to interact with the running container sudo docker exec -it ffmpeg_ivsr_sdk_container bash ``` + Note `--device=/dev/dri:/dev/dri` is specified in the command to add the host gpu device to container.
\ No newline at end of file diff --git a/docs/figs/logo.bmp b/docs/figs/logo.bmp deleted file mode 100644 index d46a7b9f4cd1a77c99677f25693f35b60dd4b24d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135054 zcmeHQ`JbFcoyPqK_P71GySg8DS6vlwy*Nb_JWvr7gQ9=}iXwuFC@zQ)L2fo7ksHDd zxh9iia%XZ*W-@2yJ~Q|9eIL_z&vf?bev@}!y5Fw1-uJC~yE{|!sZ_pi)wiyv>gl)M zIxoL!YzFegyxI{nJ^6e+36vC&iyYKp-Fx z5C{ka1Ofs9fq+0jARrJB2nYlO0s;YnfIvVXAP^7;2m}NI0s(=5KtLcM5D*9m1Ox&C z0fB%(Kp-Fx5C{ka1Ofs9fq+0jARrJB2nYlO0s;YnfIvVXAP^7;2m}NI0s(=5KtLcM z5D*9m1Ox&C0fB%(Kp-Fx5C{ka1Ofs9fq+0jARrJB2nYlO0s?_0jKJ)cWwV=?&2G82 zV6&8iLv>3SS5b6<02KncY}~ftJllpZ@UW+LKR}fUp(GGk!U)7?cH1_bKbNN=V|(Da zk9V!QUh0=~8?BrMCKlEy+sTko)x7i(~>qm^-{uJ1as%Ah7fhNV?kcAA=ms(97p4 zIoSL16-y6YQDT9BHUh!!mG;e-+3PRM+XZ7&$Y$KTp8iiI2O%f?liC@o9gW3wG#i;p zdAj1Wd*;X9i}XJq?tcy@GPEW(QID_el)FPRXzx6;Ak3YOWq z>j$>Ymoqmr8!s&)ARg^4FI2FkCX-%B`cv+9)K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7YNPi~rF?o%`NoXV3Frr%F>aU_o8rO=ymijj z+5f{Fz?a+tKwqoXbQ;U`v#nJyo}x~coh3&K%3h!zuMmVlrcg$H1vpk%A2E;wfFZA- g!U(|s{~dgQcoxnTMem`v{P&Khs;H?@3$+OQAL5jO(*OVf literal 0 HcmV?d00001 diff --git a/docs/generic_manual_build.md b/docs/generic_manual_build.md index 93b846c..a033ebf 100644 --- a/docs/generic_manual_build.md +++ b/docs/generic_manual_build.md @@ -1,19 +1,19 @@ # Generic Manual Build Steps for FFmpeg + IVSR plugin Software ### 1. (Optional) Install software for Intel® Data Center GPU Flex Series -To facilitate inference on Intel Data Center GPU, it's necessary to have both the kernel driver and the run-time driver and software installed. If you're planning to run inference on a CPU only, you can disregard this step.
+To facilitate inference on Intel Data Center GPU, it's necessary to have both the kernel driver and the run-time driver and software installed. Disregard this step if running inference on a CPU only.
-The detailed installation instruction is on [this page](https://dgpu-docs.intel.com/driver/installation.html#).
+The detailed installation instruction is on [this page](https://dgpu-docs.intel.com/driver/installation.html#). ### 2. Install OpenCV -OpenCV, which is used by the iVSR SDK sample for image processing tasks, needs to be installed. Detailed installation instructions can be found at [Installation OpenCV in Linux](https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html).
+OpenCV, which is used by the iVSR SDK sample for image processing tasks, needs to be installed. Detailed installation instructions can be found at [Installation OpenCV in Linux](https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html). ### 3. Install OpenVINO -OpenVINO, currently the only backend supported by iVSR for model inference, should also be installed. You can refer to this [instruction](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_linux.md) to build OpenVINO from the source code.
+OpenVINO, currently the only backend supported by iVSR for model inference, should also be installed. You can refer to this [instruction](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_linux.md) to build OpenVINO from the source code. ### 4. Build iVSR SDK -Once the dependencies are installed in the system, you can proceed to build the iVSR SDK and its sample.
+Once the dependencies are installed in the system, you can proceed to build the iVSR SDK and its sample. ```bash source /install/setupvars.sh export OpenCV_DIR=/install/lib/cmake/opencv4 @@ -25,7 +25,7 @@ make make install ``` ### 5. Build FFmpeg with iVSR plugin -We provide patches specifically for FFmpeg n6.1. Apply these patches as instructed below:
+We provide patches specifically for FFmpeg n6.1. Apply these patches as instructed below: ```bash git clone https://github.com/FFmpeg/FFmpeg.git ./ivsr_ffmpeg_plugin/ffmpeg cd ./ivsr_ffmpeg_plugin/ffmpeg @@ -36,9 +36,9 @@ for patch_file in $(find -iname "*.patch" | sort -n); do \ git am --whitespace=fix ${patch_file}; \ done; ``` -Finally, build FFmpeg. You can also enable other FFmpeg plugins as per the instructions provided in the [Compile FFmpeg for Ubuntu](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu) guide.
+Finally, build FFmpeg. You can also enable other FFmpeg plugins as per the instructions provided in the [Compile FFmpeg for Ubuntu](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu) guide. ```bash -source /install/setupvars.sh +source /install/setupvars.sh ./configure --enable-libivsr --extra-cflags=-fopenmp --extra-ldflags=-fopenmp make -j $(nproc --all) make install diff --git a/docs/quick_try_manual_build.md b/docs/quick_try_manual_build.md index e0a45a3..0d3d362 100644 --- a/docs/quick_try_manual_build.md +++ b/docs/quick_try_manual_build.md @@ -101,7 +101,7 @@ git am --whitespace=fix *.patch make -j$(nproc) sudo make install -# Set the library path for FFmpeg or run ldconfig +# Set the library path for FFmpeg to ensure it can find the necessary shared libraries export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH # Run ffmpeg to test if it can run successfully @@ -127,14 +127,17 @@ curl -L -O https://github.com/intel/compute-runtime/releases/download/24.31.3050 sudo dpkg -i ./*.deb rm -Rf /tmp/gpu_deps ``` +Also, you can download the latest gpu driver from the [official website](https://github.com/intel/compute-runtime/releases). -Also, you can download the latest gpu driver from the official website: https://github.com/intel/compute-runtime/releases ### 7. Environment Configuration for GPU Set the environment variables required for GPU drivers: ```bash +# Set the driver name for VA-API to use Intel's iHD driver export LIBVA_DRIVER_NAME=iHD + +# Set the path where VA-API can find the driver export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri ``` @@ -165,8 +168,9 @@ cmake \ -DWITH_FFMPEG=OFF \ -DPYTHON3_EXECUTABLE=/usr/bin/python3 \ .. + make -j "$(nproc)" sudo make install +# The setup_vars_opencv4.sh script sets up the environment variables required for OpenCV. cd ${OPENCV_BASE}/install/bin && bash ./setup_vars_opencv4.sh - ``` diff --git a/ivsr_setupvar.sh b/ivsr_setupvar.sh deleted file mode 100755 index 92a89cc..0000000 --- a/ivsr_setupvar.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -OV_VERSION="2022.3" -# Parse the --ov_version -while [ $# -gt 0 ]; do - case "$1" in - --ov_version) - shift - if [ "$1" = "2022.3" ] || [ "$1" = "2023.2" ] || [ "$1" = "2024.5" ]; then - OV_VERSION=$1 - else - echo "Usage: $0 --ov_version [2022.3|2023.2|2024.5]" - exit 1 - fi - shift - ;; - *) - echo "Usage: $0 --ov_version [2022.3|2023.2|2024.5]" - exit 1 - ;; - esac -done -PROJECTDIR=${PWD} -IVSR_OV_DIR=${PROJECTDIR}/ivsr_ov/based_on_openvino_${OV_VERSION}/openvino -CUSTOM_OV_INSTALL_DIR=${IVSR_OV_DIR}/install -IVSR_SDK_DIR=${PROJECTDIR}/ivsr_sdk/ -CUSTOM_IE_DIR=${CUSTOM_OV_INSTALL_DIR}/runtime -CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/lib/intel64 -export OpenCV_DIR=${PROJECTDIR}/../opencv-4.5.3-openvino-2021.4.2/install/lib/cmake/opencv4 -export LD_LIBRARY_PATH=${PROJECTDIR}/../opencv-4.5.3-openvino-2021.4.2/install/lib:${IVSR_SDK_DIR}/lib:${CUSTOM_IE_DIR}/3rdparty/tbb/lib:/usr/local/lib:${CUSTOM_IE_LIBDIR}:$LD_LIBRARY_PATH -bash ${CUSTOM_OV_INSTALL_DIR}/setupvars.sh -sudo ldconfig