[已修复,Roboflow 导出 CoCo 数据集错误]YoloV5 将图像裁剪成具有重叠的图块(图像 + bbox)

[FIXED, Roboflow exported CoCo Dataset mistake]YoloV5 cropping image into tiles with overlap (image + bbox)

我有 4928x3280 的图像,我想将它们裁剪成具有一定重叠百分比的 640x640 的图块。问题是我不知道如何处理我的数据集中这些文件的边界框,因为我已经找到了这篇论文,(http://openaccess.thecvf.com/content_CVPRW_2019/papers/UAVision/Unel_The_Power_of_Tiling_for_Small_Object_Detection_CVPRW_2019_paper.pdf), but not code or so referring to how they did this. There are some examples on the internet that actually have the yoloV5 tiling but without overlap like this(https://github.com/slanj/yolo-tiling) one.

有谁知道我如何自己制作这个或者是否有人为我提供了这个示例?

如果您想要一个现成的库来为 yolov5 进行平铺和推理,可以使用 SAHI:

您可以使用它来创建带有相关注释的图块、进行推理和评估模型性能。