yolov5记录检测框中心坐标 最近用到yolov5进行目标检测并确定目标在图片中的位置,直接上代码: 第一步在detect.py中建立文件夹并对每张图片建立txt文件: location_center_dir = str(save_dir) + '/location_center' if not os.path.exists(location_center_dir): os.makedirs(location_center_dir) location_center_path