-
Notifications
You must be signed in to change notification settings - Fork 96
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
输入尺寸和预测框大小 #9
Comments
您好,我尝试将输入尺寸从600修改为800,然后计算loss的代码报错 |
@SoulCoderCN 目前看来应该是需要手动调整的,只是我还没有找到相关联的地方在哪里 |
好像不需要手动调整,我刚刚用这个代码成功跑了VOC2007,而VOC2007中的图片尺寸并不是统一的。 |
@SoulCoderCN 请问下你的显存是多少呀,我之前运行的时候,600尺度的图片 一直是 cuda out of memory |
在config.py文件中设置 _C.TRAIN.BATCH_SIZE = 1,就不会溢出了 |
@SoulCoderCN 输入大小改变,会导致特征图大小发生改变,你需要对 fpn的输入特征图大小进行更改,也就是_C.MODEL.ANCHORS.FEATURE_MAPS 项, 其值为 第一项为 IMAGE_SIZE/ (2**3)向上取整,其后每项均/2 向上取整;你的报错 IndexError: The shape of the mask [1, 67995] at index 1 does not match the shape of the indexed tensor [1, 120087] at index 1 是因为,特征图大小发生改变,导致最终输出发生改变:原先(75^2+38^2+19^2+10^2+5^2x9 = 67995, 改为800后: (100^2+50^2+25^2+13^2+7^2x9 = 120087 俩者完全不匹配了 |
@yatengLG 感谢您的回复,我使用您的方法成功解决了这个问题! |
如果只是改变了输入尺寸的话,可以直接了当的 都/2。因为输入图片小了,目标尺寸也相应的缩小了同样的倍数。 |
@SoulCoderCN 这个项目由于不是论文复现,很多地方会有我自己代码的习惯,因此与原论文会有些许的差异。如果遇到什么问题,你可以继续问我 |
您好,你说的检测框尺寸/2,那就是将anchor_sizes都/2吗?像这样调整将图片尺寸/2,除了调整feature_map和anchor_size外,还有需要调整的吗?需不需要调整anchor.nums或anchor.radios? |
谢谢提供这个模型,由于我修改了FPN的结构,在训练的时候(8G的显存),输入尺寸为600时,总是出现CUDA out of memory,我想减小到输入尺寸为300,特征图(5层)应该变成 38、19、10、5、3,那么对应的预测框大小该如何设置?
The text was updated successfully, but these errors were encountered: