Skip to content

Commit

Permalink
feat: adding code for release v0.5.0 (beta-3) of CV-CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
milesp-nvidia committed Dec 14, 2023
1 parent 707391b commit 49933ce
Show file tree
Hide file tree
Showing 324 changed files with 25,822 additions and 2,246 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: "CodeQL"

on: [push, pull_request]

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'c-cpp' && 'ubuntu-20.04-64core') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'javascript-typescript', 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true
submodules: 'recursive'

- if: matrix.language == 'c-cpp'
name: Setup environment
run: |
sudo apt update -y && sudo apt install -y --no-install-recommends \
git git-lfs gcc-11 g++-11 ninja-build ccache libgtest-dev libgmock-dev \
shellcheck curl doxygen python3 python3-pip python3-dev python3-distutils
- if: matrix.language == 'c-cpp'
name: Install Python Dependencies
run: |
python3 -m pip install sphinx-rtd-theme sphinx==4.5.0 breathe exhale \
recommonmark graphviz numpy==1.24.1
- if: matrix.language == 'c-cpp'
name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '11.7.1'
linux-local-args: '["--toolkit"]'

- if: matrix.language == 'c-cpp'
name: Verify CUDA installation
run: |
echo "Installed CUDA version is: ${{ steps.cuda-toolkit.outputs.cuda }}"
echo "CUDA install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}"
sudo ln -s ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/libcudart.so \
/usr/lib/x86_64-linux-gnu/libcuda.so
nvcc -V
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- if: matrix.language != 'c-cpp'
name: Autobuild
uses: github/codeql-action/autobuild@v2

- if: matrix.language == 'c-cpp'
name: Build CMake project
run: |
echo "Running CMake project build script"
./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PYTHON=0" $*
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
[submodule "3rdparty/dlpack"]
path = 3rdparty/dlpack
url = https://github.com/dmlc/dlpack.git
[submodule "3rdparty/nvbench"]
path = 3rdparty/nvbench
url = https://github.com/NVIDIA/nvbench.git
8 changes: 8 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ set(DLPACK_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dlpack" PARENT_SCOPE)

# cuOSD -----------------------------
set(CUOSD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cuOSD" PARENT_SCOPE)

# NVBench --------------------------------
set(NVBENCH_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/nvbench" PARENT_SCOPE)

if(BUILD_BENCH)
set(NVBench_ENABLE_CUPTI off)
add_subdirectory(nvbench)
endif()
1 change: 1 addition & 0 deletions 3rdparty/nvbench
Submodule nvbench added at 752122
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.20.1)

# We need to check this variable before starting a CUDA project - otherwise it will appear
# as set, with the default value pointing to the oldest supported architecture (52 as of CUDA 11.8)
Expand All @@ -23,7 +23,7 @@ endif()

project(cvcuda
LANGUAGES C CXX
VERSION 0.4.0
VERSION 0.5.0
DESCRIPTION "CUDA-accelerated Computer Vision algorithms"
)

Expand All @@ -48,6 +48,7 @@ endif()
# Options to configure the build tree =======
option(BUILD_TESTS "Enable testsuite" OFF)
option(BUILD_PYTHON "Build python bindings" OFF)
option(BUILD_BENCH "Build benchmark" OFF)
option(ENABLE_SANITIZER "Enabled sanitized build" OFF)

# Configure build tree ======================
Expand Down Expand Up @@ -85,6 +86,10 @@ if(BUILD_SAMPLES)
add_subdirectory(samples)
endif()

if(BUILD_BENCH)
add_subdirectory(bench)
endif()

# Must be done after build tree is defined
include(ConfigCPack)

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to CV-CUDA

**As of release v0.4.0-beta, CV-CUDA is not accepting outside contribution.**
**As of release v0.5.0-beta, CV-CUDA is not accepting outside contribution.**

Contributions to CV-CUDA fall into the following categories:

Expand All @@ -12,7 +12,7 @@ Contributions to CV-CUDA fall into the following categories:
1. To propose a new feature, please file a new feature request
[issue](https://github.com/CVCUDA/CV-CUDA/issues/new/choose). Describe the
intended feature and discuss the design and implementation with the team and
community. NOTE: Currently, as of release v0.4.0-beta, CV-CUDA is not accepting
community. NOTE: Currently, as of release v0.5.0-beta, CV-CUDA is not accepting
outside contribution.
1. To ask a general question, please sumbit a question
[issue](https://github.com/CVCUDA/CV-CUDA/issues/new/choose). If you need
Expand Down
13 changes: 8 additions & 5 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CV-CUDA includes:
| Advanced Color Format Conversions | Performs color conversion from interleaved RGB/BGR <-> YUV/YVU and semi planar. Supported standards: BT.601. BT.709. BT.2020 |
| AverageBlur | Reduces image noise using an average filter |
| BilateralFilter | Reduces image noise while preserving strong edges |
| Bounding Box | Draws an rectangular border using the X-Y coordinates and dimensions typically to define the location and size of an object in an image |
| Bounding Box | Draws a rectangular border using the X-Y coordinates and dimensions typically to define the location and size of an object in an image |
| Box Blurring | Overlays a blurred rectangle using the X-Y coordinates and dimensions that define the location and size of an object in an image |
| Brightness_Contrast | Adjusts brightness and contrast of an image |
| CenterCrop | Crops an image at its center |
Expand All @@ -38,25 +38,28 @@ CV-CUDA includes:
| DataTypeConvert | Converts an image’s data type with optional scaling |
| Erase | Erases image regions |
| Find Contours | Extract closed contours from an input binary image |
| FindHomography | Calculates a perspective transform from four pairs of the corresponding points |
| Flip | Flips a 2D image around its axis |
| GammaContrast | Adjusts image contrast |
| Gaussian | Applies a gaussian blur filter to the image |
| Gaussian Noise | Generates a statistical noise with a normal (Gaussian) distribution |
| Histogram | Provides a grayscale value distribution showing the frequency of occurrence of each gray value. |
| Histogram Equalizer | Allows effective spreading out the intensity range of the image typically used to improve contrast |
| Inpainting | Performs inpainting by replacing a pixel by normalized weighted sum of all the known pixels in the neighborhood |
| Joint Bilateral Filter | Provides a edge-preserving denoising filter |
| Joint Bilateral Filter | Reduces image noise while preserving strong edges based on a guidance image |
| Label | Labels connected regions in an image using 4-way connectivity for foreground and 8-way for background pixels |
| Laplacian | Applies a Laplace transform to an image |
| MedianBlur | Reduces an image’s salt-and-pepper noise |
| MinArea Rect | Finds the minimum area rotated rectangle typically used to draw bounding rectangle with minimum area |
| MinMaxLoc | Finds the maximum and minimum values in a given array |
| Morphology | Performs morphological erode and dilate transformations |
| Morphology (close) | Performs morphological operation that involves dilation followed by erosion on an image |
| Morphology (open) | Performs morphological operation that involves erosion followed by dilation on an image |
| Morphology (close) | Performs a morphological operation that involves dilation followed by erosion on an image |
| Morphology (open) | Performs a morphological operation that involves erosion followed by dilation on an image |
| Non-max Suppression | Enables selecting a single entity out of many overlapping ones typically used for selecting from multiple bounding boxes during object detection |
| Normalize | Normalizes an image pixel’s range |
| OSD (Polyline Line Text Rotated Rect Segmented Mask) | Displays an overlay on the image of of different forms including polyline line text rotated rectangle segmented mask |
| OSD (Polyline Line Text Rotated Rect Segmented Mask) | Displays an overlay on the image of different forms including polyline line text rotated rectangle segmented mask |
| PadStack | Stacks several images into a tensor with border extension |
| PairwiseMatcher | Matches features computed separately (e.g. via the SIFT operator) in two images using the brute force method |
| PillowResize | Changes the size and scale of an image using python-pillow algorithm |
| RandomResizedCrop | Crops a random portion of an image and resizes it to a specified size. |
| Reformat | Converts a planar image into non-planar and vice versa |
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ END OF TERMS AND CONDITIONS

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 49933ce

Please sign in to comment.