yolov7 face 人脸检测生json标注文件

yolov7 face 人脸检测生json标注文件

不同人脸个数,颜色不一样,第1个,2个,3个人脸颜色依次:绿,蓝,红

过滤小于30*30的人脸

import argparse
import json
import shutil
import time
from pathlib import Path

import os
import copy
import cv2
import numpy as np
import torch
import torch.backends.cudnn as cudnn
from numpy import random

from models.experimental import attempt_load
from utils.datasets import LoadStreams, LoadImages
from utils.general import check_img_size, check_requirements, check_imshow, non_max_suppression, apply_classifier, \
    scale_coords, xyxy2xywh, strip_optimizer, set_logging, increment_path, save_one_box
from utils.plots import colors, plot_one_box
from utils.torch_utils import select_device, load_classifier, time_synchronized

class MyEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, np.integer):
            return int(obj)
        elif isinstance(obj, np.floating):
         

你可能感兴趣的:(深度学习宝典,python,开发语言)