我的需求是只保留人(和没有人的副样本),抽样,其他忽略 import json import os import shutil import random def coco_to_yolo_bbox(image_width, image_height, bbox): """ Convert bbox from COCO format to YOLO format. COCO format: [top_left_x, top_left_y, width, height] YOLO format: [x_center, y_center, width, height] (normalized) """ x_tl, y_tl, width, height = bbox x_center = (x_tl + width / 2.0) / image_width y_center = (y_tl + […]
...
继续阅读
(4)