Openalpr: Is there a script that does the steps for GPU compile and install?

Created on 2 Mar 2018  ·  11Comments  ·  Source: openalpr/openalpr

I see a lot of steps here to install with GPU https://github.com/openalpr/openalpr/wiki/Compilation-instructions-(Ubuntu-Linux) i was wondering if there is a script to do it all at once.

perhaps an apt install ..? just like non GPU version?

Most helpful comment

So it turns out figuring out OpenALPR with NVIDIA GPU is a lot harder than it's supposed to be. So for anyone who is left hanging like I was you can check out these scripts. I tested with a Zotac NVIDIA GT 1030.

if running nvidia-smi in terminal displays data about your graphics card you can skip steps 1 and 2.

  1. First you need to install the NVIDIA CUDA drivers.
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install cuda-drivers
sudo reboot
  1. Install CUDA Toolkit
sudo apt-get -y install cuda-toolkit-9-1
  1. so of course you need OpenCV as well. Here is the install script for that https://github.com/ShinobiCCTV/Shinobi/blob/dev/INSTALL/opencv-cuda.sh

  2. Here is the install script for OpenALPR. It will compile with GPU capability if your drivers and OpenCV are installed correctly.
    https://github.com/ShinobiCCTV/Shinobi/blob/dev/INSTALL/openalpr-gpu-easy.sh

  3. Enjoy and forget asking why this wasn't provided in the first place!

Update

You can review a formalized instruction for this here https://shinobi.video/docs/object

All 11 comments

So it turns out figuring out OpenALPR with NVIDIA GPU is a lot harder than it's supposed to be. So for anyone who is left hanging like I was you can check out these scripts. I tested with a Zotac NVIDIA GT 1030.

if running nvidia-smi in terminal displays data about your graphics card you can skip steps 1 and 2.

  1. First you need to install the NVIDIA CUDA drivers.
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install cuda-drivers
sudo reboot
  1. Install CUDA Toolkit
sudo apt-get -y install cuda-toolkit-9-1
  1. so of course you need OpenCV as well. Here is the install script for that https://github.com/ShinobiCCTV/Shinobi/blob/dev/INSTALL/opencv-cuda.sh

  2. Here is the install script for OpenALPR. It will compile with GPU capability if your drivers and OpenCV are installed correctly.
    https://github.com/ShinobiCCTV/Shinobi/blob/dev/INSTALL/openalpr-gpu-easy.sh

  3. Enjoy and forget asking why this wasn't provided in the first place!

Update

You can review a formalized instruction for this here https://shinobi.video/docs/object

I am working on Openalpr on jetson nano.
I installed Openalpr via

echo "deb https://deb.openalpr.com/snapshot/jetson40-2.7.101/ jetson40 main" > /etc/apt/sources.list.d/openalpr.list apt-get update && apt-get install -y openalpr libopenalpr-dev libalprstream-dev libvehicleclassifier-dev

However, when I try alpr <imagefile> --gpu 1 I get this error
ERROR loading detection library -- libalpredgegpu.so.2

Is the step provided by @moeiscool safe to use in jetson nano?

@Raven888888 if you want it running on Jetson Nano you should use these scripts

  1. Install OpenCV 3.4, OpenALPR needs it
https://gitlab.com/Shinobi-Systems/Shinobi/blob/master/INSTALL/jeston-opencv3-4.sh
  1. Build OpenALPR from source
https://gitlab.com/Shinobi-Systems/Shinobi/blob/master/INSTALL/openalpr-gpu-easy.sh

thats it. Jetson already has CUDA drivers.

@moeiscool Thank you very much. I tried your method and it is working amazing now!

I needed to do some further debugging due to unmet dependencies and missing libraries when I integrate it into Deepstream. This is only specific to my case and you should not bother if you don't plan to run it with Deepstream.

From 1 fps to 20+fps on Jetson nano! Cheers!

@Raven888888 i will gladly update my scripts for deepstream support :) please let me know what I need to do

@moeiscool Thank you very much. I tried your method and it is working amazing now!

I needed to do some further debugging due to unmet dependencies and missing libraries when I integrate it into Deepstream. This is only specific to my case and you should not bother if you don't plan to run it with Deepstream.

From 1 fps to 20+fps on Jetson nano! Cheers!

Thanks @moeiscool for the install scripts!

@Raven888888 How are you getting 20 fps on a Jetson Nano? I used the same build scripts and ran the test.py script included in the source and I'm getting Processing Time: 843.126160.

it’s probably because the python script is pointed at cpu by default. you
need to specify lbgpu in openalpr conf.

On Sat, Mar 14, 2020 at 9:38 PM saltzmanjoelh notifications@github.com
wrote:

@moeiscool https://github.com/moeiscool Thank you very much. I tried
your method and it is working amazing now!

I needed to do some further debugging due to unmet dependencies and
missing libraries when I integrate it into Deepstream. This is only
specific to my case and you should not bother if you don't plan to run it
with Deepstream.

From 1 fps to 20+fps on Jetson nano! Cheers!

Thanks @moeiscool https://github.com/moeiscool for the install scripts!

@Raven888888 https://github.com/Raven888888 How are you getting 20 fps
on a Jetson Nano? I used the same build scripts and ran the test.py script
included in the source and I'm getting Processing Time: 843.126160.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openalpr/openalpr/issues/635#issuecomment-599167025,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB6USQFBHPSEYMGTZLCG7FDRHRLSPANCNFSM4ETJIU6A
.

>

Thanks!
Moe Alam
Shinobi Systems
CEO & Founder
shinobi.video

@moeiscool I made sure that it is using the gpu setting. It even logs “loading cuda classifier”

Are you using the cli binary, writing your own source code or something else?

i’ve used both CLI and the nodejs module. i don’t use python

On Sun, Mar 15, 2020 at 8:20 AM saltzmanjoelh notifications@github.com
wrote:

@moeiscool https://github.com/moeiscool I made sure that it is using
the gpu setting. It even logs “loading cuda classifier”

Are you using the cli binary, writing your own source code or something
else?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openalpr/openalpr/issues/635#issuecomment-599223994,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB6USQECTJ4EKLPMJWVDRHLRHTW25ANCNFSM4ETJIU6A
.

>

Thanks!
Moe Alam
Shinobi Systems
CEO & Founder
shinobi.video

Thanks @moeiscool. With cli, would you mind sending the output with the —debug flag so that I can compare please? 🙏

1. Install OpenCV 3.4, OpenALPR needs it
https://gitlab.com/Shinobi-Systems/Shinobi/blob/master/INSTALL/jeston-opencv3-4.sh

@moeiscool Hi, may I ask why 3.4? The official documentation states that it needs 2.4.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elementzonline picture elementzonline  ·  6Comments

404-geek picture 404-geek  ·  8Comments

guyingqiong picture guyingqiong  ·  10Comments

yamilelias picture yamilelias  ·  5Comments

Mega-Touk picture Mega-Touk  ·  11Comments