farneback3d
A CUDA implementation of the Farneback optical flow algorithm [1] for the calculation of dense volumetric flow fields. Since this algorithm is based on the approximation of the signal by polynomial expansion it is especial suited for the motion estimation in smooth signals without clear edges.
To know more about the implementation, have a look on this OpenCV class that was used as a template for this implementation.
Development takes place on Github.
Python interface
The project uses pycuda to provide a pure-python package available on PyPi
pip install farneback3d
Usage:
import farneback3d
... # create some numpy volumes vol0 and vol1 (can also be pycuda GPUArrays)
# set parameters for optical flow (parameters have the same meaning as in the OpenCV implementation)
optflow = farneback3d.Farneback(
pyr_scale=0.8, # Scaling between multi-scale pyramid levels
levels=6, # Number of multi-scale levels
num_iterations=5, # Iterations on each multi-scale level
winsize=9, # Window size for Gaussian filtering of polynomial coefficients
poly_n=5, # Size of window for weighted least-square estimation of polynomial coefficients
poly_sigma=1.2, # Sigma for Gaussian weighting of least-square estimation of polynomial coefficients
)
# calculate frame-to-frame flow between vol0 and vol1
flow = optflow.calc_flow(vol0, vol1)
C++ interface
To be implemented…
Future plans
The current implementation uses a naive approach to perform the necessary convolutions. The algorithm could be sped up drastically by performing separable convolutions along each coordinate axis.
References
Metadata
Release files for farneback3d 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| farneback3d-0.1.4.tar.gz | 33.8 kB | Without provenance | Details for farneback3d-0.1.4.tar.gz |
Release files / farneback3d-0.1.4.tar.gz
| Download URL | farneback3d-0.1.4.tar.gz |
|---|---|
| Size | 33.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4893291301c340b952d08ac559f4fadb0c87990f0423e1f5dad2b6c5135a2321
|
|
BLAKE2b-256 checksum How to use checksums |
5eb116e48efe419ce998c3e593f05c54012cd463f8c06e9673d131f5b3322fc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for farneback3d 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.