DoubangoTelecom / ultimateMICR-SDK

Bank check information extraction/OCR from Magnetic Ink Character Recognition [MICR] (E-13B & CMC-7) using deep learning
https://www.doubango.org/webapps/micr/
Other
54 stars 20 forks source link

ModuleNotFoundError: No module named 'ultimateMicrSdk' #57

Closed kumarsyamala closed 1 year ago

kumarsyamala commented 1 year ago

Hi

I followed everything , I installed C++ compiler and visual studio code ,which ever mentioned in https://github.com/DoubangoTelecom/ultimateMICR-SDK/blob/master/python/README.md

After that changed the directory and I ran the setup.py

Then followed the steps which mentioned in https://github.com/DoubangoTelecom/ultimateMICR-SDK/tree/master/samples/python/recognizer

But , I am facing an error

image

DoubangoTelecom commented 1 year ago

Set PYTHONPATH for us to find the module as explained at
https://github.com/DoubangoTelecom/ultimateMICR-SDK/tree/master/samples/python/recognizer#testing-examples. Or, run https://github.com/DoubangoTelecom/ultimateMICR-SDK/blob/master/samples/python/recognizer/run_windows_x64.bat

kumarsyamala commented 1 year ago

Hi ,I have tried that also

Even with that also same error

image

DoubangoTelecom commented 1 year ago

Please don't put screenshots in your reports. We cannot read them from our mails. Please comment with plain text.

DoubangoTelecom commented 1 year ago

I have to connect to Github to be able to see your screenshots. If you're new to devs, I have an advice for you: Do not share screenshots:

This said, you're absolutely not doing what is written in the documentation. You're not setting PYTHONPATH to the right value. I want to share the right command but I cannot because I have to do a copy/paste from your logs.

kumarsyamala commented 1 year ago

`PS C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master> cd sdk\samples\python\recognizer (base) PS C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer> set PYTHONPATH=C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\binaries\windows\x86_64\build\temp.win-amd64-3.9\Release\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\python

python recognizer.py --image C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\assets\images\e13b_1280x720.jpg Traceback (most recent call last): File "C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer\recognizer.py", line 27, in import ultimateMicrSdk ModuleNotFoundError: No module named 'ultimateMicrSdk' (base) PS C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer> `

DoubangoTelecom commented 1 year ago

Run:

cd C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer
./run_windows_x64.bat

If you want to use absolute paths: set PYTHONPATH=C:/Users/Rama.Reddy/Downloads/ultimateMICR-SDK-master/sdk/binaries/windows/x86_64;C:/Users/Rama.Reddy/Downloads/ultimateMICR-SDK-master/sdk/python Notice that PYTHONPATH has 2 values separated by comma(;).:

kumarsyamala commented 1 year ago

Hi , Thanks it worked for me.

`(base) PS C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer> cd C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer

run_windows_x64.bat

C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer>setlocal

C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer>set PYTHONPATH=../../../binaries/windows/x86_64;../../../python

C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer>python recognizer.py --image ../../../assets/images/e13b_1280x720.jpg --format e13b --assets ../../../assets --backprop True --ielcd True [COMPV INFO]: [UltMicrSdkEngine]Call: ultimateMicrSdk::UltMicrSdkEngine::init [COMPV INFO]: [UltMicrSdkEngine]jsonConfig: {"debug_level": "info", "debug_write_input_image_enabled": false, "debug_internal_data_path": ".", "num_threads": -1, "gpgpu_enabled": true, "backprop": true, "interpolation": "bilinear", "roi": [0, 0, 0, 0], "min_score": 0.4, "score_type": "min", "assets_folder": "../../../assets", "format": "e13b", "ielcd": true} *[COMPV INFO]: [UltMicrSdkEngine] Copyright (C) 2011-2023 Doubango Telecom https://www.doubango.org ultimateMICR-SDK https://github.com/DoubangoTelecom/ultimateMICR-SDK version 2.14.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]: [CompVBase] Windows dwMajorVersion=10, dwMinorVersion=0 [COMPV INFO]: Initializing window registery [COMPV INFO]: [ImageDecoder] Initializing image decoder... [COMPV INFO]: [CompVCpu] H: 'GenuineIntel', S: '', M: '', MN: '' [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;avx512_f;avx512_cd;avx512_vl;avx512_bw;avx512_dq;avx512_ifma;avx512_vbmi; [COMPV INFO]: [CompVBase] CPU cores: online=#8, conf=#8 [COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#48KB [COMPV INFO]: [CompVBase] CPU Phys RAM size: #32496GB [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] OS name: Windows [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: #1663817KB (#1624MB) [COMPV INFO]: [CompVParallel] Initializing [parallel] module... [COMPV INFO]: /!\ Code in file 'compv_mem.cxx' in function 'compv::CompVMemZero_C' starting at line #508: Not optimized -> No SIMD implementation found [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=0,set=useless, threadId:000000000001193C, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=1,set=useless, threadId:000000000000A630, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=3,set=useless, threadId:000000000000D03C, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=2,set=useless, threadId:000000000000C1D0, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=4,set=useless, threadId:000000000000B080, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=7,set=useless, threadId:0000000000009FA4, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=5,set=useless, threadId:0000000000010BB8, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(coreId:requested=6,set=useless, threadId:0000000000011C18, kThreadSetAffinity:false) - ENTER [COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #8 threads/#8 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]: [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]: [CompVCamera] Initializing [camera] module (v 1.0.0)... [COMPV INFO]: [CompVCamera] Camera plugin path: C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer\CompVPluginMFoundation.dll [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 'source\ultimate_base_engine.cxx' in function 'ultimateBase::UltBaseEngine::init' starting at line #83: Not optimized for GPU -> GPGPU computing not enabled or deactivated [COMPV INFO]: [UltBaseOpenCL] Trying to load [OpenCL.dll] [COMPV INFO]: [CompVSharedLib] Loading sharded library from OpenCL.dll [COMPV INFO]: [UltBaseOpenCL] Loaded [OpenCL.dll], looksLikeValid: yes... [COMPV INFO]: [UltBaseOpenCLUtils] Selected platform vendor: Intel(R) Corporation [COMPV INFO]: [UltBaseOpenCLUtils] deviceCount=1 [COMPV INFO]: [UltBaseOpenCLUtils] Device -> name: Intel(R) Iris(R) Xe Graphics, id: 00000282052AD8F0 [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=96 [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=1300 MHz [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE=64 B [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_GLOBAL_MEM_SIZE=13629988864 B (12998 MB) [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_LOCAL_MEM_SIZE=65536 B (64 KB) [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_MAX_MEM_ALLOC_SIZE=4095 MB [COMPV INFO]: [UltBaseOpenCLUtils] CL_PLATFORM_VERSION=OpenCL 3.0 [COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_VERSION=OpenCL 3.0 NEO [COMPV INFO]: [UltBaseOpenCLUtils] CL_DRIVER_VERSION=31.0.101.3358 *[COMPV INFO]: [UltBaseOpenCLUtils] CL_DEVICE_OPENCL_C_VERSION=OpenCL C 1.2 [COMPV ERROR]: function: "ultimateBase::UltBaseOpenCLUtils::init()" file: "source\opencl\ultimate_base_opencl_utils.cxx" line: "96" message: [UltBaseOpenCLUtils] OpenCL operation failed (-30 -> CL_INVALID_VALUE) -> [COMPV ERROR]: function: "ultimateBase::UltBaseOpenCLUtils::init()" file: "source\opencl\ultimate_base_opencl_utils.cxx" line: "106" message: Operation Failed (COMPV_ERROR_CODE_E_UNKNOWN) -> [COMPV INFO]: [UltBaseOpenCL] Failed to hook functions using [OpenCL.dll] library [COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.15.0 *[COMPV INFO]: [UltMicrSdkEnginePrivate] Copyright (C) 2011-2023 Doubango Telecom https://www.doubango.org You're using an unlicensed version of ultimateMICR-SDK https://github.com/DoubangoTelecom/ultimateMICR-SDK without the rights to include the SDK in any form of commercial product. [COMPV INFO]: [CompVCpu] Enabling asm code [COMPV INFO]: [CompVCpu] Enabling intrinsic code [COMPV INFO]: [UltMicrSdkEnginePrivate]IC took 149 millis [COMPV INFO]: /!\ Code in file 'compv_mem.cxx' in function 'compv::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]: [UltBaseMachineLearningPredictRBF] Elapsed time (loading model) = [[[ 54 millis ]]] [COMPV INFO]: [UltBaseMachineLearningPredictRBF] Newly created RBF binary predictor is GPGPU accelerated: false [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 'source\ultimate_text_classifier.cxx' in function 'ultimateText::UltTextClassifier::process' starting at line #122: Is for testing and must not be called -> Text/Nontext classification must not be disabled [COMPV INFO]: /!\ Code in file 'source\ultimate_text_context.cxx' in function 'ultimateText::UltTextContext::queryCharsFromPool' starting at line #33: Not optimized -> NO MT function could be found [COMPV INFO]: /!\ Code in file 'source\ultimate_micr_detector_impl.cxx' in function 'ultimateMicr::__UltMicrDetectorExtractMosaic' starting at line #659: Not optimized -> Do not not perform rotation if the angle is < DBL_EPSILON [COMPV INFO]: /!\ Code in file 'intrin\x86\compv_mem_intrin_ssse3.cxx' in function 'compv::CompVMemUnpack3_SrcPtrNotAligned_Intrin_SSSE3' starting at line #69: Not built with SSSE3 support [COMPV INFO]: /!\ Code in file 'compv_mem.cxx' in function 'compv::CompVMem::set' starting at line #496: Not optimized -> No SIMD implementation found [PythonRecognizer] Process: OK -> {"duration":2956,"frame_id":0,"zones":[{"confidences":[90.41894,100.0,90.68661,90.75143,90.76146,90.73479,90.76076,90.7605,90.6501,90.57278,90.55907,90.66807,90.87484,90.80627,90.55585,90.63049,90.80851,90.65916,90.41894,90.62715,90.60662,90.63529,90.90036,90.64396,90.62691,90.89654,90.5929,90.60212,90.4281,90.72624,90.50981,90.6985],"description":"E-13B","klass":1,"skew":0.0,"text":"C35141075CA973D00A0*349D15C","warpedBox":[185.0,492.0,801.0,492.0,801.0,553.0,185.0,553.0]}]}

Press Enter to exit...

[COMPV INFO]: [UltMicrSdkEngine]Call: ultimateMicrSdk::UltMicrSdkEngine::deInit [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVMem] compv::CompVMem::poolCleanBuffersForCurrentThread(threadId:000000000001193C) [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(threadId:000000000001193C) - EXIT [COMPV INFO]: [Thread] Thread with id=000000000001193C will join [COMPV INFO]: Thread with id=000000000001193C will join *[COMPV INFO]: [Thread] Thread with id=000000000001193C destroyed [COMPV INFO]: [Thread] Thread with id=000000000000A630 will join [COMPV INFO]: [CompVMem] compv::CompVMem::poolCleanBuffersForCurrentThread(threadId:000000000000A630) [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(threadId:000000000000A630) - EXIT [COMPV INFO]: Thread with id=000000000000A630 will join *[COMPV INFO]: [Thread] Thread with id=000000000000A630 destroyed [COMPV INFO]: [CompVMem] compv::CompVMem::poolCleanBuffersForCurrentThread(threadId:000000000000C1D0) [COMPV INFO]: [Thread] Thread with id=000000000000C1D0 will join [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(threadId:000000000000C1D0) - EXIT [COMPV INFO]: Thread with id=000000000000C1D0 will join *[COMPV INFO]: [Thread] Thread with id=000000000000C1D0 destroyed [COMPV INFO]: [CompVMem] compv::CompVMem::poolCleanBuffersForCurrentThread(threadId:000000000000D03C) [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(threadId:000000000000D03C) - EXIT [COMPV INFO]: [Thread] Thread with id=000000000000D03C will join [COMPV INFO]: Thread with id=000000000000D03C will join *[COMPV INFO]: [Thread] Thread with id=000000000000D03C destroyed [COMPV INFO]: [Thread] Thread with id=000000000000B080 will join [COMPV INFO]: [CompVMem] compv::CompVMem::poolCleanBuffersForCurrentThread(threadId:0000000000011C18) [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(threadId:0000000000011C18) - EXIT [COMPV INFO]: Thread with id=0000000000011C18 will join *[COMPV INFO]: [Thread] Thread with id=0000000000011C18 destroyed [COMPV INFO]: [Thread] Thread with id=0000000000009FA4 will join [COMPV INFO]: [CompVMem] compv::CompVMem::poolCleanBuffersForCurrentThread(threadId:0000000000009FA4) [COMPV INFO]: [CompVAsyncTask11] compv::CompVAsyncTask11::run(threadId:0000000000009FA4) - EXIT [COMPV INFO]: Thread with id=0000000000009FA4 will join *[COMPV INFO]: [Thread] Thread with id=0000000000009FA4 destroyed [COMPV INFO]: [CompVBase] Base modules deinitialized [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVBase] Base modules deinitialized [COMPV INFO]: Drawing module deinitialized [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVBase] Base modules deinitialized [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVBase] Base modules deinitialized [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVBase] Base modules deinitialized [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVBase] Base modules deinitialized [COMPV INFO]: [CompVBase] DeInitializing base modules (v 1.0.0)... [COMPV INFO]: [CompVBase] Base modules deinitialized [PythonRecognizer] DeInit: OK -> {}

C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer>endlocal (base) PS C:\Users\Rama.Reddy\Downloads\ultimateMICR-SDK-master\sdk\samples\python\recognizer>`

One small thing , Where would be the results will be store

I have used the image "assets\images\e13b_1280x720.jpg" This the extract text from the image right "text":"C35141075CA973D00A0349D15C"

When I compare the same image in https://www.doubango.org/webapps/micr/ it showed exactly the same which is in image

Why the output is different!!

DoubangoTelecom commented 1 year ago

The output isn't different. Without a license some chars will be replaced with (8, 6). You're not using proper tags to display logs and Github is interpreting the . To be short, your output is the sample but some chars are replaced with * but they seem missing because you're not using proper tag for logs.

kumarsyamala commented 1 year ago

If you dont mind can you let me know , what are the proper tags for logs and where to mention those