当前位置:网站首页>yolov5检测数据集标签数量

yolov5检测数据集标签数量

2022-08-09 07:30:00 qq_52217283

为了检测转换是否有漏的,或者识别有漏的,加了每个标注小于数量的检测

# -*- coding:utf8 -*-
import os


def 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 result


if __name__ == '__main__':
    path = r"D:\Downloads\yolov5-6.1\runs\detect\exp2\labels"
    print(get_txt_list(path, 7))

原网站

版权声明
本文为[qq_52217283]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_52217283/article/details/126131104