hikopensource / DAVAR-Lab-OCR

OCR toolbox from Davar-Lab
Apache License 2.0
733 stars 157 forks source link

2 errors detected in the compilation of ctc_entrypoint.cu and Could not find libwarpctc.so in ../build. #125

Open jigsawcoder opened 1 year ago

jigsawcoder commented 1 year ago

I wanted to infer the LGPMA model on my own table dataset. When I tried to install the setup.sh file, the following error occurred.

Installed /content/drive/MyDrive/davar/DAVAR-Lab-OCR Processing dependencies for davarocr==0.6.0 Finished processing dependencies for davarocr==0.6.0 CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- cuda found TRUE -- Building shared library with GPU support -- Configuring done -- Generating done -- Build files have been written to: /content/drive/MyDrive/davar/DAVAR-Lab-OCR/davarocr/davar_rcg/third_party/warp-ctc-pytorch_bindings/build [-11%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o /content/drive/MyDrive/davar/DAVAR-Lab-OCR/davarocr/davar_rcg/third_party/warp-ctc-pytorch_bindings/src/ctc_entrypoint.cu(1): error: this declaration has no storage class or type specifier

/content/drive/MyDrive/davar/DAVAR-Lab-OCR/davarocr/davar_rcg/third_party/warp-ctc-pytorch_bindings/src/ctc_entrypoint.cu(1): error: expected a ";"

2 errors detected in the compilation of "/content/drive/MyDrive/davar/DAVAR-Lab-OCR/davarocr/davar_rcg/third_party/warp-ctc-pytorch_bindings/src/ctc_entrypoint.cu". CMake Error at warpctc_generated_ctc_entrypoint.cu.o.cmake:280 (message): Error generating file /content/drive/MyDrive/davar/DAVAR-Lab-OCR/davarocr/davar_rcg/third_party/warp-ctc-pytorch_bindings/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_ctc_entrypoint.cu.o

CMakeFiles/warpctc.dir/build.make:394: recipe for target 'CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o' failed make[2]: [CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o] Error 1 CMakeFiles/Makefile2:86: recipe for target 'CMakeFiles/warpctc.dir/all' failed make[1]: [CMakeFiles/warpctc.dir/all] Error 2 Makefile:135: recipe for target 'all' failed make: *** [all] Error 2 Could not find libwarpctc.so in ../build. Build warp-ctc and set WARP_CTC_PATH to the location of libwarpctc.so (default is '../build')

Things I have already tried: -> I followed up on the FAQ but didn't work. -> I tried to comment the lines 26-31 and 36-68 in setput.sh file but that also did not work.

Please help me. Thanks in advance

qiaoliang6 commented 1 year ago

The warpctc is a third-party package that hasn't been maintained for a long time, so it may be more restrictive to the environment. You can try using the exact same version of our environment.

Nevertheless, if you do not need to train a text recognition model using warpctc, you can simply ignore this error. And then comment the import code "import warpctc" in the corresponding "init.py" file. It would not affect other functions.

jigsawcoder commented 1 year ago

The warpctc is a third-party package that hasn't been maintained for a long time, so it may be more restrictive to the environment. You can try using the exact same version of our environment.

Nevertheless, if you do not need to train a text recognition model using warpctc, you can simply ignore this error. And then comment the import code "import warpctc" in the corresponding "init.py" file. It would not affect other functions.

I successfully skipped the install of watpctc but I am facing multiple errors while running test_pub.py to infer LGPMA model. From my understanding, these errors are caused due to incompatible mmcv and mmdet versions. I have tested multiple versions but none of them actually worked. Can you please specify which PyTorch, MMCV and MMDET versions should I install in order to just infer the LGPMA model using test_pub.py

Thank you

qiaoliang6 commented 1 year ago

The warpctc is a third-party package that hasn't been maintained for a long time, so it may be more restrictive to the environment. You can try using the exact same version of our environment. Nevertheless, if you do not need to train a text recognition model using warpctc, you can simply ignore this error. And then comment the import code "import warpctc" in the corresponding "init.py" file. It would not affect other functions.

I successfully skipped the install of watpctc but I am facing multiple errors while running test_pub.py to infer LGPMA model. From my understanding, these errors are caused due to incompatible mmcv and mmdet versions. I have tested multiple versions but none of them actually worked. Can you please specify which PyTorch, MMCV and MMDET versions should I install in order to just infer the LGPMA model using test_pub.py

Thank you

The model was trained based on pytorch==1.3.0 mmcv-full==1.3.4 and mmdet=2.11.0

jigsawcoder commented 1 year ago

I have install the mentioned versions on pytorch, mmcv-full and mmdet but still facing this error:

AttributeError: module 'torch.jit' has no attribute '_script_if_tracing'

ZHEGG commented 1 year ago

The warpctc is a third-party package that hasn't been maintained for a long time, so it may be more restrictive to the environment. You can try using the exact same version of our environment. Nevertheless, if you do not need to train a text recognition model using warpctc, you can simply ignore this error. And then comment the import code "import warpctc" in the corresponding "init.py" file. It would not affect other functions.

I successfully skipped the install of watpctc but I am facing multiple errors while running test_pub.py to infer LGPMA model. From my understanding, these errors are caused due to incompatible mmcv and mmdet versions. I have tested multiple versions but none of them actually worked. Can you please specify which PyTorch, MMCV and MMDET versions should I install in order to just infer the LGPMA model using test_pub.py

Thank you

I have the same question, how did you skip it? Thanks!