OlafenwaMoses/ImageAI

How to store store output or return output of video detection model

Open

Aperta il 26 giu 2019

Vedi su GitHub
 (11 commenti) (0 reazioni) (0 assegnatari)Python (8123 star) (2130 fork)batch import
help wanted

Descrizione

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 --------------")

Guida contributor