Skip to content

Repository files navigation

fastcv

fastcv is a C++ CUDA rewrite with Pytorch bindings of the image filters in the OpenCV library.

How to run

  1. Clone the repo
https://github.com/JINO-ROHIT/fastcv
  1. Move to fastcv
cd fastcv
  1. Build the package
pip install -e . --no-build-isolation

You’ll need:

  1. CUDA toolkit installed
  2. PyTorch with CUDA support
  3. A working C++ compiler (MSVC on Windows, gcc/clang on Linux/Mac)

Benchmarks

Tested on: RTX 4060 Ti

KernelImage SizeOpenCV (CPU)fastcv (CUDA)OpenCV CUDA (soon)Speedup (×)
RGB2GRAY4096×40963.1841 ms0.2737 ms-11.63
BOX BLUR4096×409644.459 ms10.012 ms-4.44
SOBEL4096×4096384.83 ms0.3223 ms-1194.0
EROSION4096×40962.9758 ms0.5827 ms-5.11
DILATION4096×40962.7539 ms0.5856 ms-4.70

About

fastcv is a CUDA rewrite of the opencv filters with python bindings

Resources

Stars

73 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages