WoojuLee24 / OA-DG

Object-Aware Domain Generalization for Object Detection
GNU General Public License v3.0
44 stars 7 forks source link

运行错误 #4

Closed fang-lg closed 5 months ago

fang-lg commented 6 months ago

Traceback (most recent call last): File "/home/ailab/HDD/fl/ws/external/tools/train.py", line 227, in main() File "/home/ailab/HDD/fl/ws/external/tools/train.py", line 98, in main cfg = Config.fromfile(args.config) File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 337, in fromfile cfg_dict, cfg_text = Config._file2dict(filename, File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 267, in _file2dict base_cfg_dict = Config._merge_a_into_b(cfg_dict, base_cfg_dict) File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 326, in _merge_a_into_b b[k] = Config._merge_a_into_b(v, b[k], allow_list_keys) File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 326, in _merge_a_into_b b[k] = Config._merge_a_into_b(v, b[k], allow_list_keys) File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 320, in _merge_a_into_b raise TypeError( TypeError: init_cfg={'type': 'Pretrained', 'checkpoint': 'open-mmlab://detectron2/resnet101_caffe'} in child config cannot inherit from base because init_cfg is a dict in the child config but is of type <class 'NoneType'> in base config. You may set _delete_=True to ignore the base config.

WoojuLee24 commented 6 months ago
  1. Your error log seems to be caused by the mmcv and mmdetection module. Check the issue of https://github.com/WoojuLee24/OA-DG/issues/3#issuecomment-2044022326
  2. Please provide more details in your question; Specify which config file you used and what commands you executed.
fang-lg commented 6 months ago
  1. Your error log seems to be caused by the mmcv and mmdetection module. Check the issue of FormatCode() got an unexpected keyword argument 'verify' #3 (comment)
  2. Please provide more details in your question; Specify which config file you used and what commands you executed.

run: python3 -u tools/train.py configs/OA-DG/dwd/faster_rcnn_r101_dc5_1x_dwd_oadg.py --work-dir /out

yapf==0.40.2,mmcv-full==1.5.0

WoojuLee24 commented 6 months ago

We are currently using yapf==0.32.0 and mmcv-full==1.5.0. The attached file lists all our installed packages. We will organize and upload the requirements file later. requiremets_oa-dg.txt

fang-lg commented 6 months ago

We are currently using yapf==0.32.0 and mmcv-full==1.5.0. The attached file lists all our installed packages. We will organize and upload the requirements file later. requiremets_oa-dg.txt

上述问题已经解决,目前已经训练成功了。但是验证的时候报以下错误 Traceback (most recent call last): File "/home/ailab/HDD/fl/ws/external/tools/test_dwd.py", line 258, in main() File "/home/ailab/HDD/fl/ws/external/tools/test_dwd.py", line 196, in main datasets = build_dataset(cfg.data.test) File "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmdet/datasets/builder.py", line 63, in build_dataset dataset = ConcatDataset([build_dataset(c, default_args) for c in cfg]) File "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmdet/datasets/builder.py", line 63, in dataset = ConcatDataset([build_dataset(c, default_args) for c in cfg]) File "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmdet/datasets/builder.py", line 80, in build_dataset dataset = _concat_dataset(cfg, default_args) File "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmdet/datasets/builder.py", line 54, in _concat_dataset datasets.append(build_dataset(data_cfg, default_args)) File "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmdet/datasets/builder.py", line 82, in build_dataset dataset = build_from_cfg(cfg, DATASETS, default_args) File "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmcv/utils/registry.py", line 44, in build_from_cfg raise KeyError( KeyError: 'SdgodDataset is not in the dataset registry' 训练的时候是可以正常使用的。

WoojuLee24 commented 6 months ago

The error seems to occur when the dataset_type is not specified in 'configs/base/datasets/s-dgod.py'. Currently, dataset_type is set to SdgodDataset.

fang-lg commented 6 months ago

The error seems to occur when the dataset_type is not specified in 'configs/base/datasets/s-dgod.py'. Currently, dataset_type is set to SdgodDataset.

image 已经正确设置了

WoojuLee24 commented 6 months ago

We run OA-DG directly from the source code. But it seems that you run the code from the library. How about running OA-DG directly from the source code?

fang-lg commented 6 months ago

We run OA-DG directly from the source code. But it seems that you run the code from the library. How about running OA-DG directly from the source code?

我是直接在程序中运行的,他这个从源码中加载还是从依赖中加载如何区分?

WoojuLee24 commented 6 months ago

Error log indicates that build_dataset is run in the "/home/ailab/miniconda3/envs/oadg/lib/python3.9/site-packages/mmdet/datasets/builder.py". So, you are running the code from the library.