Giter VIP home page Giter VIP logo

sworsman31415926 / cv-cuda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cvcuda/cv-cuda

0.0 0.0 0.0 3.46 MB

CV-CUDA™ is an open-source, GPU accelerated library for cloud-scale image processing and computer vision.

Home Page: https://cvcuda.github.io

License: Apache License 2.0

Shell 0.83% JavaScript 0.01% C++ 61.57% Python 3.95% C 10.49% Verilog 0.02% Pawn 0.03% Cuda 21.22% CMake 1.71% Dockerfile 0.14% Vim Script 0.02%

cv-cuda's Introduction

CV-CUDA

License

Version

Platform

Cuda GCC Python CMake

CV-CUDA is an open-source project that enables building efficient cloud-scale Artificial Intelligence (AI) imaging and computer vision (CV) applications. It uses graphics processing unit (GPU) acceleration to help developers build highly efficient pre- and post-processing pipelines. CV-CUDA originated as a collaborative effort between NVIDIA and ByteDance.

Refer to our Developer Guide for more information on the operators available as of release v0.4.0-beta.

Getting Started

To get a local copy up and running follow these steps.

Pre-requisites

  • Linux distro:
    • Ubuntu x86_64 >= 20.04
    • WSL2 with Ubuntu >= 20.04 (tested with 20.04)
  • NVIDIA driver
    • Linux: Driver version 520.56.06 or higher
  • CUDA Toolkit
    • Version 11.7 or above. (12.0 is not yet tested.)
  • GCC >= 11.0
  • Python >= 3.7
  • cmake >= 3.22

Installation

The following steps describe how to install CV-CUDA from pre-built install packages. Choose the installation method that meets your environment needs.

Tar File Installation

tar -xvf nvcv-lib-0.4.0-cuda11-x86_64-linux.tar.xz
tar -xvf nvcv-dev-0.4.0-cuda11-x86_64-linux.tar.xz

DEB File Installation

sudo apt-get install -y ./nvcv-lib-0.4.0-cuda11-x86_64-linux.deb ./nvcv-dev-0.4.0-cuda11-x86_64-linux.deb

Python WHL File Installation

pip install nvcv_python-0.4.0-cp38-cp38-linux_x86_64.whl

Build from Source

Follow these instruction to build CV-CUDA from source:

  1. Set up your local CV-CUDA repository

    1. Install prerequisites needed to setup up the repository.

      On Ubuntu 22.04, install the following packages:

      • git-lfs: to retrieve binary files from remote repository
      sudo apt-get install -y git git-lfs
    2. After cloning the repository (assuming it was cloned in ~/cvcuda), it needs to be properly configured by running the init_repo.sh script only once.

      cd ~/cvcuda
      ./init_repo.sh
  2. Build CV-CUDA

    1. Install the dependencies required for building CV-CUDA

      On Ubuntu 22.04, install the following packages:

      • g++-11: compiler to be used
      • cmake, ninja-build (optional): manage build rules
      • python3-dev: for python bindings
      • libssl-dev: needed by the testsuite (MD5 hashing utilities)
      sudo apt-get install -y g++-11 cmake ninja-build python3-dev libssl-dev

      For CUDA Toolkit, any version of the 11.x series should work. CV-CUDA was tested with 11.7, thus it should be preferred.

      sudo apt-get install -y cuda-minimal-build-11-7
    2. Build the project

      ci/build.sh

      This will compile a x86 release build of CV-CUDA inside build-rel directory. The library is in build-rel/lib, docs in build-rel/docs and executables (tests, etc...) are in build-rel/bin.

      The script accepts some parameters to control the creation of the build tree:

      ci/build.sh [release|debug] [output build tree path]

      By default it builds for release.

      If output build tree path isn't specified, it'll be build-rel for release builds, and build-deb for debug.

  3. Build Documentation

    1. Install the dependencies required for building the documentation

      On Ubuntu 22.04, install the following packages:

      • doxygen: parse header files for reference documentation
      • python3, python3-pip: to install some python packages needed
      • sphinx, breathe, exhale, recommonmark, graphiviz: to render the documentation
      • sphinx-rtd-theme: documenation theme used
      sudo apt-get install -y doxygen graphviz python3 python3-pip
      sudo python3 -m pip install sphinx==4.5.0 breathe exhale recommonmark graphviz sphinx-rtd-theme
    2. Build the documentation

      ci/build_docs.sh [build folder]

      Example: ci/build_docs.sh build_docs

  4. Build and run Samples

    1. For instructions on how to build samples from source and run them, see the Samples documentation.
  5. Run Tests

    1. Install the dependencies required for running the tests

      On Ubuntu 22.04, install the following packages:

      • python3, python3-pip: to run python bindings tests
      • torch: dependencies needed by python bindings tests
      sudo apt-get install -y python3 python3-pip
      sudo python3 -m pip install pytest torch
    2. Run the tests

      The tests are in <buildtree>/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

      build-rel/bin/run_tests.sh
  6. Package installers

    Installers can be generated using the following cpack command once you have successfully built the project

    cd build-rel
    cpack .

    This will generate in the build directory both Debian installers and tarballs (*.tar.xz), needed for integration in other distros.

    For a fine-grained choice of what installers to generate, the full syntax is:

    cpack . -G [DEB|TXZ]
    • DEB for Debian packages
    • TXZ for *.tar.xz tarballs.

Tools

  1. CV-CUDA make operator tool

    This tool will create an noop operator; python bindings, and tests.

    This tool is located in 'tools/mkop'. To run it, navigate to the directory and execute the command './mkop.sh OperatorName', where 'OperatorName' is the desired name of the operator.

Contributing

CV-CUDA is an open source project. As part of the Open Source Community, we are committed to the cycle of learning, improving, and updating that makes this community thrive. However, as of release v0.4.0-beta, CV-CUDA is not yet ready for external contributions.

To understand the process for contributing the CV-CUDA, see our Contributing page. To understand our committment to the Open Source Community, and providing an environment that both supports and respects the efforts of all contributors, please read our Code of Conduct.

License

CV-CUDA operates under the Apache-2.0 license.

Security

CV-CUDA, as a NVIDIA program, is committed to secure development practices. Please read our Security page to learn more.

Acknowledgements

CV-CUDA is developed jointly by NVIDIA and ByteDance.

cv-cuda's People

Contributors

milesp-nvidia avatar mkhadatare avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.