当前位置:网站首页>yolov5 detects the number of labels in the dataset

yolov5 detects the number of labels in the dataset

2022-08-09 07:32:00 qq_52217283

In order to detect whether there is a leak in the conversion, or to identify the leak, a detection of less than the number of each label is added

# -*- coding:utf8 -*-import osdef get_txt_list(path_, max_):result = []for files in os.listdir(path_):# print(files)with open(path_ + "\\" + files, "r") as f:length = f.read().split("\n")if len(length) <= max_:result.append(files)return resultif __name__ == '__main__':path = r"D:\Downloads\yolov5-6.1\runs\detect\exp2\labels"print(get_txt_list(path, 7))

原网站

版权声明
本文为[qq_52217283]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208090729485644.html