MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / get_frame_indices

Function get_frame_indices

tools/preprocess/utils.py:159–165  ·  view source on GitHub ↗
(frame_num, video_fps, clip_length, train_fps)

Source from the content-addressed store, hash-verified

157
158
159def 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
168def get_face_bboxes(kp2ds, scale, image_shape):

Callers 2

__call__Method · 0.90
process_input_videoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected