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

Method __call__

tools/preprocess/ltx2.3_preprocess_data.py:172–193  ·  view source on GitHub ↗
(
        self,
        frames_rgb: List[np.ndarray],
        include_hands: bool = False,
        include_face: bool = False,
        bg_mode: str = "black",
    )

Source from the content-addressed store, hash-verified

170 logger.info(f"DWPose-ONNX initialized on {device}")
171
172 def __call__(
173 self,
174 frames_rgb: List[np.ndarray],
175 include_hands: bool = False,
176 include_face: bool = False,
177 bg_mode: str = "black",
178 ) -> List[np.ndarray]:
179 out = []
180 for idx, frame in enumerate(frames_rgb):
181 skeleton = self.detector(
182 frame,
183 include_hands=include_hands,
184 include_face=include_face,
185 bg_mode=bg_mode,
186 )
187 if skeleton.shape[:2] != frame.shape[:2]:
188 skeleton = cv2.resize(skeleton, (frame.shape[1], frame.shape[0]), interpolation=cv2.INTER_NEAREST)
189 out.append(skeleton)
190
191 if (idx + 1) % 50 == 0:
192 logger.info(f"DWPose: {idx + 1}/{len(frames_rgb)} frames")
193 return out
194
195
196def run_canny_edges(

Callers

nothing calls this directly

Calls 3

appendMethod · 0.80
infoMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected