Repository navigation
v0.19.0
Release Highlights
CV-CUDA v0.19.0-beta includes the following changes.
New Features and Enhancements
-
Added
cvcuda.tv, a torchvision-compatible functional API for geometry,
color, photometric and tensor transforms, without runtime dependencies on
PyTorch or torchvision. Functions accepttorch.Tensorand
cvcuda.Tensorinputs, includingerase's fill value andelastic's
displacement. As in torchvision, displacement is relative to the identity
sampling grid.
cvcuda.tv.Compose(which requires PyTorch and TorchVision) runs
TorchVision v2 transform pipelines, including random and AutoAugment-family
transforms, as one CV-CUDA chain with a single import and export;
see the supported-transform table. -
Added
TvResizewith nearest-exact, nearest-floor, linear and cubic
sampling, optional antialiasing, and torchvision-style Python size/max-size
handling. Supports U8/U16/S16/F16/F32 HWC/NHWC and CHW/NCHW tensors, and
uniform single-plane C1/3/4 variable-shape batches. Input and output scalar
types must match; integer results round ties-to-even and saturate. The C/C++
API requires caller-owned workspace. -
Added
SplitandMergefor tensors and variable-shape image batches. -
Added free-threaded CPython 3.14 support, including concurrent operator
submission, shared-buffer dependency tracking and safe batch mutation.
See Free-threaded Python for build instructions and concurrency semantics. -
Expanded data-type support:
CopyMakeBorder: S8/S32/S64/F64 on tensor, var-shape and planar paths.CustomCrop: all uniformly packed 8-, 16-, 32- and 64-bit signed,
unsigned and floating-point channel types.Invert: S16/S32/S64/F64;Solarize: F64;AutoContrast: S16;
BrightnessContrast: S64/F64.Normalize: F64 on tensor, var-shape, scalar and planar paths, using
double-precision arithmetic for images. Parameters remain F32.Posterize: F16/F32/F64 images, quantizing normalized[0, 1]values
into2 ** bitslevels withbitsin[0, 8].
-
Extended
HistogramEqwith F16/F32/F64 images and a Pillow-compatible
lookup-table method. Floating-point images are binned to 8 bits, equalized
and scaled back. Select the method withNVCVHistogramEqMethodor
Python'smethod=keyword:NVCV_HISTOGRAM_EQ_PILLOWmatches Pillow's
table bit-exactly; the defaultNVCV_HISTOGRAM_EQ_OPENCVand existing
entry points are unchanged. -
Added
CvtColorgrayscale codesRGB2GRAY_TVandBGR2GRAY_TV,
bit-exact withtorchvision.transforms.v2.functional.rgb_to_grayscale.
They use BT.601 weights0.2989 / 0.587 / 0.114(as in MATLAB
rgb2grayand TensorFlow), evaluated in float32 and truncated for integer
outputs. UnlikeRGB2GRAY(0.299, rounded to nearest), the weights
sum to0.9999, so white maps to 254 for U8.RGBA2GRAY_TVand
BGRA2GRAY_TVignore alpha. -
Added
AdvCvtColorsupport for the existing full-range BT.601, BT.709
and BT.2020NVCV_COLOR_SPEC_*_ERspecifications, also exposed through
Python'scvcuda.ColorSpec. Each uses the same full-range U8 arithmetic
as its base variant
(issue #289). -
Expanded interpolation and border options:
ResizeacceptsNVCV_INTERP_NEAREST_FLOOR(Python
cvcuda.Interp.NEAREST_FLOOR) for PyTorch/torchvisionnearest
alignment. The existingNVCV_INTERP_NEARESTcenter-based convention
is unchanged.WarpAffine,WarpPerspectiveandRemaptensor paths accept
NVCV_BORDER_CONSTANT_COVERAGE. It blends the border value according
to the interpolation footprint's out-of-bounds coverage, at full
precision before rounding. Var-shape paths do not support this mode.Remapaccepts non-uniform per-channel constant border values for
planar tensors and planar var-shape batches with up to four channels,
including constant-coverage mode for tensors. Wider planar tensors still
require a uniform value. Interleaved F16/F32 inputs now support three
and four channels.
-
Added rounding options:
AdjustContrastand by-valueBrightnessContrastaccept
NVCV_ROUND_TRUNCATEthrough new C/C++ submit entry points and
Python'sround=keyword. It truncates integer outputs to match
torchvision; floating-point outputs are unchanged. Nearest rounding
remains the default and the behavior of existing entry points.ConvertToacceptsNVCV_ROUND_NEAREST_WRAPand
NVCV_ROUND_TRUNCATE_WRAP(Pythoncvcuda.Round.NEAREST_WRAPand
TRUNCATE_WRAP) for 8- and 16-bit integer destinations. These modes
wrap instead of saturating; negative intermediates still map to zero
for unsigned outputs. 32-bit integer destinations and other operators
do not support them.
Performance Improvements
-
Optimized
AverageBlur,ConvertTo,CopyMakeBorder,
CropFlipNormalizeReformat,HQResize,Invert,PadAndStack,
Posterize,RandomResizedCrop,Resize,Rotate,WarpAffine
andWarpPerspectivefor selected workloads. -
Reduced Python operator-call and tensor/image export overhead without
changing the API. Improved cache reuse lets larger idle allocations serve
different shapes while preserving requested strides and alignment. Live
views and exported buffers prevent reuse of their storage. -
Accelerated aligned, pitched single-channel U8
Reformatfrom NCHW to NHWC.
Bug Fixes
-
Fixed Python default-stream synchronization for cross-stream operator
submissions and DLPack exports. CUDA stream handles now remain valid while
dependent resources are alive, and avoidable pending-cache growth is prevented. -
Hardened input validation:
TensorShapeInfoandTensorDataAccessStridedreject dimensions
outside the signed 32-bit range withNVCV_ERROR_OVERFLOWinstead of
silently truncating them.Invert,Posterize,Solarize,AdjustSharpnessand
BrightnessContrastreport errors for unsupported image heights,
tensors exceeding 32-bit addressing, padded column strides and multichannel
tensor data types, rather than CUDA failures or incorrect results. Image
channels must use the tensor'sCdimension.BrightnessContrast
also rejects batches larger than 65535 images.GammaContrastrejects non-F32 gamma tensors;MinAreaRectrejects
mismatchedtotalContourscounts.
-
Fixed shared-memory races in
HistogramEqOpenCV CDF normalization. -
Fixed
Morphologydilation of all-negative floating-point images. -
Fixed misaligned memory accesses in
WarpPerspectiveand inInvert,
PosterizeandSolarizeplanar var-shape images wrapping caller-owned memory. -
Fixed integer size calculations, including
CopyMakeBorderlaunch
failures for four-channel 64-bit pixels and ceiling-division precision
loss for large values. -
Fixed allocation-failure reporting in
AdaptiveThreshold,WarpAffine,
WarpPerspectiveandRandomResizedCrop, including a device-memory
leak whenRandomResizedCrophost allocation fails. -
Fixed the installed CMake package so
find_package(cvcuda)discovers its
CUDA Toolkit andnvcv_typesdependencies
(issue #295).
Compatibility Changes
-
Breaking ABI change:
cvcudaAdjustSharpnessSubmitand
cvcudaAdjustSharpnessVarShapeSubmitnow take adoublefactor
(<=FLT_MAX). Rebuild applications using these entry points. The
calculation of1 - factornow rounds to float once, matching torchvision;
outputs may differ by one level. -
Versioned requests for the pre-1.0
cvcudaandnvcv_typesCMake
packages must match the installed major and minor. Major-only requests and
requests for a different minor are rejected. Specify the installed minor,
for examplefind_package(cvcuda 0.19 CONFIG REQUIRED). -
Corrected
AdvCvtColorBT.601/BT.709 RGB-to-YUV luma coefficients to
preserve neutral grayscale values. Output can differ from earlier releases
by up to one code value for BT.601 and two for BT.709; regenerate affected
golden buffers. -
AdjustContrastrejects non-finite contrast factors and factors that
cannot be represented as float32 instead of accepting them for asynchronous
execution.ConvertTorejects unknownNVCVRoundModevalues instead
of silently using nearest rounding.
Compatibility and Known Limitations
For full details, see the main README's compatibility table and known limitations.
License
CV-CUDA is licensed under the Apache 2.0 license.
Resources
- CV-CUDA GitHub
- Optimizing Microsoft Bing Visual Search with NVIDIA Accelerated Libraries
- Accelerating AI Pipelines: Boosting Visual Search Efficiency
- Optimize Short-Form Video Processing Toward the Speed of Light
- CV-CUDA Increasing Throughput and Reducing Costs for AI-Based Computer Vision with CV-CUDA
- NVIDIA Announces Microsoft, Tencent, Baidu Adopting CV-CUDA for Computer Vision AI
- CV-CUDA Helps Tencent Cloud Audio and Video PaaS Platform Achieve Full-Process GPU Acceleration for Video Enhancement AI
Acknowledgements
CV-CUDA originated as a collaborative effort between NVIDIA and the ByteDance Machine Learning team.