VIM3 NPU model upgrade

6 views
Skip to first unread message

Søren Hyltoft

unread,
Jul 3, 2024, 3:22:33 AM (5 days ago) Jul 3
to doubango-ai
Hi

We have bought some licenses as we believe that UltimateALPR is a really good product.
We have previously used platerecognizer.com, but both licenses and hardware are very expensive. So an UltimateALPR license + VIM3 is a much cheaper solution.
We use Khada's VIM3, but miss an update of the models so they can run on the latest Ubuntu. Is it not possible for you to make a new 2024 compilation that can run Ubuntu 22.04 or 24.04 server eMMC image?
The only Ubuntu that works is the one referred to in your documentation, and it is from 2019. I tried a slightly newer version from 2021, where parallel=true works but npu=true does not work and this error appears: message: [ pluginAmlDetect] Graph verify failed: -1 -> A generic error code, used when no other describes the error.

*[ULTALPR_SDK INFO]: Starting benchmark...
*[COMPV INFO]: [UltAlprSdkEngine]Call: init
*[COMPV INFO]: [UltAlprSdkEngine]jsonConfig: {"debug_level": "info","debug_write_input_image_enabled": false,"debug_internal_data_path": ".","gpgpu_enabled": true,"asm_enabled": true,"intrin_enabled": true,"max_latency": -1,"klass_vcr_gamma": 1.5,"detect_tf_gpu_memory_alloc_max_percent": 1.0,"recogn_tf_gpu_memory_alloc_max_percent": 1.0,"pyramidal_search_tf_gpu_memory_alloc_max_percent": 1.0,"detect_roi": [0, 0, 0, 0],"detect_minscore": 0.1,"pyramidal_search_enabled": false,"pyramidal_search_sensitivity": 0.28,"pyramidal_search_minscore": 0.8,"pyramidal_search_min_image_size_inpixels": 800,"recogn_minscore": 0.3,"recogn_score_type": "min","assets_folder": "/home/khadas/assets","charset": "latin","num_threads": -1,"recogn_rectify_enabled": false,"ienv_enabled": false,"openvino_enabled": false,"openvino_device": "CPU","npu_enabled": true,"trt_enabled": false,"asm_enabled": true,"intrin_enabled": true,"klass_lpci_enabled": false,"klass_vcr_enabled": false,"klass_vmmr_enabled": false,"klass_vbsr_enabled": false}
*[COMPV INFO]: [UltAlprSdkEngine]**** Copyright (C) 2011-2024 Doubango Telecom <https://www.doubango.org> ****
ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK> version 3.13.2

*[COMPV INFO]: [CompVBase] Initializing [base] modules (v 1.0.0, nt -1)...
*[COMPV INFO]: [CompVBase] sizeof(compv_scalar_t)= #8
*[COMPV INFO]: [CompVBase] sizeof(float)= #4
*[COMPV INFO]: Initializing window registery
*[COMPV INFO]: [ImageDecoder] Initializing image decoder...
*[COMPV INFO]: [CompVCpu] H: 'Khadas VIM3', S: '***', M: '', MN: ''
*[COMPV INFO]: [CompVBase] CPU features: [arm];[arm64];neon;neon_fma;vfpv4;
*[COMPV INFO]: [CompVBase] CPU cores: online=#6, conf=#6
*[COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#0KB
*[COMPV INFO]: [CompVBase] CPU Phys RAM size: #3707GB
*[COMPV INFO]: [CompVBase] CPU endianness: LITTLE
*[COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_base.cxx' in function 'init' starting at line #195: Not optimized -> Your ARM OS is neither Android nor Raspberry Pi nor iOS nor NVIDIA Jetson. You may miss some optimizations. Let us know what's your OS.
*[COMPV INFO]: [CompVBase] Binary type: AArch64
*[COMPV INFO]: [CompVBase] Intrinsic enabled
*[COMPV INFO]: [CompVBase] Assembler enabled
*[COMPV INFO]: [CompVBase] Code built with option /arch:NEON
*[COMPV INFO]: [CompVBase] OS name: Generic Linux
*[COMPV INFO]: [CompVBase] Math Fast Trig.: true
*[COMPV INFO]: [CompVBase] Math Fixed Point: true
*[COMPV INFO]: [CompVMathExp] Init
*[COMPV INFO]: [CompVBase] Default alignment: #32
*[COMPV INFO]: [CompVBase] Best alignment: #32
*[COMPV INFO]: [CompVBase] Heap limit: #262144KB (#256MB)
*[COMPV INFO]: [CompVParallel] Initializing [parallel] module...
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7fadb5d170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7fad35c170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7facb5b170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7fac35a170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=4,set=useless, threadId:0x7fabb59170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #6 threads/#6 cores
*[COMPV INFO]: [CompVParallel] [Parallel] module initialized
*[COMPV INFO]: [CompVBase] [Base] modules initialized
*[COMPV INFO]: [CompVCore] Initializing [core] module (v 1.0.0)...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 1 and name = 'FAST (Features from Accelerated Segment Test)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 8 and name = 'ORB (Oriented FAST and Rotated BRIEF)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 27 and name = 'Sobel edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 28 and name = 'Scharr edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 29 and name = 'Prewitt edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 20 and name = 'Canny edge detector'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 30 and name = 'Hough standard (STD)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 31 and name = 'Kernel-based Hough transform (KHT)'...
*[COMPV INFO]: [CompVFeature] Registering feature factory with id = 41 and name = 'Standard Histogram of oriented gradients (S-HOG)'...
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=5,set=useless, threadId:0x7fab358170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVMatcher] Registering matcher factory with id = 0 and name = 'Brute force matcher'...
*[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 1 and name = 'PLSL (Parallel Light Speed Labeling)'...
*[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 19 and name = 'LMSER (Linear Time Maximally Stable Extremal Regions)'...
*[COMPV INFO]: [CompVGL] Initializing [gl] module (v 1.0.0)...
*[COMPV INFO]: [CompVGL] GL module initialized
*[COMPV INFO]: [CompVGpu] Initializing [gpu] module (v 1.0.0)...
*[COMPV INFO]: [CompVSharedLib] Loading shared library from libcuda.so
*[COMPV INFO]: [CompVGpu] Failed to open CUDA lib
*[COMPV INFO]: [CompVCamera] Initializing [camera] module (v 1.0.0)...
*[COMPV INFO]: [CompVDrawing] Initializing [drawing] module (v 1.0.0)...
*[COMPV INFO]: [CompVDrawing] /!\ No jpeg decoder found
*[COMPV INFO]: [CompVDrawing] Drawing module initialized
*[COMPV INFO]: [UltAlprSdkEnginePrivate]Line in /home/khadas/assets/models.amlogic_npu/supported_hardware.txt -> [Khadas VIM3]
*[COMPV INFO]: [UltAlprSdkEnginePrivate]Your hardware (Khadas VIM3) is registered in /home/khadas/assets/models.amlogic_npu/supported_hardware.txt
*[COMPV INFO]: [CompVGpu] GPU enabled: true
*[COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateBase/lib/source/ultimate_base_engine.cxx' in function 'init' starting at line #75: Not optimized for GPU -> GPGPU computing not enabled or deactivated
*[COMPV INFO]: [UltBaseOpenCL] Trying to load [libOpenCL.so]
*[COMPV INFO]: [CompVSharedLib] Loading shared library from libOpenCL.so
*[COMPV INFO]: [UltBaseOpenCL] Loaded [libOpenCL.so], looksLikeValid: yes...
*[COMPV INFO]: [UltBaseOpenCLUtils] Selected platform vendor: Vivante Corporation
*[COMPV INFO]: [UltBaseOpenCLUtils] deviceCount=1
*[COMPV INFO]: [UltBaseOpenCLUtils] Device -> name: Vivante OpenCL Device VIPNano-QI.7120.0000, id: 0x7fae33c028
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT=4
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE=0
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_COMPUTE_UNITS=1
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS=3
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_SIZES=256, 256, 256,
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_GROUP_SIZE=256
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_CLOCK_FREQUENCY=800 MHz
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE=64 B
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_SIZE=268435456 B (256 MB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_LOCAL_MEM_SIZE=32768 B (32 KB)
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_MEM_ALLOC_SIZE=128 MB
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_PLATFORM_VERSION=OpenCL 3.0 V6.4.8.7.415784
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_VERSION=OpenCL 3.0
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DRIVER_VERSION=OpenCL 3.0 V6.4.8.7.415784
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_OPENCL_C_VERSION=OpenCL C 1.2
*[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_EXTENSIONS=cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_il_program cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics
*[COMPV INFO]: [UltBaseOpenCL] !!!Booom!!!, OpenCL successfully loaded [libOpenCL.so]
*[COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.12.3
*[COMPV INFO]: [UltAlprPlugin] Loading plugin: /home/khadas/binaries/libultimatePluginAmlogicNPU.so ...
*[COMPV INFO]: [CompVSharedLib] Loading shared library from /home/khadas/binaries/libultimatePluginAmlogicNPU.so
*[COMPV INFO]: [CompVSharedLib] Loaded shared lib: /home/khadas/binaries/libultimatePluginAmlogicNPU.so
*[COMPV INFO]: [UltAlprSdkEnginePrivate]**** Copyright (C) 2011-2024 Doubango Telecom <https://www.doubango.org> ****
You're using an unlicensed version of ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK>
without the rights to include the SDK in any form of commercial product.
*[COMPV INFO]: [UltAlprSdkEnginePrivate]IC took 0 millis
*[COMPV INFO]: [CompVCpu] Enabling asm code
*[COMPV INFO]: [CompVCpu] Enabling intrinsic code
*[COMPV INFO]: [UltAlprSdkEnginePrivate]The 4 first chars of your serial number: 290b
*[COMPV INFO]: [UltAlprSdkEnginePrivate]Line in /home/khadas/assets/models.amlogic_npu/pid_serial_mapping.txt -> [0x7D,290a]
*[COMPV INFO]: [UltAlprSdkEnginePrivate]Line in /home/khadas/assets/models.amlogic_npu/pid_serial_mapping.txt -> [0x88,290b]
*[COMPV INFO]: [UltAlprSdkEnginePrivate]Matched PID in /home/khadas/assets/models.amlogic_npu/pid_serial_mapping.txt: [0x88]
*[COMPV INFO]: [UltAlprSdkEnginePrivate]recogn_tf_num_threads: 6, acceleration backend: AmlogicNPU,
*[COMPV INFO]: [CompVThreadDispatcher] Not optimized -> Your system have #6 cores but you're only using #4. Sad!!
*[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #4 threads/#6 cores
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7fa7df0170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [UltAlprRecognizer] TensorRT not enabled, do not create the plugin for the OCR model.
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7fa75ef170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [UltOcrRecognizer] Your OCR module is neither GPU nor NPU optimized.
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7fa85f1170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7fa8df2170, kThreadSetAffinity:false) - ENTER
*[COMPV INFO]: [UltOcrTensorflowSessionOptions] Alloc session with gpu_memory_alloc_max_percent = 100%
*[COMPV INFO]: [UltOcrRecognizer] OCR module backend: Tensorflow
*[PLUGIN_AMLNPU INFO]: /!\ Code in file '/home/khadas/ultimateAmlogicNPU/pluginAmlogicNPU/source/plugin_amlnpu_interface.cxx' in function 'pluginAmlogicNPU_Engine_new' starting at line #113: Version: 1.0.0
****[PLUGIN_AMLNPU FATAL]: function: "pluginAmlDetect()"
file: "/home/khadas/ultimateAmlogicNPU/pluginAmlogicNPU/source/plugin_amlnpu_detect.cxx"
line: "59"
message: [pluginAmlDetect] Graph verify failed: -1 -> A generic error code, used when no other describes the error.
****[PLUGIN_AMLNPU FATAL]: function: "pluginAmlDetect()"
file: "/home/khadas/ultimateAmlogicNPU/pluginAmlogicNPU/source/plugin_amlnpu_detect.cxx"
line: "60"
message: Assertion failed!

Mamadou DIOP

unread,
Jul 3, 2024, 11:28:07 AM (5 days ago) Jul 3
to Søren Hyltoft, doubango-ai
Hi,

Updating the NPU plugin to support latest Ubuntu requires huge amount of work.
Unfortunately we’re not planning it in the near future .
The SDK is already fast even without NPU acceleration by using QINT8

On 3 Jul 2024, at 07:22, Søren Hyltoft <soren....@gmail.com> wrote:

Hi
--
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/548e1d92-130f-4761-81d6-2aea38738b8fn%40googlegroups.com.

Søren Hyltoft

unread,
Jul 4, 2024, 4:34:53 AM (4 days ago) Jul 4
to doubango-ai
Okay then, but do you at least have an Ubuntu image we can burn into eMMC?
I tried to do a emmc-install to transfer SD card to eMMC, but it is not working. The image seems to be copied, but VIM3 just restarts over and over!
Reply all
Reply to author
Forward
0 new messages