ALPR CPU/GPU

248 views
Skip to first unread message

Thanh Tùng

unread,
May 11, 2020, 9:35:07 PM5/11/20
to doubango-ai
I'm testing recognize plate on my PC. But it only works on CPU. So it takes so long time to process (1200 - 2400 milisecond per image). and i think, if it takes more than 1s, i could not apply it in real project.
Though i set "CONFIG_GPGPU_ENABLED = true", but it did not work on GPU, so now who can help me to solve this problem to work on GPU

Kamal Chhirang

unread,
May 12, 2020, 1:29:26 AM5/12/20
to doubango-ai
1200-2400 ms per image on CPU? WOW, that's high. On the Github page, the reported speed is way better. I am curious, If you did something wrong or the what's going on.

Mamadou DIOP

unread,
May 12, 2020, 3:11:48 AM5/12/20
to Kamal Chhirang, doubango-ai

Yesterday you showed me the C# code you're using. If you check it again you'll see that there is a comment saying that the first time you run the inference code it'll be slow because we load the deep learning models: https://github.com/DoubangoTelecom/ultimateALPR-SDK/blob/master/samples/csharp/recognizer/Program.cs#L254.

What you're reporting is 20 to 130 times slower that what's expected.

It's easy to check the average inference time:

1/ Make the first inference outside the loop to force initialization or call UltAlprSdkEngine::warmup function

2/ Call the  processing function 100 to 1000 times within a loop. Do not include your image decoding or any other code in the loop.

3/ Get the time before entering the loop then after and compute the difference to get the duration

Also, in the C# sample we don't use parallel mode (https://www.doubango.org/SDKs/anpr/docs/Parallel_versus_sequential_processing.html). It should be slightly slower but not that much. You can check the C++ samples for how to use this option. For now you don't need it, focus on your dev.

There is a sample application doing what I explained above: https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/c%2B%2B/benchmark. Edit "benchmark.bat" to use rate equal to 0 then 1 and share both logs (dump in files) with us. This will provide information about the decoder and recogner speed on your machine.

On Windows it's very easy to use: https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/c%2B%2B/benchmark#pre-built-binaries

To enable full GPU acceleration you have to replace tensorflow.dll as explained at https://github.com/DoubangoTelecom/ultimateALPR-SDK/blob/master/samples/c%2B%2B/README.md#gpu-acceleration. You need a computer with NVIDIA card + CUDA support.

--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/83579aed-f57a-49f6-82a1-951eb33312f9%40googlegroups.com.

Thanh Tùng

unread,
May 12, 2020, 10:24:35 PM5/12/20
to doubango-ai
I have fixed code, and now it's reduced to 70-150 miliseconds

Thanks you!

Mamadou

unread,
Jul 10, 2020, 9:05:40 PM7/10/20
to doubango-ai
ANPR/ALPR detection models updated to speedup the inference. Max frame rate on core i7-4790K is now 30fps. https://github.com/DoubangoTelecom/ultimateALPR-SDK/commit/6a951c49e5a855ee2fc778410a223aeacafe48ca Next to come in version 3: 140fps on core i7 with higher accuracy. Stay tuned!!

Mamadou

unread,
Sep 24, 2020, 2:01:54 PM9/24/20
to doubango-ai
Version 3.x is now released and the SDK is 3 to 4 times faster on x86-64 thanks to OpenVINO and AVX2: https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/c%2B%2B/benchmark#peformance-numbers
Reply all
Reply to author
Forward
0 new messages