DoubangoTelecom / ultimateALPR-SDK

World's fastest ANPR / ALPR implementation for CPUs, GPUs, VPUs and NPUs using deep learning (Tensorflow, Tensorflow lite, TensorRT, OpenVX, OpenVINO). Multi-Charset (Latin, Korean, Chinese) & Multi-OS (Jetson, Android, Raspberry Pi, Linux, Windows) & Multi-Arch (ARM, x86).
https://www.doubango.org/webapps/alpr/
Other
593 stars 157 forks source link

Query regarding GPU usage. Does it use GPU? #274

Closed shannonwarren closed 1 year ago

shannonwarren commented 1 year ago

Thanks for this sdk. I'm trying to run the sample code provided recognizer.py and followed steps to build. It runs successfully however looking at the logs it says that it's not optimized for GPU. My CUDA, driver and type pf gpu are displayed in the log. Just trying to understand the logs.

PYTHONPATH=$PYTHONPATH:.:../../../python LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH python ../../../samples/python/recognizer/recognizer.py --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets [COMPV INFO]: [UltAlprSdkEngine]Call: init [COMPV INFO]: [UltAlprSdkEngine]jsonConfig: {"debug_level": "info", "debug_write_input_image_enabled": false, "debug_internal_data_path": ".", "num_threads": -1, "gpgpu_enabled": true, "max_latency": -1, "klass_vcr_gamma": 1.5, "detect_roi": [0, 0, 0, 0], "detect_minscore": 0.1, "car_noplate_detect_min_score": 0.8, "pyramidal_search_enabled": true, "pyramidal_search_sensitivity": 0.28, "pyramidal_search_minscore": 0.3, "pyramidal_search_min_image_size_inpixels": 800, "recogn_rectify_enabled": true, "recogn_minscore": 0.3, "recogn_score_type": "min", "assets_folder": "../../../assets", "charset": "latin", "car_noplate_detect_enabled": false, "ienv_enabled": false, "openvino_enabled": false, "openvino_device": "CPU", "npu_enabled": false, "klass_lpci_enabled": false, "klass_vcr_enabled": false, "klass_vmmr_enabled": false, "klass_vbsr_enabled": false, "license_token_file": "", "license_token_data": ""} *[COMPV INFO]: [UltAlprSdkEngine] Copyright (C) 2011-2023 Doubango Telecom https://www.doubango.org ultimateALPR-SDK https://github.com/DoubangoTelecom/ultimateALPR-SDK version 3.11.0

[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: 'GenuineIntel', S: '', M: '158', MN: 'Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz' [COMPV INFO]: [CompVBase] CPU features: (intel);[x86];[x64];mmx;sse;sse2;sse3;ssse3;sse41;sse42;avx;avx2;fma3;erms;bmi1;bmi2;popcnt;cmov;aes;rdrand; [COMPV INFO]: [CompVBase] CPU cores: online=#12, conf=#12 [COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#32KB [COMPV INFO]: [CompVBase] CPU Phys RAM size: #15965GB [COMPV INFO]: [CompVBase] CPU endianness: LITTLE [COMPV INFO]: [CompVBase] Binary type: X86_64 [COMPV INFO]: [CompVBase] Intrinsic enabled [COMPV INFO]: [CompVBase] Assembler enabled [COMPV INFO]: [CompVBase] Code built with option /arch:SSE [COMPV INFO]: [CompVBase] Code built with option /arch:SSE2 [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: #64 [COMPV INFO]: [CompVBase] Best alignment: #64 [COMPV INFO]: [CompVBase] Heap limit: #817452KB (#798MB) [COMPV INFO]: [CompVParallel] Initializing [parallel] module... [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemZero_C' starting at line #508: Not optimized -> No SIMD implementation found [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x7fb28d92f700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x7fb28d12e700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x7fb28c12c700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x7fb28c92d700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=4,set=useless, threadId:0x7fb28b92b700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=5,set=useless, threadId:0x7fb28b12a700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=6,set=useless, threadId:0x7fb28a929700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=7,set=useless, threadId:0x7fb28a128700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=8,set=useless, threadId:0x7fb289927700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=9,set=useless, threadId:0x7fb289126700, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #12 threads/#12 cores [COMPV INFO]: [CompVParallel] [Parallel] module initialized [COMPV INFO]: [CompVBase] [Base] modules initialized [COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=11,set=useless, threadId:0x7fb288124700, kThreadSetAffinity:false) - ENTER [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]: [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]: [CompVAsyncTask11] run(coreId:requested=10,set=useless, threadId:0x7fb288925700, kThreadSetAffinity:false) - ENTER [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]: [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]: [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 sharded library from libOpenCL.so [COMPV INFO]: [UltBaseOpenCL] Loaded [libOpenCL.so], looksLikeValid: yes... [COMPV INFO]: [UltBaseOpenCLUtils] Selected platform vendor: NVIDIA Corporation [COMPV INFO]: [UltBaseOpenCLUtils] deviceCount=1 [COMPV INFO]: [UltBaseOpenCLUtils] Device -> name: NVIDIA GeForce RTX 2080, id: 0x24deac0 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT=1 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE=1 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_COMPUTE_UNITS=46 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS=3 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_ITEM_SIZES=1024, 1024, 64, [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_WORK_GROUP_SIZE=1024 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_CLOCK_FREQUENCY=1830 MHz [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE=128 B [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_SIZE=8366784512 B (7979 MB) [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_LOCAL_MEM_SIZE=49152 B (48 KB) [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_MEM_ALLOC_SIZE=1994 MB [COMPV INFO]: [UltBaseOpenCLUtils] CL_PLATFORM_VERSION=OpenCL 3.0 CUDA 11.4.112 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_VERSION=OpenCL 3.0 CUDA [COMPV INFO]: [UltBaseOpenCLUtils] CL_DRIVER_VERSION=470.63.01 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_OPENCL_C_VERSION=OpenCL C 1.2 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_EXTENSIONS=cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid cl_khr_pci_bus_info [COMPV INFO]: [UltBaseOpenCL] !!!Booom!!!, OpenCL successfully loaded [libOpenCL.so] [COMPV INFO]: [UltOcrEngine] Tensorflow version: 2.6.0-dev20210809 *[COMPV INFO]: [UltAlprSdkEnginePrivate] Copyright (C) 2011-2023 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 6497 millis [COMPV INFO]: [CompVCpu] Enabling asm code [COMPV INFO]: [CompVCpu] Enabling intrinsic code [COMPV INFO]: [UltAlprSdkEnginePrivate]recogn_tf_num_threads: 12, acceleration backend: null [COMPV INFO]: [UltOcrTensorflowSessionOptions] gpu_memory_alloc_max_percent = 0.100000 [COMPV INFO]: [UltOcrTensorflowSessionOptions] Alloc session with gpu_memory_alloc_max_percent = 10% [COMPV INFO]: [UltOcrTensorflowSessionOptions] gpu_memory_alloc_max_percent = 0.100000 [COMPV INFO]: [UltOcrTensorflowSessionOptions] Alloc session with gpu_memory_alloc_max_percent = 10% [COMPV INFO]: [UltOcrTensorflowSessionOptions] gpu_memory_alloc_max_percent = 0.250000 [COMPV INFO]: [UltOcrTensorflowSessionOptions] Alloc session with gpu_memory_alloc_max_percent = 20% [PythonRecognizer] Init: OK -> {} [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #985: Not optimized -> No SIMD implementation found. On ARM consider http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka13544.html [COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateALPR/lib/source/ultimate_alpr_detector.cxx' in function 'process' starting at line #29: Not optimized -> Batching will not be activated for this function [COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateOCR/lib/source/ultimate_ocr_tensorflow_session_detect.cxx' in function 'processInternal' starting at line #116: Not optimized -> Batching not supported for this function [COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateText/lib/source/ultimate_text_fuser.cxx' in function 'process' starting at line #189: Is for testing and must not be called -> Fragments should be trimmed [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'mulAtA' starting at line #881: Contains a TODO: -> Deprecated: use CompVMath::mulAB [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'transpose' starting at line #619: Not optimized -> No MT implementation could be found [COMPV INFO]: /!\ Code in file '/home/ultimate/ultimateText/lib/source/ultimate_text_slant.cxx' in function 'applyTransformation' starting at line #90: Not optimized -> Bundle homogenous transformation + transpose + mulABt + homogeneousToCartesian2D [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'transpose' starting at line #619: Not optimized -> No MT implementation could be found [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_transform.cxx' in function 'homogeneousToCartesian2D' starting at line #98: Not optimized -> No SIMD or GPU implementation found [COMPV INFO]: /!\ Code in file '/home/ultimate/compv/base/math/compv_math_matrix.cxx' in function 'invA3x3' starting at line #515: Not optimized -> No SIMD or GPU implementation found. [PythonRecognizer] Process: OK -> {"duration":18335,"frame_id":0,"plates":[{"car":{"confidence":100.0,"warpedBox":[82.09431,156.6581,1088.653,156.6581,1088.653,615.6088,82.09431,615.6088]},"confidences":[87.81531,99.9892,90.19157,90.00142,90.07709,89.41538,90.07365,90.29479,87.81531],"text":"3PEDLM*","warpedBox":[822.5818,339.7117,915.2701,339.7117,915.2701,399.878,822.5818,399.878]}]}

DoubangoTelecom commented 1 year ago

Please use the developer group for questions