From e29c830ec52efa0da1fdcf19547dab595a0405bf Mon Sep 17 00:00:00 2001 From: Fran Roldan Date: Wed, 14 Oct 2020 08:09:21 +0100 Subject: [PATCH] fix face_detector to avoid catching only first frame of video --- scripts/data_generator/face_detector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data_generator/face_detector.py b/scripts/data_generator/face_detector.py index 4f7e4600..19912df9 100755 --- a/scripts/data_generator/face_detector.py +++ b/scripts/data_generator/face_detector.py @@ -107,7 +107,7 @@ def read_channels(file_path): width = int(vmetadata['@width']) height = int(vmetadata['@height']) frame_rate = vmetadata['@avg_frame_rate'].split('/') - avg_fps = int(frame_rate[0]) / int(frame_rate[1]) + avg_fps = np.round(int(frame_rate[0]) / int(frame_rate[1])) duration = vmetadata['@duration'] duration_timestamp = vmetadata['@duration_ts'] print 'Video Metadata: width --> {}, height --> {}, Average FPS --> {},' \