Skip to content

Performance regression in TV-L1 optical flow #2459

@willprice

Description

@willprice
System information (version)
  • OpenCV => 4.10
  • Operating System / Platform => Linux 64 Bit
  • Compiler => GCC/nvcc
Detailed description

The CUDA Implementation of TVL1 seems to be significantly slower in OpenCV 4.x
than in OpenCV 2.x.

Steps to reproduce

I've created a repository here
with two versions of a codebase I use for computing optical flow (it's rather
simple, it just reads in frames form a video, resizes them and either executes
TVL1 or Brox flow on them).

There are Docker image definitions both built on Ubuntu 16.04 with CUDA 8.0 upon
which two application Docker images are built, one for each version of OpenCV.

Simply run make to build the docker images, run the ffmpeg command to dump
some frames from a video, then run the commands under Run speed test to get
some timing results.

Under OpenCV 4 it takes 152s to compute flow for 240 frames compared to 15s for
OpenCV 2. This is an order of magnitude slower under OpenCV 4.

Any ideas on what could be causing this? I've tried my best to make both OpenCV builds as comparable as possible so I'm reasonably confident this is an issue in OpenCV itself rather than my application code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions