Skip to content

Commit 83f61ac

Browse files
committed
feat: adding code for CV-CUDA Patch Release 0.3.1 Beta
1 parent fa0eab7 commit 83f61ac

File tree

329 files changed

+14416
-3195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+14416
-3195
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ endif()
2323

2424
project(cvcuda
2525
LANGUAGES C CXX
26-
VERSION 0.3.0
26+
VERSION 0.3.1
2727
DESCRIPTION "CUDA-accelerated Computer Vision algorithms"
2828
)
2929

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to CV-CUDA
22

3-
**As of release v0.3.0-beta, CV-CUDA is not accepting outside contribution.**
3+
**As of release v0.3.1-beta, CV-CUDA is not accepting outside contribution.**
44

55
Contributions to CV-CUDA fall into the following categories:
66

@@ -12,7 +12,7 @@ Contributions to CV-CUDA fall into the following categories:
1212
1. To propose a new feature, please file a new feature request
1313
[issue](https://github.com/CVCUDA/CV-CUDA/issues/new/choose). Describe the
1414
intended feature and discuss the design and implementation with the team and
15-
community. NOTE: Currently, as of release v0.3.0-beta, CV-CUDA is not accepting
15+
community. NOTE: Currently, as of release v0.3.1-beta, CV-CUDA is not accepting
1616
outside contribution.
1717
1. To ask a general question, please sumbit a question
1818
[issue](https://github.com/CVCUDA/CV-CUDA/issues/new/choose). If you need

DEVELOPER_GUIDE.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ CV-CUDA includes:
2020

2121
| Pre/Post-Processing Operators | Definition |
2222
|-------------------------------|------------|
23-
| Adaptive Thresholding | Computes the threshold value for each fractional region of the image |
2423
| AverageBlur | Reduces image noise using an average filter |
2524
| BilateralFilter | Reduces image noise while preserving strong edges |
26-
| Bounding Box | Draws an overlay 2D rectangular bounding box using the coordinate points |
27-
| Bounding Box Blur | Adds a 2D rectangular blur in the region of interest <br> (ROI) using the coordinate points |
2825
| CenterCrop | Crops an image at its center |
2926
| ChannelReorder | Shuffles the order of image channels |
3027
| Composite | Composites two images together |
@@ -35,21 +32,18 @@ CV-CUDA includes:
3532
| DataTypeConvert | Converts an image’s data type, with optional scaling |
3633
| Erase | Erases image regions |
3734
| Flip | Flips a 2D image around its axis |
38-
| GammaContrast | Adjusts image contrast based on gamma value |
35+
| GammaContrast | Adjusts image contrast |
3936
| Gaussian | Applies a gaussian blur filter to the image |
4037
| JointBilateralFilter | Reduces image noise while preserving strong edges <br> based on a guidance image |
4138
| Laplacian | Applies a Laplace transform to an image |
4239
| MedianBlur | Reduces an image’s salt-and-pepper noise |
4340
| Morphology | Performs morphological erode and dilate transformations |
44-
| Non-Max Suppression | Selects the best bounding box out of a set of <br> overlapping boxes based on IOU and confidence thresholds |
4541
| Normalize | Normalizes an image pixel’s range |
4642
| PadStack | Stacks several images into a tensor, with border extension |
4743
| PillowResize | Changes the size and scale of an image using python-pillow algorithm |
4844
| Reformat | Converts a planar image into non-planar and vice versa |
49-
| Remap | Applies a generic geometrical transformation to an image, for <br> example, to perform fisheye dewarping |
5045
| Resize | Changes the size and scale of an image |
5146
| Rotate | Rotates a 2D array in multiples of 90 degrees |
52-
| Thresholding | Computes the threshold value based on the histogram of the <br> overall pixel intensity distribution of the image |
5347
| WarpAffine | Applies an affine transformation to an image |
5448
| WarpPerspective | Applies a perspective transformation to an image |
5549

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License](https://img.shields.io/badge/License-Apache_2.0-yellogreen.svg)](https://opensource.org/licenses/Apache-2.0)
44

5-
![Version](https://img.shields.io/badge/Version-v0.3.0--alpha-blue)
5+
![Version](https://img.shields.io/badge/Version-v0.3.1--beta-blue)
66

77
![Platform](https://img.shields.io/badge/Platform-linux--64_%7C_win--64_wsl2-gray)
88

@@ -18,7 +18,7 @@ efficient pre- and post-processing pipelines. CV-CUDA originated as a
1818
collaborative effort between [NVIDIA][NVIDIA Develop] and [ByteDance][ByteDance].
1919

2020
Refer to our [Developer Guide](DEVELOPER_GUIDE.md) for more information on the
21-
operators available as of release v0.3.0-beta.
21+
operators available as of release v0.3.1-beta.
2222

2323
## Getting Started
2424

@@ -27,14 +27,14 @@ To get a local copy up and running follow these steps.
2727
### Pre-requisites
2828

2929
- Linux distro:
30-
- Ubuntu x86_64 == 18.04, 20.04, 22.04
31-
- WSL2 with Ubuntu >= 20.04 (https://docs.nvidia.com/cuda/wsl-user-guide/index.html)
32-
- NVIDIA driver >= 515.43.04+
33-
- CUDA Toolkit >= 11.7
34-
- Toolkit >= 11.3 support for core library build and run
30+
- Ubuntu x86_64 >= 18.04
31+
- WSL2 with Ubuntu >= 20.04 (tested with 20.04)
32+
- NVIDIA driver
33+
- Linux: Driver version 520.56.06 or higher
34+
- CUDA Toolkit
35+
- Version 11.7 or above. (12.0 is not yet tested.)
3536
- GCC >= 11.0
36-
- GCC >= 9.0 supported for core library build and run
37-
- Python == 3.7, 3.8, 3.10
37+
- Python >= 3.7
3838
- cmake >= 3.22
3939

4040
### Installation
@@ -45,20 +45,20 @@ packages. Choose the installation method that meets your environment needs.
4545
#### Tar File Installation
4646

4747
```shell
48-
tar -xvf nvcv-lib-0.3.0-cuda11-x86_64-linux.tar.xz
49-
tar -xvf nvcv-dev-0.3.0-cuda11-x86_64-linux.tar.xz
48+
tar -xvf nvcv-lib-0.3.1-cuda11-x86_64-linux.tar.xz
49+
tar -xvf nvcv-dev-0.3.1-cuda11-x86_64-linux.tar.xz
5050
```
5151

5252
#### DEB File Installation
5353

5454
```shell
55-
sudo apt-get install -y ./nvcv-lib-0.3.0-cuda11-x86_64-linux.deb ./nvcv-dev-0.3.0-cuda11-x86_64-linux.deb
55+
sudo apt-get install -y ./nvcv-lib-0.3.1-cuda11-x86_64-linux.deb ./nvcv-dev-0.3.1-cuda11-x86_64-linux.deb
5656
```
5757

5858
#### Python WHL File Installation
5959

6060
```shell
61-
pip install nvcv_python-0.3.0-cp38-cp38-linux_x86_64.whl
61+
pip install nvcv_python-0.3.1-cp38-cp38-linux_x86_64.whl
6262
```
6363

6464
### Build from Source
@@ -208,7 +208,7 @@ Follow these instruction to build CV-CUDA from source:
208208
209209
CV-CUDA is an open source project. As part of the Open Source Community, we are
210210
committed to the cycle of learning, improving, and updating that makes this
211-
community thrive. However, as of release v0.3.0-beta, CV-CUDA is not yet ready
211+
community thrive. However, as of release v0.3.1-beta, CV-CUDA is not yet ready
212212
for external contributions.
213213
214214
To understand the process for contributing the CV-CUDA, see our

ci/build_docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22

3-
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,4 +25,4 @@ if [[ $# -ge 1 ]]; then
2525
build_dir=$1
2626
fi
2727

28-
./ci/build.sh $build_type $build_dir "-DBUILD_DOCS=ON -DBUILD_TESTS=OFF -DBUILD_PYTHON=OFF"
28+
./ci/build.sh $build_type $build_dir "-DBUILD_DOCS=ON -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON"

docker/build/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
9494
./libstdc++-8-dev_8.4.0-3ubuntu2_amd64.deb \
9595
./libisl22_0.22.1-1_amd64.deb \
9696
&& rm -rf /var/lib/apt/lists/*
97+
98+
# Needed for python sphinx docs
99+
RUN python3 -m pip install numpy==1.24.1

docker/config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
# reason: we include this file from other scripts, no need to export it
1818
# shellcheck disable=SC2034
1919

20-
IMAGE_URL_BASE=''
20+
IMAGE_URL_BASE='gitlab-master.nvidia.com:5005/cv/cvcuda'
2121

2222
# image versions must be upgraded whenever a breaking
2323
# change is done, such as removing some package, or updating
2424
# packaged versions that introduces incompatibilities.
25-
TAG_IMAGE=0
26-
TAG_IMAGE_SAMPLES=0
25+
TAG_IMAGE=4
26+
TAG_IMAGE_SAMPLES=5
2727

2828
VER_CUDA=11.7.0
2929
VER_UBUNTU=22.04

docker/devel/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get update \
4949
&& rm -rf /var/lib/apt/lists/*
5050

5151
# needed by tests
52-
RUN python3 -m pip install torch==1.13.0 torchvision numpy==1.24.1 cupy-cuda11x \
52+
RUN python3 -m pip install torch==1.13.0 torchvision cupy-cuda11x \
5353
&& rm -rf /root/.cache/pip
5454

5555
WORKDIR /cvcuda

docs/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ set(DOXYGEN_IMAGE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/assets)
3131
# Replace variables inside @@ with the current value
3232
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
3333

34-
# Only regenerate Doxygen when the Doxyfile change
34+
# Only regenerate Doxygen when the Doxyfile changes
35+
36+
# Build docs once python libraries are generated
3537
file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR})
38+
list(GET PYTHON_VERSIONS -1 VER)
39+
3640
add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE}
3741
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
3842
MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN}
39-
COMMENT "Generating doxygen xml")
43+
COMMENT "Generating doxygen xml"
44+
DEPENDS nvcv_python${VER})
4045

4146
add_custom_target(cvcuda_doxygen ALL DEPENDS ${DOXYGEN_INDEX_FILE})
4247

@@ -54,6 +59,7 @@ add_custom_target(cvcuda_groups ALL
5459
# Generate Sphinx
5560
add_custom_command(OUTPUT ${SPHINX_INDEX_FILE}
5661
COMMAND
62+
${CMAKE_COMMAND} -E env "SPHINX_PYTHON_SRC=${CMAKE_BINARY_DIR}/lib/python"
5763
${SPHINX_EXECUTABLE} -j auto -b html
5864
# Tell Breathe where to find the Doxygen output
5965
-Dbreathe_projects.cvcuda=${DOXYGEN_OUTPUT_DIR}/xml
@@ -65,7 +71,6 @@ add_custom_command(OUTPUT ${SPHINX_INDEX_FILE}
6571
MAIN_DEPENDENCY ${SPHINX_SOURCE}/conf.py
6672
COMMENT "Generating documentation with Sphinx")
6773

68-
6974
add_custom_target(cvcuda_sphinx ALL DEPENDS ${SPHINX_INDEX_FILE})
7075

7176
install(DIRECTORY ${SPHINX_BUILD} DESTINATION docs)

docs/sphinx/conf.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,13 +30,17 @@
3030
# -- Project information -----------------------------------------------------
3131
import os
3232
import sphinx_rtd_theme
33+
import sys
3334

3435
project = "CV-CUDA"
35-
copyright = "2022, NVIDIA."
36+
copyright = "2022-2023, NVIDIA."
3637
author = "NVIDIA"
37-
version = "Alpha"
38+
version = "Beta"
3839
release = version
3940

41+
# set python docstring source path
42+
lib_path = os.getenv("SPHINX_PYTHON_SRC", default=".")
43+
sys.path.insert(0, os.path.abspath(lib_path))
4044

4145
# -- General configuration ---------------------------------------------------
4246

@@ -114,6 +118,9 @@ def setup(app):
114118
# Enable the breathe extension
115119
extensions.append("breathe")
116120
extensions.append("exhale")
121+
extensions.append("sphinx.ext.autodoc")
122+
extensions.append("sphinx.ext.viewcode")
123+
extensions.append("sphinx.ext.napoleon")
117124

118125
# Set up the default project for breathe extension
119126
breathe_default_project = "cvcuda"
@@ -183,3 +190,5 @@ def setup(app):
183190

184191
# Tell sphinx what the pygments highlight language should be.
185192
highlight_language = "cpp"
193+
194+
autodoc_inherit_docstrings = False

0 commit comments

Comments
 (0)