YOLO算法中mosaic数据增强中常用到的图像变换的方法
1.YOLOV5中使用了mosaic,具体代码如下:
def load_mosaic(self, index):
# loads images in a mosaic
labels4 = []
s = self.img_size
yc, xc = [int(random.uniform(-x, 2 * s + x)) for x in self.mosaic_border] # mosaic center x, y
indices = [index] + [s
原创
2021-05-26 00:10:28 ·
2009 阅读 ·
0 评论