{"id":29093223,"url":"https://github.com/nvidia-ai-iot/deepstream_libraries","last_synced_at":"2026-04-01T17:15:05.319Z","repository":{"id":238648365,"uuid":"790876268","full_name":"NVIDIA-AI-IOT/deepstream_libraries","owner":"NVIDIA-AI-IOT","description":" DeepStream Libraries offer CVCUDA, NvImageCodec, and PyNvVideoCodec modules as Python APIs for seamless integration into custom frameworks. ","archived":false,"fork":false,"pushed_at":"2025-09-15T06:20:44.000Z","size":252,"stargazers_count":79,"open_issues_count":5,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-03-14T07:45:28.373Z","etag":null,"topics":["computer-vision","cuda","cv-cuda","data-processing","gpu","image-processing","nvidia","nvimagecodec","pynvvideocodec","pytorch"],"latest_commit_sha":null,"homepage":"https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Libraries.html","language":"Python","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/NVIDIA-AI-IOT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-23T17:31:01.000Z","updated_at":"2026-03-13T04:34:20.000Z","dependencies_parsed_at":"2024-05-07T09:46:28.342Z","dependency_job_id":"ccd37e6c-31ce-4075-aedc-db1bad2f54c5","html_url":"https://github.com/NVIDIA-AI-IOT/deepstream_libraries","commit_stats":null,"previous_names":["nvidia-ai-iot/deepstream_libraries"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/NVIDIA-AI-IOT/deepstream_libraries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA-AI-IOT%2Fdeepstream_libraries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA-AI-IOT%2Fdeepstream_libraries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA-AI-IOT%2Fdeepstream_libraries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA-AI-IOT%2Fdeepstream_libraries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NVIDIA-AI-IOT","download_url":"https://codeload.github.com/NVIDIA-AI-IOT/deepstream_libraries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA-AI-IOT%2Fdeepstream_libraries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["computer-vision","cuda","cv-cuda","data-processing","gpu","image-processing","nvidia","nvimagecodec","pynvvideocodec","pytorch"],"created_at":"2025-06-28T08:07:37.150Z","updated_at":"2026-04-01T17:15:05.314Z","avatar_url":"https://github.com/NVIDIA-AI-IOT.png","language":"Python","readme":"# DeepStream Libraries\nDeepStream Libraries provide [CVCUDA](https://github.com/CVCUDA/CV-CUDA), [NvImageCodec](https://github.com/NVIDIA/nvImageCodec), and [PyNvVideoCodec](https://pypi.org/project/PyNvVideoCodec/) modules as Python APIs to easily integrate into custom frameworks.\nDevelopers can build complete Python applications with fully accelerated components leveraging intuitive Python APIs.\nMost of the DeepStream Libraries building blocks and their Python APIs are available today as standalone packages. DeepStream Libraries provide a way for Python developers to install these packages with a single installer.\nAll these packages are built against the same CUDA version and validated with the specified driver version. Reference applications are provided to demonstrate the usage of Python APIs.\n\n\n## System Requirements\n\n- **Operating System:**\n  - [Ubuntu 24.04](https://releases.ubuntu.com/noble/)\n\n- **Python:**\n  - Python \u003e=3.12,\u003c3.15 (Should be pre-installed with Ubuntu 24.04)\n\n- **CUDA:**\n  - [CUDA Toolkit 13.1](https://developer.nvidia.com/cuda-13-1-0-download-archive)\n\n- **NVIDIA Driver:**\n  - [NVIDIA Driver 590.48.01](https://www.nvidia.cn/drivers/details/260076/)\n\n- **TensorRT:**\n  - [TensorRT 10.14.1.48](https://docs.nvidia.com/deeplearning/tensorrt/10.14.1/installing-tensorrt/installing.html)\n\n## DeepStream Libraries Repository Setup\n\nFollow these steps to set up your environment for running [sample applications](https://github.com/NVIDIA-AI-IOT/deepstream_libraries):\n\n### 1. Clone Repository\n```bash\ngit clone https://github.com/NVIDIA-AI-IOT/deepstream_libraries.git\ncd deepstream_libraries\n```\n\n### 2. Install System Dependencies\n```bash\nsudo sh scripts/install_sys_pkgs.sh\n```\n\n### 3. Download Sample Data\n```bash\nsh scripts/download_data.sh\n```\n\n### 4. Setup Python Virtual Environment\n```bash\n# Create virtual environment\npython3 -m venv deepstream_libraries_env\n\n# Activate virtual environment\nsource deepstream_libraries_env/bin/activate\n\n# Verify activation\nwhich python3  # Should point to virtual environment\n```\n**Note:** Activate the virtual environment for Python dependencies and wheel installation, and in each new terminal session.\n\n### 5. Install Python Dependencies\n```bash\nsh scripts/install_python_pkgs.sh\n```\n\n## DeepStream Libraries Installation\n1. Download DeepStream Libraries wheel file from NGC.\n    - Download wheel file from this NGC [link](https://catalog.ngc.nvidia.com/orgs/nvidia/resources/deepstream_libraries)\n\n2. Install DeepStream Libraries package.\n    ```bash\n    pip3 install deepstream_libraries-1.3-cp312-cp312-linux_x86_64.whl\n    ```\n\n## Getting Started with DeepStream Libraries APIs\nWe can use DeepStream Libraries API's to create an application.\n\nConsider the below reference example:\n- Read an image from the given file path using NvImageCodec\n- Resize the image with specified dimensions and Cubic interpolation method using CVCUDA\n- Align output dimensions to ensure compatibility with nvImageCodec\n- Save the resized image using NvImageCodec\n\n```python\n# Import necessary libraries\nimport cvcuda\nfrom nvidia import nvimgcodec\n\n# Create Decoder\ndecoder = nvimgcodec.Decoder()\n\n# Read image with nvImageCodec (using CodeStream API)\nwith open(\"path/to/image.jpg\", \"rb\") as f:\n    image_bytes = f.read()\ncode_stream = nvimgcodec.CodeStream(image_bytes)\ninputImage = decoder.decode(code_stream)  # Returns single Image\n\n# Pass it to cvcuda using as_tensor\nnvcvInputTensor = cvcuda.as_tensor(inputImage, \"HWC\")\n\n# Align output dimensions to 32-byte boundaries for nvImageCodec compatibility\noutput_width, output_height, alignment = 320, 240 , 32\naligned_width, aligned_height = ((output_width + alignment - 1) // alignment) * alignment , ((output_height + alignment - 1) // alignment) * alignment\n\n# Resize with cvcuda using aligned dimensions\ncvcuda_stream = cvcuda.Stream()\nwith cvcuda_stream:\n    nvcvResizeTensor = cvcuda.resize(nvcvInputTensor,(aligned_height, aligned_width, 3), cvcuda.Interp.CUBIC)\n\n# Write with nvImageCodec\nencoder = nvimgcodec.Encoder()\noutput_image_path = \"output.jpg\"\nencoder.write(output_image_path, nvimgcodec.as_image(nvcvResizeTensor.cuda(), cuda_stream = cvcuda_stream.handle))\n```\n\n## Sample Applications\n| Application               | Description                                                                                                                                                      |\n|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Classification    | A CUDA-accelerated image and video classification pipeline integrating PyTorch or TensorRT for efficient processing on NVIDIA GPUs                               |\n| Object-Detection  | GPU accelerated Object detection using CV-CUDA library with TensorFlow or TensorRT                                                 |\n| Segmentation      | GPU accelerated Semantic segmentation by utilizing the CV-CUDA library with PyTorch or TensorRT                                               |\n| Resize-Image      | A sample app that decodes, resizes, and encodes images using the CVCUDA and NvImageCodec Python API's                                                            |\n| Decode-Video      | Decodes encoded bitstreams using PyNvVideoCodec decode APIs                                                               |\n| Encode-Video      | Encodes a raw YUV file using PyNvVideoCodec encode APIs                                                                |\n| Transcode-Video   | Transcodes the video files using PyNvVideoCodec API's                                                                        |\n\n## Additional References and Applications\nFor more references and application please refer to the below link:\n- [CVCUDA](https://github.com/CVCUDA/CV-CUDA/releases/tag/v0.16.0)\n- [NvImageCodec](https://github.com/NVIDIA/nvImageCodec/releases/tag/v0.7.0)\n- [PyNvVideoCodec](https://pypi.org/project/PyNvVideoCodec/2.1/)\n- [Deepstream Libraries](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Libraries.html)\n\n## Notes\n- **VPF (VideoProcessingFramework)**: The main VPF package is deprecated. PyNvVideoCodec (installed via wheel) is the modern replacement. PytorchNvCodec extension is available for PyTorch support. VPF installation failures are non-fatal as PyNvVideoCodec provides the required functionality.\n- **nvcv Compatibility**: A compatibility module (`common/nvcv.py`) is provided for legacy code that uses the `nvcv` API. This module maps `nvcv` calls to equivalent `cvcuda` functionality.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvidia-ai-iot%2Fdeepstream_libraries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvidia-ai-iot%2Fdeepstream_libraries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvidia-ai-iot%2Fdeepstream_libraries/lists"}