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

ImportError: cannot import name numpy_type_map #15

Open
Shuntw6096 opened this issue Feb 4, 2021 · 2 comments
Open

ImportError: cannot import name numpy_type_map #15

Shuntw6096 opened this issue Feb 4, 2021 · 2 comments
Labels
help wanted Extra attention is needed wontfix This will not be worked on

Comments

@Shuntw6096
Copy link

Shuntw6096 commented Feb 4, 2021

Hi, Automatic adaptation of object detectors to new domains using self-training is a nice work, but when I run gypsum/scripts/demo/hp_cons_demo.sh use bdd_HP-cons_model_step29999.pth.pth and occur

Traceback (most recent call last):
  File "tools/infer_demo.py", line 35, in <module>
    import nn as mynn
  File "/content/detectron-self-train/lib/nn/__init__.py", line 2, in <module>
    from .parallel import DataParallel
  File "/content/detectron-self-train/lib/nn/parallel/__init__.py", line 3, in <module>
    from .data_parallel import DataParallel, data_parallel
  File "/content/detectron-self-train/lib/nn/parallel/data_parallel.py", line 4, in <module>
    from .scatter_gather import scatter_kwargs, gather
  File "/content/detectron-self-train/lib/nn/parallel/scatter_gather.py", line 8, in <module>
    from torch.utils.data.dataloader import numpy_type_map
ImportError: cannot import name numpy_type_map

System information

  • Operating system: Ubuntu 18.04.5 LTS
  • CUDA version: 10.1
  • python version: 3.6.9
  • pytorch version: 1.7.0+cu101
  • torchvision version: 0.8.1+cu101

and it does not seem to support torch >= 1.1.0 and I also find some issues.

detectron2 supports pytorch 1.3.0 and above, and cuda 10.1 only supports pytorch 1.4 and above.
Is it possible to move to detectron2?

Thanks

@AruniRC AruniRC added help wanted Extra attention is needed wontfix This will not be worked on labels Feb 5, 2021
@AruniRC
Copy link
Owner

AruniRC commented Feb 5, 2021

Hi,

thanks for your interest in this work. This repo is no longer being actively maintained and porting this to detectron2 is not immediately a priority for us. Sorry for the inconvenience. Can you try using the older versions of pytorch and numpy in a conda environment?

@Shuntw6096
Copy link
Author

Shuntw6096 commented Feb 5, 2021

Hi,
I find a another version of Detectron also implemented in pytorch but version of pytorch is 1.1.0 , and it support CUDA10.0.
I use its lib to replace original one, and run gypsum/scripts/demo/hp_cons_demo.sh but will modify yaml file, and it works.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants