yolov5 获取漏检图片脚本

2023-12-14 09:28:13

yolov5 获取漏检图片脚本

获取样本分数在0.05到0.38直接的样本。

# YOLOv5 by Ultralytics, GPL-3.0 license

import argparse
import json
import os
import sys
import time
from pathlib import Path

import cv2
import numpy as np
import torch
import torch.backends.cudnn as cudnn

from mask_class import Mask50_Cls
from models.Pelee_v2_new import Pelee_Class
from models.vovnet import VoVnet_Similar
from validate_img import Resnet50_Cls

FILE = Path(__file__).resolve()
ROOT = FILE.parents[0]  # YOLOv5 root directory
if str(ROOT) not in sys.path:
    sys.path.append(str(ROOT))  # add ROOT to PATH
ROOT = Path(os.path.relpath(ROOT, Path.cwd()))  # relative

from models.common import DetectMultiBackend
from utils.datasets import IMG_FORMATS, VID_FORMATS, LoadImages, LoadStreams
from utils.general import (LOGGER, check_file, check_img_size, check_imshow, check_requirements, colorstr,
                           increment_path, non_max_suppression, print_args, sc

文章来源:https://blog.csdn.net/jacke121/article/details/134844484
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。