ModelTC / United-Perception

United Perception
Apache License 2.0
426 stars 65 forks source link

(Resolved!!!) No module named 'petrel_client' init petrel failed No module named 'spring_aux' ImportError: cannot import name 'gpu_iou_overlap' from 'up.extensions'. #50

Closed TheWangYang closed 1 year ago

TheWangYang commented 1 year ago

The following error occurs when the environment is configured and the following command is executed (the same error occurs on both Windows and Linux platforms) :

sh scripts/dist_train.sh 2 configs/cls/resnet/resnet18.yaml

No module named 'petrel_client'
init petrel failed
No module named 'spring_aux'

2022-11-28 00:53:13,270-rk0-normalize.py#38:import error No module named 'mqbench'; If you need Mqbench to quantize model,      you should add Mqbench to this project. Or just ignore this error.
2022-11-28 00:53:13,270-rk0-normalize.py#45:import error No module named 'msbench'; If you need Msbench to prune model,     you should add Msbench to this project. Or just ignore this error.

Traceback (most recent call last):
File "D:\anaconda3\envs\python37\lib\runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "D:\anaconda3\envs\python37\lib\runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "D:\anaconda3\envs\python37\lib\runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "D:\pycharm_work_place\United-Perception\up\__init__.py", line 26, in <module></module>
from .tasks import *
File "D:\pycharm_work_place\United-Perception\up\tasks\__init__.py", line 24, in <module></module>
globals()[fp] = importlib.import_module('.' + fp, __package__)
File "D:\anaconda3\envs\python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\pycharm_work_place\United-Perception\up\tasks\det\__init__.py", line 2, in <module></module>
from .models import * # noqa
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\__init__.py", line 1, in <module></module>
from .heads import * # noqa
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\heads\__init__.py", line 2, in <module></module>
from .bbox_head import *  # noqa
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\heads\bbox_head\__init__.py", line 1, in <module></module>
from .bbox_head import * # noqa
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\heads\bbox_head\bbox_head.py", line 6, in <module></module>
from up.tasks.det.models.utils.assigner import map_rois_to_level
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\utils\__init__.py", line 3, in <module></module>
from .matcher import * # noqa
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\utils\matcher.py", line 6, in <module></module>
from up.tasks.det.models.utils.bbox_helper import offset2bbox
File "D:\pycharm_work_place\United-Perception\up\tasks\det\models\utils\bbox_helper.py", line 10, in <module></module>
from up.extensions import gpu_iou_overlap

ImportError:  cannot import name 'gpu_iou_overlap' from 'up.extensions'  (D:\pycharm_work_place\United-Perception\up\extensions\__init__.py)

Why can't the module be imported? What should I do? I hope the kind people can help me solve the problem, I will be grateful!

yqyao commented 1 year ago

1、Maybe you need to compile it or export DEFAULT_TASKS=cls, following this https://github.com/ModelTC/AAAI2023_EAMPD/blob/main/train.md @TheWangYang

TheWangYang commented 1 year ago

1、Maybe you need to compile it or export DEFAULT_TASKS=cls, following this https://github.com/ModelTC/AAAI2023_EAMPD/blob/main/train.md @TheWangYang

According to the solution you mentioned, I have successfully run the training script by referring to the train.md document in the link. Thank you very much! @yqyao