yolov5 获取漏检图片脚本
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