""" #frame_resize = mx.nd.array(cv2.resize(frame, (self.data_shape[0], self.data_shape[1]))) #frame_resize = mx.img.imresize(frame, self.data_shape[0], self.data_shape[1], cv2.INTER_LINEAR) # Change dimensions from (w,h,channels) to (channels, w, h) #frame_t = mx.nd.transpose(frame_resize, axes=(2,0,1)) #frame_norm = frame_t - self.mean_pixels_nd print(y_gen[0].asnumpy().shape) """ print(y_gen[0].asnumpy().flatten()[:20]) result = Detector.filter_positive_detections(y_gen[0].asnumpy()) for k, det in enumerate(result): #img = cv2.imread(im_list[k]) #img = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) visualize_detection(frame, det, classes, 0.6) end = time.time() #print(time.process_time() - start)