(self, scene: str, frame_id: int)
| 87 | return list(range(len(data['rgb_files']))) |
| 88 | |
| 89 | def load_frame_data(self, scene: str, frame_id: int) -> Dict[str, Any]: |
| 90 | data = self._load_scene_data(scene) |
| 91 | rgb_path = data['rgb_files'][frame_id] |
| 92 | rgb = np.array(Image.open(rgb_path).convert('RGB'), dtype=np.uint8) |
| 93 | |
| 94 | pose = data['poses_by_frame'].get(frame_id) |
| 95 | intrinsics = data['intrinsics'].copy() |
| 96 | |
| 97 | if self.target_size is not None: |
| 98 | rgb, intrinsics = self._cover_fit_center_crop(rgb, intrinsics) |
| 99 | |
| 100 | return { |
| 101 | 'rgb': rgb, |
| 102 | 'pose': pose, |
| 103 | 'intrinsics': intrinsics, |
| 104 | } |
| 105 | |
| 106 | def _cover_fit_center_crop( |
| 107 | self, rgb: np.ndarray, intrinsics: np.ndarray |
nothing calls this directly
no test coverage detected