MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / _find_source_video_path

Method _find_source_video_path

mbench/__init__.py:120–132  ·  view source on GitHub ↗

Locate an already rendered video for a given category/id.

(self, evaluation_path: str, category: str, motion_id: int)

Source from the content-addressed store, hash-verified

118 return None
119
120 def _find_source_video_path(self, evaluation_path: str, category: str, motion_id: int) -> Optional[Path]:
121 """Locate an already rendered video for a given category/id."""
122 evaluation_path = Path(evaluation_path)
123 category_dir = self.category_dir_map.get(category)
124 if category_dir:
125 video_candidate = evaluation_path / category_dir / str(motion_id) / "motion.mp4"
126 if video_candidate.exists():
127 return video_candidate
128
129 for candidate in self._video_candidates(evaluation_path, motion_id):
130 if candidate.exists():
131 return candidate
132 return None
133
134 def _load_motion_array(self, motion_file: Path):
135 """Load motion data from a supported file into a numpy array."""

Callers 2

build_full_info_jsonMethod · 0.95

Calls 1

_video_candidatesMethod · 0.95

Tested by

no test coverage detected