clovaai / CRAFT-pytorch

Official implementation of Character Region Awareness for Text Detection (CRAFT)
MIT License
3.06k stars 866 forks source link

import craft_utils ModuleNotFoundError: No module named 'craft_utils' error #176

Open rishisriv opened 2 years ago

rishisriv commented 2 years ago

I am running using anaconda prompt:

python test.py --trained_model=[weightfile] --test_folder='C:\Users\nosta\OneDrive\Desktop\construction_data_entry\craft_unet_tesseract_g702\test_folder'

I am getting following error. import craft_utils ModuleNotFoundError: No module named 'craft_utils'

Could you please help? Below is a list of packages I have in my conda virtual environment where I am running the python command mentiond above from.

Name Version Build Channel

alabaster 0.7.12 pyhd3eb1b0_0 argh 0.26.2 py310haa95532_0 arrow 1.2.2 pyhd3eb1b0_0 astroid 2.11.2 py310h5588dad_1 conda-forge atomicwrites 1.4.0 py_0 attrs 21.4.0 pyhd3eb1b0_0 autopep8 1.6.0 pyhd3eb1b0_0 babel 2.9.1 pyhd3eb1b0_0 backcall 0.2.0 pyhd3eb1b0_0 bcrypt 3.2.0 py310h2bbff1b_0 beautifulsoup4 4.11.1 pyha770c72_0 conda-forge binaryornot 0.4.4 pyhd3eb1b0_1 black 22.3.0 pyhd8ed1ab_0 conda-forge bleach 5.0.0 pyhd8ed1ab_0 conda-forge brotlipy 0.7.0 py310h2bbff1b_1002 bzip2 1.0.8 he774522_0 ca-certificates 2022.3.29 haa95532_0 certifi 2021.10.8 pypi_0 pypi cffi 1.15.0 py310h2bbff1b_1 chardet 4.0.0 py310haa95532_1003 charset-normalizer 2.0.12 pyhd8ed1ab_0 conda-forge click 8.1.2 py310h5588dad_0 conda-forge cloudpickle 2.0.0 pyhd3eb1b0_0 colorama 0.4.4 pyhd3eb1b0_0 cookiecutter 1.7.3 pyhd3eb1b0_0 cryptography 36.0.2 py310ha857299_1 conda-forge dataclasses 0.8 pyh6d0b6a4_7 debugpy 1.6.0 py310h8a704f9_0 conda-forge decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 diff-match-patch 20200713 pyhd3eb1b0_0 dill 0.3.4 pyhd3eb1b0_0 docutils 0.15.2 py310h5588dad_3 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge flake8 4.0.1 pyhd3eb1b0_1 icu 69.1 h0e60522_0 conda-forge idna 3.3 pyhd3eb1b0_0 imageio 2.16.2 pypi_0 pypi imagesize 1.3.0 pyhd3eb1b0_0 importlib-metadata 4.11.3 py310haa95532_0 importlib_metadata 4.11.3 hd3eb1b0_0 importlib_resources 5.7.0 pyhd8ed1ab_0 conda-forge inflection 0.5.1 py310haa95532_0 intervaltree 3.1.0 pyhd3eb1b0_0 ipykernel 6.13.0 py310hbbfc1a7_0 conda-forge ipython 7.32.0 py310h5588dad_0 conda-forge ipython_genutils 0.2.0 pyhd3eb1b0_1 isort 5.10.1 pyhd8ed1ab_0 conda-forge jedi 0.18.1 py310haa95532_1 jellyfish 0.9.0 py310h2bbff1b_0 jinja2 3.1.1 pyhd8ed1ab_0 conda-forge jinja2-time 0.2.0 pyhd3eb1b0_3 jpeg 9e h8ffe710_0 conda-forge jsonschema 4.4.0 pyhd8ed1ab_0 conda-forge jupyter_client 7.2.2 pyhd8ed1ab_1 conda-forge jupyter_core 4.9.2 py310haa95532_0 jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge keyring 23.4.0 py310haa95532_0 lazy-object-proxy 1.7.1 py310he2412df_1 conda-forge libclang 13.0.1 default_h81446c8_0 conda-forge libffi 3.4.2 h604cdb4_1 libpng 1.6.37 h2a8f88b_0 libspatialindex 1.9.3 h6c2663c_0 libzlib 1.2.11 h8ffe710_1014 conda-forge markupsafe 2.1.1 py310he2412df_1 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mccabe 0.6.1 py310haa95532_1 mistune 0.8.4 py310h2bbff1b_1000 mypy_extensions 0.4.3 py310haa95532_1 nbclient 0.6.0 pyhd8ed1ab_0 conda-forge nbconvert 6.5.0 pyhd8ed1ab_0 conda-forge nbconvert-core 6.5.0 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 6.5.0 pyhd8ed1ab_0 conda-forge nbformat 5.3.0 py310haa95532_0 nest-asyncio 1.5.5 py310haa95532_0 networkx 2.8 pypi_0 pypi numpy 1.22.3 pypi_0 pypi numpydoc 1.2.1 pyhd8ed1ab_0 conda-forge opencv-python 4.5.5.64 pypi_0 pypi openssl 1.1.1n h2bbff1b_0 packaging 21.3 pyhd3eb1b0_0 pandoc 2.18 h57928b3_0 conda-forge pandocfilters 1.5.0 pyhd3eb1b0_0 paramiko 2.10.3 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd3eb1b0_0 pathspec 0.9.0 pyhd8ed1ab_0 conda-forge pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.1.0 pypi_0 pypi pip 22.0.4 pyhd8ed1ab_0 conda-forge platformdirs 2.5.1 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 py310haa95532_1 poyo 0.5.0 pyhd3eb1b0_0 prompt-toolkit 3.0.29 pyha770c72_0 conda-forge psutil 5.9.0 py310he2412df_1 conda-forge ptyprocess 0.7.0 pyhd3eb1b0_2 pycodestyle 2.8.0 pyhd3eb1b0_0 pycparser 2.21 pyhd3eb1b0_0 pydocstyle 6.1.1 pyhd3eb1b0_0 pyflakes 2.4.0 pyhd3eb1b0_0 pygments 2.11.2 pyhd3eb1b0_0 pylint 2.13.5 pyhd8ed1ab_0 conda-forge pyls-spyder 0.4.0 pyhd3eb1b0_0 pynacl 1.5.0 py310h4f637d6_1 conda-forge pyopenssl 22.0.0 pyhd3eb1b0_0 pyparsing 3.0.8 pyhd8ed1ab_0 conda-forge pyqt 5.12.3 py310h5588dad_8 conda-forge pyqt-impl 5.12.3 py310h8a704f9_8 conda-forge pyqt5-sip 4.19.18 py310h8a704f9_8 conda-forge pyqtchart 5.12 py310h8a704f9_8 conda-forge pyqtwebengine 5.12.1 py310h8a704f9_8 conda-forge pyrsistent 0.18.1 py310he2412df_1 conda-forge pysocks 1.7.1 py310haa95532_0 python 3.10.4 hbb2ffb3_0 python-dateutil 2.8.2 pyhd3eb1b0_0 python-fastjsonschema 2.15.3 pyhd8ed1ab_0 conda-forge python-lsp-black 1.2.1 pyhd8ed1ab_0 conda-forge python-lsp-jsonrpc 1.0.0 pyhd3eb1b0_0 python-lsp-server 1.4.1 pyhd8ed1ab_1 conda-forge python-slugify 6.1.1 pyhd8ed1ab_0 conda-forge python_abi 3.10 2_cp310 conda-forge pytz 2022.1 pyhd8ed1ab_0 conda-forge pywavelets 1.3.0 pypi_0 pypi pywin32 303 py310he2412df_0 conda-forge pywin32-ctypes 0.2.0 py310haa95532_1000 pyyaml 6.0 py310h2bbff1b_0 pyzmq 22.3.0 py310hd77b12b_2 qdarkstyle 3.0.3 pyhd8ed1ab_0 conda-forge qstylizer 0.2.1 pyhd8ed1ab_0 conda-forge qt 5.12.9 h556501e_6 conda-forge qtawesome 1.1.1 pyhd8ed1ab_0 conda-forge qtconsole 5.3.0 pyhd3eb1b0_0 qtpy 2.0.1 pyhd3eb1b0_0 requests 2.27.1 pyhd3eb1b0_0 rope 1.0.0 pyhd8ed1ab_0 conda-forge rtree 1.0.0 py310h1cbd46b_1 conda-forge scikit-image 0.19.2 pypi_0 pypi scipy 1.8.0 pypi_0 pypi setuptools 62.1.0 py310h5588dad_0 conda-forge six 1.16.0 pyhd3eb1b0_1 snowballstemmer 2.2.0 pyhd3eb1b0_0 sortedcontainers 2.4.0 pyhd3eb1b0_0 soupsieve 2.3.1 pyhd3eb1b0_0 sphinx 4.5.0 pyh6c4a22f_0 conda-forge sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0 sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0 sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0 sphinxcontrib-serializinghtml 1.1.5 pyhd3eb1b0_0 spyder 5.3.0 py310h5588dad_0 conda-forge spyder-kernels 2.3.0 py310h5588dad_0 conda-forge sqlite 3.38.2 h2bbff1b_0 text-unidecode 1.3 pyhd3eb1b0_0 textdistance 4.2.2 pyhd8ed1ab_0 conda-forge three-merge 0.1.1 pyhd3eb1b0_0 tifffile 2022.4.8 pypi_0 pypi tinycss2 1.1.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h8ffe710_0 conda-forge toml 0.10.2 pyhd3eb1b0_0 tomli 2.0.1 pyhd8ed1ab_0 conda-forge torch 1.11.0 pypi_0 pypi torchvision 0.12.0 pypi_0 pypi tornado 6.1 py310h2bbff1b_0 traitlets 5.1.1 pyhd3eb1b0_0 typed-ast 1.5.2 py310he2412df_0 conda-forge typing_extensions 4.1.1 pyh06a4308_0 tzdata 2022a hda174b7_0 ucrt 10.0.20348.0 h57928b3_0 conda-forge ujson 5.2.0 py310h8a704f9_1 conda-forge unidecode 1.3.4 pyhd8ed1ab_0 conda-forge urllib3 1.26.9 pyhd8ed1ab_0 conda-forge vc 14.2 h21ff451_1 vs2015_runtime 14.29.30037 h902a5da_6 conda-forge watchdog 2.1.7 py310h5588dad_1 conda-forge wcwidth 0.2.5 pyhd3eb1b0_0 webencodings 0.5.1 py310haa95532_1 wheel 0.37.1 pyhd3eb1b0_0 win_inet_pton 1.1.0 py310haa95532_0 wrapt 1.14.0 py310he2412df_1 conda-forge xz 5.2.5 h62dcd97_0 yaml 0.2.5 he774522_0 yapf 0.32.0 pyhd8ed1ab_0 conda-forge zipp 3.8.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h8ffe710_1014 conda-forge

PrajjwalP commented 2 years ago

@rishisriv I'm facing the same problem. Did you find any solution?

rishisriv commented 2 years ago

There was a medium article on the implementation that helped

https://medium.com/towards-data-science/pytorch-scene-text-detection-and-recognition-by-craft-and-a-four-stage-network-ec814d39db05

On Tuesday, June 7, 2022, Prajjwal Patel @.***> wrote:

@rishisriv https://github.com/rishisriv I'm facing the same problem. Did you find any solution?

— Reply to this email directly, view it on GitHub https://github.com/clovaai/CRAFT-pytorch/issues/176#issuecomment-1148274093, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPVCFHREHNSXOFTZLXNI6DVN3XYHANCNFSM5TRI6UWA . You are receiving this because you were mentioned.Message ID: @.***>

zoldaten commented 2 years ago

craft_utils are in this package see the repo. pfff