Bartzi / stn-ocr

Code for the paper STN-OCR: A single Neural Network for Text Detection and Text Recognition
https://arxiv.org/abs/1707.08831
GNU General Public License v3.0
499 stars 137 forks source link

ctc_loss.cpp:509:10: fatal error: 'ctc.h' file not found #28

Open eravallirao opened 5 years ago

eravallirao commented 5 years ago

Screenshot 2019-06-17 at 4 44 56 PM I am getting the above warning while running "make"

After that while running this command python3 setup.py build_ext --inplace I am getting the below error. Screenshot 2019-06-17 at 4 46 49 PM Can you please help me with this

Bartzi commented 5 years ago

did you run make install after building warp_ctc? Did you make sure that Cython is able to find the header files of warp_ctc.

eravallirao commented 5 years ago

Screenshot 2019-06-17 at 4 53 40 PM I am getting this while running make install

eravallirao commented 5 years ago

I tried giving "sudo" Screenshot 2019-06-17 at 4 55 37 PM

eravallirao commented 5 years ago

Did you make sure that Cython is able to find the header files of warp_ctc? How can we check this? I am little bit new to this, please don't mind if I am asking for basics.

Bartzi commented 5 years ago

if your CMAKE_INSTALL_PREFIX is set to /usr/local. Cython should be able to find your files, once you did run make install successfully.

eravallirao commented 5 years ago

I followed the path you asked to, still I am getting the error of ctc.h not found

eravallirao commented 5 years ago

Do you have any docker setup available

Bartzi commented 5 years ago

did you check that ctc.h is in /usr/local/include? Unfortunately, I can not provide a docker image at the moment.

eravallirao commented 5 years ago

Sorry for late reply. Yeah I did check, It was not there. I copied the ctc.h file and copied into the path you specified and ran it. I am getting other error Screenshot 2019-06-20 at 11 57 49 AM

Bartzi commented 5 years ago

It seems that the linker can not find the library. Where is your compiled library stored on your pc? Is that path in your environment variable LD_LIBRARY_PATH?

eravallirao commented 5 years ago

Sorry can you please tell me about the compiled library? FYI I don't have CUDA. I am running it on MAC

eravallirao commented 5 years ago

sukshis-MacBook-Air-2:ctc Puru$ echo $LD_LIBRARY_PATH /Users/sukshi/torch/install/lib:

Bartzi commented 5 years ago

the compiler creates a .so file once you are done with compiling the warpctc library. That is the file I'm talking about. If you place this file in /Users/sukshi/torch/install/lib the compiler, compiling the python extension, might find it.

eravallirao commented 5 years ago

Screenshot 2019-06-20 at 2 00 37 PM Are you talking about the same .so file which is in that directory?

Bartzi commented 5 years ago

No, I'm talking about a file that sshould be named libwarpctc.so or something like that. I see that you have a libwarpctc.dylib file. This might be a mac equivalent of a .so file but I don't know anything about macs and I can not help you with that. In the Linux world you'll need a .so file for the linker but how that stuff works on mac (if it is different at all) I really don't know.