GPU setup for openalr

1,571 views
Skip to first unread message

Mark Bissell

unread,
Apr 19, 2016, 3:33:27 PM4/19/16
to OpenALPR
Hi

Please can someone advise on the steps needed to take to enable gpu support for openalpr. I have a Nivida Graphics card installed which is supported.

I have installed on Ubuntu 14.04 64 bit VM using the easiest way instructions.

wget -O - http://deb.openalpr.com/openalpr.gpg.key | sudo apt-key add -
echo "deb http://deb.openalpr.com/master/ openalpr main" | sudo tee /etc/apt/sources.list.d/openalpr.list
sudo apt-get update 
sudo apt-get install openalpr openalpr-daemon openalpr-utils libopenalpr-dev.


I have set the detector detector = lbpgpu in the openalpr.conf file


; detector is the technique used to find license plate regions in an image.  Value can be set to
; lbpcpu    - default LBP-based detector uses the system CPU
; lbpgpu    - LBP-based detector that uses Nvidia GPU to increase recognition speed.
; lbpopencl - LBP-based detector that uses OpenCL GPU to increase recognition speed.  Requires OpenCV 3.0
; morphcpu  - Experimental detector that detects white rectangles in an image.  Does not require training.
detector = lbpgpu   

however i get the error 

"Error: GPU detector requested, but GPU extensions are not compiled.  Add COMPILE _GPU=1 to the compiler definitions to enable GPU compilation."

I'm not sure where the  compiler definitions are to enable this.


Any help would be appreciated.

Many thanks

Matt

unread,
Apr 21, 2016, 8:06:50 AM4/21/16
to OpenALPR
The precompiled binaries don't have any of the Nvidia CUDA libraries linked in.  You would need to install the CUDA drivers for your OS/graphics card, and then recompile OpenALPR to use them.  When running the cmake command, you would add that flag (-DCOMPILE_GPU=1) to it.  You probably also have to recompile OpenCV with similar options, since I doubt the default OpenCV shipped with Ubuntu has the CUDA extensions compiled in.

However, the precompiled binaries likely already have OpenCL compiled in (which Nvidia does support).  CUDA is going to be a bit better on Nvidia, but OpenCL is fairly close wrt performance. 

-Matt
Reply all
Reply to author
Forward
0 new messages