YOLOv3 注释应该在调整大小之前完成吗?

Should YOLOv3 annotations be done before the resize?

我即将开始注释我的图像以训练 YOLOv3 模型。在开始之前,我想确保可以在原始图像上创建注释。在训练前调整图像大小后,注释会分别改变吗?或者我应该先调整所有图像的大小然后开始注释?

没关系!您不必担心图像大小。你可以用任何大小注释你的数据集,当你开始训练时,Yolo 会根据网络大小调整训练图像的大小,例如416x416, 608x608.

另请注意,在 原始回购 中,如果您在 cfg 文件中设置 random = 1,则网络大小每 10 次迭代更改一次。 random = 1 表示 Yolo 每 10 次迭代更改网络大小,通过在不同的分辨率上训练网络来提高精度很有用。

根据 Yolo 论文:

However, since our model only uses convolutional and pooling layers it can be resized on the fly. We want YOLOv2 to be robust to running on images of different sizes so we train this into the model. Instead of fixing the input image size we change the network every few iterations. Every 10 batches our network randomly chooses a new image dimension size. Since our model downsamples by a factor of 32, we pull from the following multiples of 32: {320, 352, ..., 608}. Thus the smallest option is 320 × 320 and the largest is 608 × 608. We resize the network to that dimension and continue training.

但是,如果您使用的是 AlexeyAB 的存储库,调整大小过程将不会保持宽高比 https://github.com/AlexeyAB/darknet/issues/232#issuecomment-336955485