代码.doc


立即下载 喜欢一个人丶
2024-04-19
argvs self.fromfile '- i+1 False True fromfile tofile
40 KB

import numpy as np
import tensorflow as tf
import cv2
import time
import sys
class YOLO_TF:
fromfile = None
tofile_img = 'test/output.jpg'
tofile_txt = 'test/output.txt'
imshow = True
filewrite_img = False
filewrite_txt = False
disp_console = True
weights_file = 'weights/YOLO_tiny.ckpt'
alpha = 0.1
threshold = 0.2
iou_threshold = 0.5
num_class = 20
num_box = 2
grid_size = 7
classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train","tvmonitor"]
w_img = 640
h_img = 480
def __init__(self,argvs = []):
self.argv_parser(argvs)
self.build_networks()
if self.fromfile is not None: self.detect_from_file(self.fromfile)
def argv_parser(self,argvs):
for i in range(1,len(argvs),2):
if argvs[i] == '-fromfile' : self.fromfile = argvs[i+1]
if argvs[i] == '-tofile_img' : self.tofile_img = argvs[i+1] ; self.fi


argvs/ /self.fromfile/ /'-/i+1/False/True/fromfile/tofile_img/ argvs/ /self.fromfile/ /'-/i+1/False/True/fromfile/tofile_img/
-1 条回复
登录 后才能参与评论
-->