mmrotate icon indicating copy to clipboard operation
mmrotate copied to clipboard

[Bug] Error while loading HRSC dataset

Open GluttonK opened this issue 1 year ago • 5 comments

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

master branch https://github.com/open-mmlab/mmrotate

Environment

mmcv-full 1.7.1 mmdet 2.28.2

Reproduces the problem - code sample

mmrotate/datasets/hrsc.py row98 xml_path = osp.join(self.img_prefix, self.ann_subdir, f'{img_id}.xml') Connecting img_prefix and ann_subdir resulted in a path not being found

Reproduces the problem - command or script

python tools/train.py configs/s2anet/s2anet_r50_fpn_3x_hrsc_le135.py --gpus 1 --work-dir work_dirs

Reproduces the problem - error message

FileNotFoundError: [Errno 2] No such file or directory: 'data/hrsc/FullDataSet/AllImages/data/hrsc/FullDataSet/Annotations/100000001.xml'

Additional information

mmrotate/datasets/hrsc.py row98 xml_path = osp.join(self.img_prefix, self.ann_subdir, f'{img_id}.xml') Connecting img_prefix and ann_subdir resulted in a path not being found

GluttonK avatar Jun 15 '23 11:06 GluttonK

你看下 ‘data/hrsc/FullDataSet/AllImages/data/hrsc/FullDataSet/Annotations/100000001.xml’ 是否有这个文件,然后根据错误修改配置文件就可以了。

jsxyhelu avatar Sep 03 '23 13:09 jsxyhelu

请问有解决方案了吗

ZJM-2000 avatar Dec 05 '23 10:12 ZJM-2000

我也出现这样的问题,感觉像把路径img_prefix和ann_subdir加到了一起,请问有解决方案吗

Joey-He avatar Mar 11 '24 08:03 Joey-He

我删去了一行之后显示ValueError: need at least one array to concatenate

exesit avatar Apr 20 '24 08:04 exesit