Using opencv's cuda library functions under TX1 is very slow and can only reach 1FPS

Hello, friend, I don’t know how to add pictures here. If possible, could you please go to git to have a look?

https://github.com/PacktPublishing/Hands-On-GPU-Accelerated-Computer-Vision-with-OpenCV-and-CUDA/issues/3

What drivers or such are you looking for? For reference, here is the gist of how the installer works.

JetPack/SDK Manager is a front end for two jobs: (A) Flashing the Jetson, whereby Ubuntu is installed with the NVIDIA-specific direct hardware access drivers are added (this is a front end to the “driver package” which goes on the host PC, then the driver package does the flash), and (B) adding some extra optional goodies (these are added after the Jetson fully reboots and are not added during flash).

The driver package creates the flash software, and then SDKM unpacks an Ubuntu sample rootfs into the “Linux_for_Tegra/rootfs/” directory. The “apply_binaries.sh” script is run with sudo to overlay the NVIDIA drivers onto the Ubuntu sample rootfs. After a few boot edits an image is generated (the rootfs is nearly an exact duplicate of what is in the “Linux_for_Tegra/rootfs/” directory…only some boot related content is changed). That image is flashed to the root filesystem of the Jetson, plus boot related partitions are generated (embedded systems do not have a BIOS, and thus all of those other partitions basically do what a BIOS and boot loader combination would do).

After flash the Jetson reboots, and the first time login is used to add the user name/pass.

If you pick to add CUDA, then this is done of ssh after the first time boot is completed (it would be difficult for ssh to work without an account to ssh to).

Note that the extra packages must be from the same JetPack/SDKM release. CUDA and drivers are closely related to other libraries.

Also note that you can uncheck various steps and pick only one step. You don’t have to flash and do package additions every time you use SDKM.

Internet is required for both the Jetson and the SDKM.

Thanks for your reply and letting me know how jetpack works.I’ll try again and see if it works.

The main problem now is that opencv’s cuda library is too slow to process images.I wondered if there was a graphics driver not installed before. After your reply, I decided to reinstall it.

I couldn’t tell you which third party apps do or do not link to hardware accelerated CUDA, but the GPU driver which CUDA talks through is installed by default even if you never install CUDA. The CUDA release coming with a particular JetPack/SDKM version adds all of the user space libraries and tools needed to work through that GPU via CUDA.

When it seems that CUDA is not being used, then you should run the “tegrastats” program and watch for GPU load before the application starts, and compare to when the application is running. Not all applications were built against the CUDA support; many of the programs which were not built to use CUDA have the option to be recompiled (or installed from a different source) such that CUDA is enabled for those applications. The question you need to ask will depend on (A), if tegrastats shows GPU use goes up or not (whether the app uses CUDA), and (B), if the app being used is a good candidate of the CUDA software (for instance, you can train on a Jetson, but performance for training will be bad…but pre-trained models for edge computing work well).

So once you determine if the GPU is actually being used or not, then you can give the exact method of reproducing what you are doing and someone can offer how to either add GPU support, or whether there is some flaw in how the model is being used.