Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否支持其他尺寸的图片输入而不用转化为DOTA类型1024*1024尺寸的图片? #237

Closed
hh123445 opened this issue Apr 19, 2022 · 10 comments

Comments

@hh123445
Copy link

hh123445 commented Apr 19, 2022

我的数据集图片尺寸是640 and 512,按照入门文档我利用tools/data/dota/split/img_split.py将其转化为了DOTA格式数据集,但是DOTA格式数据集图片尺寸是1024 and 1024的正方形,我的图片转化完只是左上角的一部分,其余部分都是填充像素,可以通过修改哪个文件支持640 and 512尺寸的输入图片吗?
此外,将640 and 512尺寸转化为1024*1024是否会影响检测的精度?我发现训练后的mAP只能达到60左右,我怀疑是不是填充的像素会干扰检测的结果。

@mm-assistant
Copy link

mm-assistant bot commented Apr 19, 2022

Please use English or English & Chinese for issues so that we could have broader discussion.

@yangxue0827
Copy link
Collaborator

parser.add_argument(
'--sizes',
nargs='+',
type=int,
default=[1024],
help='the sizes of sliding windows')
parser.add_argument(
'--gaps',
nargs='+',
type=int,
default=[512],
help='the steps of sliding widnows')

@hh123445
Copy link
Author

parser.add_argument(
'--sizes',
nargs='+',
type=int,
default=[1024],
help='the sizes of sliding windows')
parser.add_argument(
'--gaps',
nargs='+',
type=int,
default=[512],
help='the steps of sliding widnows')

--gaps参数代表的什么意思?因为我的图片不是正方形,应该如何修改才能符合宽为640,高为512的输入呢?

@yangxue0827
Copy link
Collaborator

Maybe your dataset doesn't need to be cropped, just like the HRSC2016 dataset.

@hh123445
Copy link
Author

我也是这么想的,如果不需要裁剪原来的数据集,我应当如何处理原有的数据集以适应mmrotate的训练数据集格式要求呢?是否有相关的介绍文档,我似乎没有找到,或者需要利用哪个文件进行转化呢?非常感谢您的回答!

@yangxue0827
Copy link
Collaborator

Refer to https://github.com/open-mmlab/mmrotate/tree/main/tools/data.
Convert your annotations to one of the dataset formats. Or you can write a dataloader based on your own annotations.

@zytx121
Copy link
Collaborator

zytx121 commented Apr 21, 2022

@hh123445
Copy link
Author

You can try https://github.com/ming71/toolbox/tree/master/converter/toDOTA

感谢你的答复!我解决了我的问题通过将tools/data/dota/split/split_configs/ss_trainval.json文件中的"sizes"设置为640,将"gaps"设置为512,将"no_padding"参数设置为true,这样就能保持原样了。
然而我训练的结果mAP没有得到提高仍然只能达到60左右,我还在寻找解决的方案。

@RS-Hong
Copy link

RS-Hong commented Aug 15, 2022

裁剪保持原样后,还需要做哪些设置可以使用这个尺度的数据集进行训练呢?你的所有数据都是640*512吗?

@hh123445
Copy link
Author

裁剪保持原样后,还需要做哪些设置可以使用这个尺度的数据集进行训练呢?你的所有数据都是640*512吗?

还需要将网络config文件中所有1024尺度全部修改为你对应的尺度,是的,我的所有数据集都是640*512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants