Mmdetection: ImportError: cannot import name 'init_dist' from 'mmdet.apis' (/home/**/Download/mmdetection/mmdet/apis/__init__.py)

Created on 24 Apr 2020  路  2Comments  路  Source: open-mmlab/mmdetection

Describe the bug
After the installation, i import mmdet from another Python script and it raise an ImportError like this.

ImportError: cannot import name 'init_dist' from 'mmdet.apis' (/home/**/Download/mmdetection/mmdet/apis/__init__.py)

Reproduction

  1. What command or script did you run?
from mmdet.apis import init_dist

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment infomation and paste it here.
TorchVision: 0.4.0a0
OpenCV: 4.2.0
MMCV: 0.4.4
MMDetection: 1.1.0+unknown
MMDetection Compiler: GCC 7.5
MMDetection CUDA Compiler: 10.0

Most helpful comment

The version you were using is quite old. You can change it to from mmcv.runner import init_dist.

All 2 comments

the extra info:
I clone the project https://github.com/hdjang/Feature-Selective-Anchor-Free-Module-for-Single-Shot-Object-Detection witch based on the mmdetection .
running the command: python /tools/test.py then appear the error.
Its very important for me. I really need your help

The version you were using is quite old. You can change it to from mmcv.runner import init_dist.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

happog picture happog  路  3Comments

fengxiuyaun picture fengxiuyaun  路  3Comments

namheegordonkim picture namheegordonkim  路  3Comments

dereyly picture dereyly  路  3Comments

tianxinhang picture tianxinhang  路  3Comments