Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detectron2 ImportError #3

Open
julian-voss opened this issue May 19, 2021 · 0 comments
Open

Detectron2 ImportError #3

julian-voss opened this issue May 19, 2021 · 0 comments

Comments

@julian-voss
Copy link

julian-voss commented May 19, 2021

Thank you very much for this great project.

After following along the usage instructions I ran into a Detectron2 ImportError error when trying to initialize the model backend server:

\~\Desktop\repos\Detectron2_AL>label-studio-ml init labeling/backend_model --script\annotating/backend_model.py --force
Traceback (most recent call last):
  File "\AppData\Local\Continuum\anaconda3\envs\labelenv\Scripts\label-studio-ml-script.py", line 33, in <module>
    sys.exit(load_entry_point('label-studio', 'console_scripts', 'label-studio-ml')())
  File "\desktop\repos\detectron2_al\src\label-studio\label_studio\ml\server.py", line 103, in main
    create_dir(args)
  File "\desktop\repos\detectron2_al\src\label-studio\label_studio\ml\server.py", line 64, in create_dir
    model_classes = get_all_classes_inherited_LabelStudioMLBase(script_path)
  File "\desktop\repos\detectron2_al\src\label-studio\label_studio\ml\utils.py", line 15, in get_all_classes_inherited_LabelStudioMLBase
    module = importlib.import_module(module_name)
  File "\AppData\Local\Continuum\anaconda3\envs\labelenv\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "~\Desktop\repos\Detectron2_AL\annotating\backend_model.py", line 24, in <module>
    from detectron2_al.engine.al_engine import ActiveLearningPredictor
  File "./src\detectron2_al\engine\__init__.py", line 1, in <module>
    from .al_engine import *
  File "./src\detectron2_al\engine\al_engine.py", line 13, in <module>
    from detectron2.evaluation import verify_results
  File "\desktop\repos\detectron2-0.1.1\detectron2\evaluation\__init__.py", line 2, in <module>
    from .cityscapes_evaluation import CityscapesEvaluator
  File "\desktop\repos\detectron2-0.1.1\detectron2\evaluation\cityscapes_evaluation.py", line 10, in <module>
    from detectron2.data import MetadataCatalog
  File "\desktop\repos\detectron2-0.1.1\detectron2\data\__init__.py", line 4, in <module>
    from .build import (
  File "\desktop\repos\detectron2-0.1.1\detectron2\data\build.py", line 14, in <module>
    from detectron2.structures import BoxMode
  File "\desktop\repos\detectron2-0.1.1\detectron2\structures\__init__.py", line 2, in <module>
    from .boxes import Boxes, BoxMode, pairwise_iou
  File "\desktop\repos\detectron2-0.1.1\detectron2\structures\boxes.py", line 8, in <module>
    from detectron2.layers import cat
  File "\desktop\repos\detectron2-0.1.1\detectron2\layers\__init__.py", line 3, in <module>
    from .deform_conv import DeformConv, ModulatedDeformConv
  File "\desktop\repos\detectron2-0.1.1\detectron2\layers\deform_conv.py", line 10, in <module>
    from detectron2 import _C
ImportError: DLL load failed while importing _C: The specified module could not be found

I'm using Windows 10. In order to install detectron2 I have download the files from this source and made the required changes proposed by this tutorial before installing the library.

Do you have an idea on what could cause this issue? Any help would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant