To export the model trained on the custom dataset to onnx, I created a new conda virtual environment and installed the library.
I am getting the following error while creating onnx model:
tools/deployment/pytorch2onnx.py:283: UserWarning: Arguments like --mean, --std, --dataset would be parsed directly from config file and are deprecated and will be removed in future releases.
warnings.warn('Arguments like --mean, --std, --dataset would be \
Traceback (most recent call last):
File "tools/deployment/pytorch2onnx.py", line 295, in
cfg = Config.fromfile(args.config)
File "/root/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/utils/config.py", line 331, in fromfile
cfg_dict, cfg_text = Config._file2dict(filename,
File "/root/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/utils/config.py", line 248, in _file2dict
_cfg_dict, _cfg_text = Config._file2dict(osp.join(cfg_dir, f))
File "/root/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/utils/config.py", line 206, in _file2dict
mod = import_module(temp_module_name)
File "/root/anaconda3/envs/openmmlab/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/tmp/tmpiiacxlkk/tmp3391dyu0.py", line 2, in AttributeError: module 'mmdet' has no attribute 'datasets'
Exception ignored in: <function _TemporaryFileCloser.del at 0x7f51fa0daa60>
Traceback (most recent call last):
File "/root/anaconda3/envs/openmmlab/lib/python3.8/tempfile.py", line 440, in del
self.close()
File "/root/anaconda3/envs/openmmlab/lib/python3.8/tempfile.py", line 436, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpiiacxlkk/tmp3391dyu0.py'
To export the model trained on the custom dataset to onnx, I created a new conda virtual environment and installed the library. I am getting the following error while creating onnx model:
I configured the virtual environment by referring to the tutorial.
The libraries installed to configure the virtual environment are:
I installed mmcv and mmdet by referring to the URL below, but datasets cannot be found. https://github.com/Sense-X/Co-DETR/blob/main/docs/en/faq.md