{"id":13437717,"url":"https://github.com/CVCUDA/CV-CUDA","last_synced_at":"2025-03-19T18:30:29.711Z","repository":{"id":65010218,"uuid":"527819251","full_name":"CVCUDA/CV-CUDA","owner":"CVCUDA","description":"CV-CUDA™ is an open-source, GPU accelerated library for cloud-scale image processing and computer vision.","archived":false,"fork":false,"pushed_at":"2025-03-03T21:30:37.000Z","size":25293,"stargazers_count":2461,"open_issues_count":61,"forks_count":222,"subscribers_count":45,"default_branch":"main","last_synced_at":"2025-03-13T16:01:53.459Z","etag":null,"topics":["bytedance","cloud","computer-vision","cpp","cuda","cv-cuda","gpu","image-processing","machine-learning","nvidia","python"],"latest_commit_sha":null,"homepage":"https://cvcuda.github.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CVCUDA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T03:30:37.000Z","updated_at":"2025-03-13T09:38:40.000Z","dependencies_parsed_at":"2024-02-20T22:30:29.674Z","dependency_job_id":"d39340a3-4536-4bff-a4f8-a1c697fde5e5","html_url":"https://github.com/CVCUDA/CV-CUDA","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVCUDA%2FCV-CUDA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVCUDA%2FCV-CUDA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVCUDA%2FCV-CUDA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVCUDA%2FCV-CUDA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CVCUDA","download_url":"https://codeload.github.com/CVCUDA/CV-CUDA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244483073,"owners_count":20460053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytedance","cloud","computer-vision","cpp","cuda","cv-cuda","gpu","image-processing","machine-learning","nvidia","python"],"created_at":"2024-07-31T03:00:59.620Z","updated_at":"2025-03-19T18:30:29.704Z","avatar_url":"https://github.com/CVCUDA.png","language":"C++","readme":"\n[//]: # \"SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION \u0026 AFFILIATES. All rights reserved.\"\n[//]: # \"SPDX-License-Identifier: Apache-2.0\"\n[//]: # \"\"\n[//]: # \"Licensed under the Apache License, Version 2.0 (the 'License');\"\n[//]: # \"you may not use this file except in compliance with the License.\"\n[//]: # \"You may obtain a copy of the License at\"\n[//]: # \"http://www.apache.org/licenses/LICENSE-2.0\"\n[//]: # \"\"\n[//]: # \"Unless required by applicable law or agreed to in writing, software\"\n[//]: # \"distributed under the License is distributed on an 'AS IS' BASIS\"\n[//]: # \"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\"\n[//]: # \"See the License for the specific language governing permissions and\"\n[//]: # \"limitations under the License.\"\n\n# CV-CUDA\n\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-yellogreen.svg)](https://opensource.org/licenses/Apache-2.0)\n\n![Version](https://img.shields.io/badge/Version-v0.14.0--beta-blue)\n\n![Platform](https://img.shields.io/badge/Platform-linux--64_%7C_win--64_wsl2%7C_aarch64-gray)\n\n[![CUDA](https://img.shields.io/badge/CUDA-v11.7-%2376B900?logo=nvidia)](https://developer.nvidia.com/cuda-toolkit-archive)\n[![GCC](https://img.shields.io/badge/GCC-v11.0-yellow)](https://gcc.gnu.org/gcc-11/changes.html)\n[![Python](https://img.shields.io/badge/python-v3.8_%7c_v3.9_%7c_v3.10%7c_v3.11-blue?logo=python)](https://www.python.org/)\n[![CMake](https://img.shields.io/badge/CMake-v3.20-%23008FBA?logo=cmake)](https://cmake.org/)\n\nCV-CUDA is an open-source project that enables building efficient cloud-scale\nArtificial Intelligence (AI) imaging and computer vision (CV) applications. It\nuses graphics processing unit (GPU) acceleration to help developers build highly\nefficient pre- and post-processing pipelines. CV-CUDA originated as a\ncollaborative effort between [NVIDIA][NVIDIA Develop] and [ByteDance][ByteDance].\n\nRefer to our [Developer Guide](DEVELOPER_GUIDE.md) for more information on the\noperators available.\n\n## Getting Started\n\nTo get a local copy up and running follow these steps.\n\n### Compatibility\n\n|CV-CUDA Build|Platform|CUDA Version|CUDA Compute Capability|Hardware Architectures|Nvidia Driver|Python Versions|Supported Compilers (build from source)|API compatibility with prebuilt binaries|OS/Linux distributions tested with prebuilt packages|\n|-|-|-|-|-|-|-|-|-|-|\n|x86_64_cu11|x86_64|11.7 or later|SM7 and later|Volta, Turing, Ampere, Hopper, Ada Lovelace|r525 or later*** |3.8, 3.9, 3.10, 3.11|gcc\u003e=9* \u003cbr\u003e gcc\u003e=11**|gcc\u003e=9|ManyLinux2014-compliant, Ubuntu\u003e= 20.04\u003cbr\u003eWSL2/Ubuntu\u003e=20.04|\n|x86_64_cu12|x86_64|12.2 or later|SM7 and later|Volta, Turing, Ampere, Hopper, Ada Lovelace|r525 or later***|3.8, 3.9, 3.10, 3.11|gcc\u003e=9* \u003cbr\u003e gcc\u003e=11**|gcc\u003e=9|ManyLinux2014-compliant, Ubuntu\u003e= 20.04\u003cbr\u003eWSL2/Ubuntu\u003e=20.04|\n|aarch64_cu12|aarch64 SBSA****|12.2 or later|SM7 and later|ARM SBSA: Volta, Turing, Ampere, Hopper, Ada Lovelace, Grace Hopper|r525 or later***|3.8, 3.9, 3.10, 3.11|gcc\u003e=9* \u003cbr\u003e gcc\u003e=11**|gcc\u003e=9|ManyLinux2014-compliant, Ubuntu\u003e= 20.04|\n|aarch64_cu11|aarch64 Jetson****|11.4|SM7 and later|Jetson AGX Orin|JetPack 5.1|3.8|gcc\u003e=9* \u003cbr\u003e gcc\u003e=11**|gcc\u003e=9|Jetson Linux 35.x|\n|aarch64_cu12|aarch64 Jetson****|12.2|SM7 and later|Jetson AGX Orin, IGX Orin + Ampere RTX6000, IGX Orin + ADA RTX6000|JetPack 6.0 DP, r535 (IGX OS v0.6)|3.10|gcc\u003e=9* \u003cbr\u003e gcc\u003e=11**|gcc\u003e=9|Jetson Linux 36.2\u003cbr\u003e IGX OS v0.6|\n\n\\* partial build, no test module (see Known Limitations) \u003cbr\u003e\n\\** full build, including test module \u003cbr\u003e\n\\*** [samples][CV-CUDA Samples] require driver r535 or later to run and are only officially supported with CUDA 12. \u003cbr\u003e\n\\**** starting with v0.14, aarch64_cu12 packages (deb, tar.xz or wheels) distributed on Github (release \"assets\") or Pypi are SBSA-compatible unless noted otherwise. Jetson builds (deb, tar.xz, whl) can be found in explicitly named \"Jetson\" archives in Github release assets.\n\n### Known limitations and issues\n\n- Starting with v0.14, aarch64_cu12 packages (deb, tar.xz or wheels) distributed on Github (release \"assets\") and Pypi are the SBSA-compatible ones. Jetson builds (deb, tar.xz, whl) can be found in explicitly named \"Jetson\" archives in Github release assets.\n- We do not provide SBSA-compatible aarch64_cu11 packages yet, this will be addressed in an upcoming release.\n- For GCC versions lower than 11.0, C++17 support needs to be enabled when compiling CV-CUDA.\n- The C++ test module cannot build with gcc\u003c11 (requires specific C++-20 features).  With gcc-9 or gcc-10, please build with option `-DBUILD_TESTS=0`\n- [CV-CUDA Samples] require driver r535 or later to run and are only officially supported with CUDA 12.\n- Only one CUDA version (CUDA 11.x or CUDA 12.x) of CV-CUDA packages (Debian packages, tarballs, Python Wheels) can be installed at a time. Please uninstall all packages from a given CUDA version before installing packages from a different version.\n- Documentation built on Ubuntu 20.04 needs an up-to-date version of sphinx (`pip install --upgrade sphinx`) as well as explicitly parsing the system's default python version ` ./ci/build_docs path/to/build -DPYTHON_VERSIONS=\"\u003cpy_ver\u003e\"`.\n- The Resize and RandomResizedCrop operators incorrectly interpolate pixel values near the boundary of an image or tensor when using cubic interpolation. This will be fixed in an upcoming release.\n\n### Installation\n\nFor convenience, we provide pre-built packages for various combinations of CUDA versions, Python versions and architectures [here][CV-CUDA GitHub Releases].\nThe following steps describe how to install CV-CUDA from such pre-built packages.\n\nWe support two main alternative pathways:\n- Standalone Python Wheels (containing C++/CUDA Libraries and Python bindings)\n- DEB or Tar archive installation (C++/CUDA Libraries, Headers, Python bindings)\n\nChoose the installation method that meets your environment needs.\n\n#### Python Wheel File Installation\n\nCheck pypi.org projects for support for your platform of choice, [cvcuda-cu11][cvcuda-cu11] and [cvcuda-cu12][cvcuda-cu12] for CUDA 11 and CUDA 12, respectively.\n\nUse the following command to install the latest available version:\n   ```shell\n   pip install cvcuda_\u003ccu_ver\u003e\n   ```\n\nwhere \u003ccu_ver\u003e is the desired CUDA version.\n\nAlternatively, download the appropriate .whl file for your computer architecture, Python and CUDA version from the release assets of current CV-CUDA release. Release information of all CV-CUDA releases can be found [here][CV-CUDA GitHub Releases]. Once downloaded, execute the `pip install` command to install the Python wheel. For example:\n   ```shell\n   pip install ./cvcuda_\u003ccu_ver\u003e-\u003cx.x.x\u003e-cp\u003cpy_ver\u003e-cp\u003cpy_ver\u003e-linux_\u003carch\u003e.whl\n   ```\n\nwhere `\u003ccu_ver\u003e` is the desired CUDA version, `\u003cx.x.x\u003e` is the CV-CUDA release version, `\u003cpy_ver\u003e` is the desired Python version and `\u003carch\u003e` is the desired architecture.\n\nPlease note that the Python wheels are standalone, they include both the C++/CUDA libraries and the Python bindings.\n\n#### DEB File Installation\n\nInstall C++/CUDA libraries (cvcuda-lib*) and development headers (cvcuda-dev*) using `apt`:\n```shell\nsudo apt install -y ./cvcuda-lib-\u003cx.x.x\u003e-\u003ccu_ver\u003e-\u003carch\u003e-linux.deb ./cvcuda-dev-\u003cx.x.x\u003e-\u003ccu_ver\u003e-\u003carch\u003e-linux.deb\n```\n\nInstall Python bindings (cvcuda-python*) using `apt`:\n```shell\nsudo apt install -y ./cvcuda-python\u003cpy_ver\u003e-\u003cx.x.x\u003e-\u003ccu_ver\u003e-\u003carch\u003e-linux.deb\n```\nwhere `\u003ccu_ver\u003e` is the desired CUDA version, `\u003cpy_ver\u003e` is the desired Python version and `\u003carch\u003e` is the desired architecture.\n\n#### Tar File Installation\n\nInstall C++/CUDA libraries (cvcuda-lib*) and development headers (cvcuda-dev*):\n```shell\ntar -xvf cvcuda-lib-\u003cx.x.x\u003e-\u003ccu_ver\u003e-\u003carch\u003e-linux.tar.xz\ntar -xvf cvcuda-dev-\u003cx.x.x\u003e-\u003ccu_ver\u003e-\u003carch\u003e-linux.tar.xz\n```\nInstall Python bindings (cvcuda-python*)\n```shell\ntar -xvf cvcuda-python\u003cpy_ver\u003e-\u003cx.x.x\u003e-\u003ccu_ver\u003e-\u003carch\u003e-linux.tar.xz\n```\nwhere `\u003ccu_ver\u003e` is the desired CUDA version, `\u003cpy_ver\u003e` is the desired Python version and `\u003carch\u003e` is the desired architecture.\n\n\n### Build from Source\n\nFollow these instruction to build CV-CUDA from source:\n\n#### 1. Set up your local CV-CUDA repository\n\nInstall the dependencies needed to setup up the repository:\n- git\n- git-lfs: to retrieve binary files from remote repository\n\nOn Ubuntu \u003e= 20.04, install the following packages using `apt`:\n```shell\nsudo apt install -y git git-lfs\n```\n\nClone the repository\n```shell\ngit clone https://github.com/CVCUDA/CV-CUDA.git\n```\n\nAssuming the repository was cloned in `~/cvcuda`, it needs to be properly configured by running the `init_repo.sh` script only once.\n\n```shell\ncd ~/cvcuda\n./init_repo.sh\n```\n\n#### 2. Build CV-CUDA\n\nInstall the dependencies required to build CV-CUDA:\n- g++-11: compiler to be used\n- cmake (\u003e= 3.20), ninja-build (optional): manage build rules\n- python3-dev: for python bindings\n- libssl-dev: needed by the testsuite (MD5 hashing utilities)\n- CUDA toolkit\n- patchelf\n\nOn Ubuntu \u003e= 20.04, install the following packages using `apt`:\n```shell\nsudo apt install -y g++-11 cmake ninja-build python3-dev libssl-dev patchelf\n```\n\nAny version of the 11.x or 12.x CUDA toolkit should work.\nCV-CUDA was tested with 11.7 and 12.2, these versions are thus recommended.\n\n```shell\nsudo apt install -y cuda-11-7\n# or\nsudo apt install -y cuda-12-2\n```\n\nBuild the project:\n```shell\nci/build.sh [release|debug] [output build tree path] [-DBUILD_TESTS=1|0] [-DPYTHON_VERSIONS='3.8;3.9;3.10;3.11'] [-DPUBLIC_API_COMPILERS='gcc-9;gcc-11;clang-11;clang-14']\n```\n\n- The default build type is 'release'.\n- If output build tree path isn't specified, it will be `build-rel` for release\n      builds, and `build-deb` for debug.\n- The library is in `build-rel/lib` and executables (tests, etc...) are in `build-rel/bin`.\n- The `-DBUILD_TESTS` option can be used to disable/enable building the tests (enabled by default, see Known Limitations).\n- The `-DPYTHON_VERSIONS` option can be used to select Python versions to build bindings and Wheels for. By default, only the default system Python3 version will be selected.\n- The `-DPUBLIC_API_COMPILERS` option can be used to select the compilers used to check public API compatibility. By default, gcc-11, gcc-9, clang-11, and clang-14 is tried to be selected and checked.\n\n#### 3. Build Documentation\n\nKnown limitation: Documentation built on Ubuntu 20.04 needs an up-to-date version of sphinx (`pip install --upgrade sphinx`) as well as explicitly parsing the system's default python version ` ./ci/build_docs path/to/build -DPYTHON_VERSIONS=\"\u003cpy_ver\u003e\"`.\n\nInstall the dependencies required to  build the documentation:\n- doxygen: parse header files for reference documentation\n- python3, python3-pip: to install some python packages needed\n- sphinx, breathe, recommonmark, graphiviz: to render the documentation\n- sphinx-rtd-theme: documentation theme used\n\nOn Ubuntu, install the following packages using `apt` and `pip`:\n```shell\nsudo apt install -y doxygen graphviz python3 python3-pip sphinx\npython3 -m pip install breathe recommonmark graphviz sphinx-rtd-theme\n```\n\nBuild the documentation:\n```shell\nci/build_docs.sh [build folder]\n```\nDefault build folder is 'build'.\n\n#### 4. Build and run Samples\n\nFor instructions on how to build samples from source and run them, see the [Samples](samples/README.md) documentation.\n\n#### 5. Run Tests\n\nInstall the dependencies required for running the tests:\n- python3, python3-pip: to run python bindings tests\n- torch: dependencies needed by python bindings tests\n\nOn Ubuntu \u003e= 20.04, install the following packages using `apt` and `pip`:\n```shell\nsudo apt install -y python3 python3-pip\npython3 -m pip install pytest torch numpy==1.26\n```\n\nThe tests are in `\u003cbuildtree\u003e/bin`. You can run the script below to run all tests at once. Here's an example when build tree is created in `build-rel`:\n```shell\nbuild-rel/bin/run_tests.sh\n```\n\n#### 6. Package installers and Python Wheels\n\nPackage installers\n\nInstallers can be generated using the following cpack command once you have successfully built the project:\n```shell\ncd build-rel\ncpack .\n```\nThis will generate in the build directory both Debian installers and tarballs (\\*.tar.xz), needed for integration in other distros.\n\nFor a fine-grained choice of what installers to generate, the full syntax is:\n\n```shell\ncpack . -G [DEB|TXZ]\n```\n- DEB for Debian packages\n- TXZ for \\*.tar.xz tarballs.\n\nPython Wheels\n\nBy default, during the `release` build, Python bindings and wheels are created for the available CUDA version and the specified Python version(s). The wheels are now output to the `build-rel/python3/repaired_wheels` folder (after being processed by the `auditwheel repair` command in the case of ManyLinux). The single generated python wheel is compatible with all versions of python specified during the cmake build step. Here, `build-rel` is the build directory used to build the release build.\n\nThe new Python wheels for PyPI compliance must be built within the ManyLinux 2014 Docker environment. The Docker images can be generated using the `docker/manylinux/docker_buildx.sh` script. These images ensure the wheels meet ManyLinux 2014 and PyPI standards.\n\nThe built wheels can still be installed using `pip`. For example, to install the Python wheel built for CUDA 12.x, Python 3.10 and 3.11 on Linux x86_64 systems:\n```shell\npip install ./cvcuda_cu12-\u003cx.x.x\u003e-cp310.cp311-cp310.cp311-linux_x86_64.whl\n```\n\n## Contributing\n\nCV-CUDA is an open source project. As part of the Open Source Community, we are\ncommitted to the cycle of learning, improving, and updating that makes this\ncommunity thrive. However, CV-CUDA is not yet ready\nfor external contributions.\n\nTo understand the process for contributing the CV-CUDA, see our\n[Contributing](CONTRIBUTING.md) page. To understand our commitment to the Open\nSource Community, and providing an environment that both supports and respects\nthe efforts of all contributors, please read our\n[Code of Conduct](CODE_OF_CONDUCT.md).\n\n### CV-CUDA Make Operator Tool\n\nThe `mkop.sh` script is a powerful tool for creating a scaffold for new operators in the CV-CUDA library. It automates several tasks, ensuring consistency and saving time.\n\n#### Features of `mkop.sh`:\n\n1. **Operator Stub Creation**: Generates no-op (no-operation) operator templates, which serve as a starting point for implementing new functionalities.\n\n2. **File Customization**: Modifies template files to include the new operator's name, ensuring consistent naming conventions across the codebase.\n\n3. **CMake Integration**: Adds the new operator files to the appropriate CMakeLists, facilitating seamless compilation and integration into the build system.\n\n4. **Python Bindings**: Creates Python wrapper stubs for the new operator, allowing it to be used within Python environments.\n\n5. **Test Setup**: Generates test files for both C++ and Python, enabling immediate development of unit tests for the new operator.\n\n#### How to Use `mkop.sh`:\n\nRun the script with the desired operator name. The script assumes it's located in `~/cvcuda/tools/mkop`.\n\n```shell\n./mkop.sh [Operator Name]\n```\n\nIf the script is run from a different location, provide the path to the CV-CUDA root directory.\n\n```shell\n./mkop.sh [Operator Name] [CV-CUDA root]\n```\n\n**NOTE**: The first letter of the new operator name is captitalized where needed to match the rest of the file structures.\n\n#### Process Details:\n\n- **Initial Setup**: The script begins by validating the input and setting up necessary variables. It then capitalizes the first letter of the operator name to adhere to naming conventions.\n\n- **Template Modification**: It processes various template files (`Public.h`, `PrivateImpl.cpp`, etc.), replacing placeholders with the new operator name. This includes adjusting file headers, namespaces, and function signatures.\n\n- **CMake and Python Integration**: The script updates `CMakeLists.txt` files and Python module files to include the new operator, ensuring it's recognized by the build system and Python interface.\n\n- **Testing Framework**: Finally, it sets up test files for both C++ and Python, allowing developers to immediately start writing tests for the new operator.\n\n## License\n\nCV-CUDA operates under the [Apache-2.0](LICENSE.md) license.\n\n## Security\n\nCV-CUDA, as a NVIDIA program, is committed to secure development practices.\nPlease read our [Security](SECURITY.md) page to learn more.\n\n## Acknowledgements\n\nCV-CUDA is developed jointly by NVIDIA and ByteDance.\n\n[NVIDIA Develop]: https://developer.nvidia.com/\n[ByteDance]: https://www.bytedance.com/\n[CV-CUDA GitHub Releases]: https://github.com/CVCUDA/CV-CUDA/releases\n[CV-CUDA Samples]: https://github.com/CVCUDA/CV-CUDA/blob/main/samples/README.md\n[cvcuda-cu11]: https://pypi.org/project/cvcuda-cu11/\n[cvcuda-cu12]: https://pypi.org/project/cvcuda-cu12/\n","funding_links":[],"categories":["C++","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCVCUDA%2FCV-CUDA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCVCUDA%2FCV-CUDA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCVCUDA%2FCV-CUDA/lists"}