Summary
Hi! Great project and very interesting paper. I've encountered two issues:
setup.py
doesn't include all of the dependencies
- The GPU-only support isn't explicit.
Steps to Recreate
After following the setup instructions in your ReadME on Ubuntu 18.04 with python 3.7.4, I tried running:
python tools/test_net.py configs/icdar2015_hourglass88.yaml images_dir results_dir
and received the following error:
python tools/test_net.py configs/icdar2015_hourglass88.yaml images_dir results_dir
Traceback (most recent call last):
File "tools/test_net.py", line 9, in <module>
from charnet.modeling.model import CharNet
File "/c/Users/cmcallister/dev/research-charnet/charnet/modeling/model.py", line 17, in <module>
from .postprocessing import OrientedTextPostProcessing
File "/c/Users/cmcallister/dev/research-charnet/charnet/modeling/postprocessing.py", line 11, in <module>
import editdistance
ModuleNotFoundError: No module named 'editdistance'
As a side note, I'm running Ubuntu on the Windows Subsystem for Linux
After pip installing editdistance, I got another import error:
python tools/test_net.py configs/icdar2015_hourglass88.yaml images_dir results_dir
Traceback (most recent call last):
File "tools/test_net.py", line 9, in <module>
from charnet.modeling.model import CharNet
File "/c/Users/cmcallister/dev/research-charnet/charnet/modeling/model.py", line 17, in <module>
from .postprocessing import OrientedTextPostProcessing
File "/c/Users/cmcallister/dev/research-charnet/charnet/modeling/postprocessing.py", line 13, in <module>
from .rotated_nms import nms, nms_with_char_cls, \
File "/c/Users/cmcallister/dev/research-charnet/charnet/modeling/rotated_nms.py", line 9, in <module>
import pyclipper
ModuleNotFoundError: No module named 'pyclipper'
I pip installed that only to see that yacs
was also required. Interestingly, yacs is in your setup.py file.
pip installing those dependencies got me past the import errors, but then I got the following error:
Traceback (most recent call last):
File "tools/test_net.py", line 69, in <module>
charnet.cuda()
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 305, in cuda
return self._apply(lambda t: t.cuda(device))
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 202, in _apply
module._apply(fn)
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 202, in _apply
module._apply(fn)
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 202, in _apply
module._apply(fn)
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 224, in _apply
param_applied = fn(param)
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 305, in <lambda>
return self._apply(lambda t: t.cuda(device))
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/cuda/__init__.py", line 192, in _lazy_init
_check_driver()
File "/home/cmcallister/.pyenv/versions/3.7.4/lib/python3.7/site-packages/torch/cuda/__init__.py", line 102, in _check_driver
http://www.nvidia.com/Download/index.aspx""")
AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
Recommended Fix
Updating setup.py
to include all of the dependencies and also updating the ReadMe to make it clear that you need a GPU machine in order to run the code.