(frame_num, video_fps, clip_length, train_fps)
| 157 | |
| 158 | |
| 159 | def get_frame_indices(frame_num, video_fps, clip_length, train_fps): |
| 160 | start_frame = 0 |
| 161 | times = np.arange(0, clip_length) / train_fps |
| 162 | frame_indices = start_frame + np.round(times * video_fps).astype(int) |
| 163 | frame_indices = np.clip(frame_indices, 0, frame_num - 1) |
| 164 | |
| 165 | return frame_indices.tolist() |
| 166 | |
| 167 | |
| 168 | def get_face_bboxes(kp2ds, scale, image_shape): |
no outgoing calls
no test coverage detected