Skip to content

ImportError: cannot import name numpy_type_map #15

@Shuntw6096

Description

@Shuntw6096

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions