How to store store output or return output of video detection model
#233 opened on Jun 26, 2019
Description
I have 100 of videos, I want run in batch and store result of each video (custom detected object) in a variable or file so that I can make later decision through further code( Like if person detcted then do this ). I am not able to understand that how to store data. For frame function only prints the data in console . I want to store result for each video
my code is below. Helpe me write to a text file or store into video_path vriable for each video
video_path=detector.detectCustomObjectsFromVideo(input_file_path=os.path.join(execution_path, "test.mp4"), save_detected_video=False,log_progress=False,
detection_timeout=1,per_frame_function=forFrame,return_detected_frame=True)
def forFrame(output_count,frame_number,output_array,returned_frame): print("FOR FRAME " , frame_number) print("Output for each object : ", output_array) print("Output count for unique objects : ", output_count) print("------------END OF A FRAME --------------")