cv2.imshow("4", img) retval, img = camera5.read() if retval: cv2.imshow("5", img) retval, img = camera6.read() if retval: cv2.imshow("6", img) cv2.waitKey(1) if findCamera: findCam() start_time = time.time() detector = VideoObjectDetection() defmodel() custom = detector.CustomObjects(boat=True) video_path = detector.detectCustomObjectsFromVideo(custom_objects=custom, input_file_path=os.path.join(execution_path, inVid), output_file_path=os.path.join(execution_path, "video_out") , per_frame_function=forFrame, save_detected_video=True, minimum_percentage_probability=10, log_progress=True) print(len(boatList)) print("--- %s seconds ---" % (time.time() - start_time))
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) test_simple.test_simple_inputs(video_path + pictureName + '.jpg', 'mono_1024x320', execution_path + '\\assets\\proccessed\\', False) average_time = datetime.now() - current + average_time current = datetime.now() #detections = detector.detectObjectsFromImage(input_image=os.path.join(video_path + pictureName + ".jpg"), output_image_path=os.path.join(execution_path + '\\assets\\proccessed',"new%d.jpg" % count)) detections = detector.detectCustomObjectsFromVideo( custom_objects=custom_objects, input_image=os.path.join(video_path + pictureName + ".jpg"), output_image_path=os.path.join(execution_path + '\\assets\\proccessed', "new%d.jpg" % count)) current = datetime.now() average_time = datetime.now() - current + average_time if (not count == 1): average_time /= 2 print('ETA is ' + str(average_time * amount_pictures)) numpy_Pic = numpy.load(execution_path + '\\assets\\proccessed\\' + pictureName + '_disp.npy') numpy_PicFlat = numpy.ones((numpy_Pic.size, 1)) nPicReal = imread(video_path + pictureName + '.jpg')