def __init__(self, img_height, img_width):

		self.time = 1.0/20.0 #set to time duration between two consecutive frames
		self.tracked = []
		self.last = []
		self.tracking = []
		self.framecount=0
		self.frame_number=0

		self.model = hourglass_single.Hourglass()
		self.prev_frame = np.zeros((img_width, img_height))
    def __init__(self):

        self.time = 1 / 20  # set to time duration between two consecutive frames
        self.tracked = []
        self.last = []
        self.tracking = []

        self.framecount = 0
        self.frame_number = 0

        self.model = hourglass_single.Hourglass()
Ejemplo n.º 3
0
#cap.set(cv2.CAP_PROP_FPS, 30)
print("fps rate: ", cv2.CAP_PROP_FPS)

#fourcc = cv2.VideoWriter_fourcc(*'DIVX')
#out = cv2.VideoWriter('test_out_4.avi', fourcc, 15.0, (int(cap.get(3)), int(cap.get(4))))
	

#yolo = YOLOV3("cfg/yolo_2k_reanchored.cfg","weights/yolo_2k_reanchored_70000.weights","cfg/2k_aug.data")

count_line = [(650,400),(1000,500)]
sline_1_203 = [(1065,514),(524,366)]
sline_2_203 = [(1038,704),(151,406)]


a = analytics_rbc(count_line,sline_1_203,sline_2_203)
model = hourglass_single.Hourglass()

tracked = []
last = []
tracking = []

framecount = 0 
frame_number=0

while True:
	global tracked, last, tracking
	found = 0

	t = 45.0/900.0#25.0/497.0#10.0/191.0#7.0/125.0

	if frame_number==0: