Get default hmr intrinsic, defined by how you trained. Args: num_frame (int, optional): num of frames. Defaults to 1. focal_length (int, optional): defined same as your training. Defaults to 1000. det_width (int, optional): the size you used to detect.
(num_frame=1,
focal_length=1000,
det_width=224,
det_height=224)
| 206 | |
| 207 | |
| 208 | def get_default_hmr_intrinsic(num_frame=1, |
| 209 | focal_length=1000, |
| 210 | det_width=224, |
| 211 | det_height=224) -> np.ndarray: |
| 212 | """Get default hmr intrinsic, defined by how you trained. |
| 213 | |
| 214 | Args: |
| 215 | num_frame (int, optional): num of frames. Defaults to 1. |
| 216 | focal_length (int, optional): defined same as your training. |
| 217 | Defaults to 1000. |
| 218 | det_width (int, optional): the size you used to detect. |
| 219 | Defaults to 224. |
| 220 | det_height (int, optional): the size you used to detect. |
| 221 | Defaults to 224. |
| 222 | |
| 223 | Returns: |
| 224 | np.ndarray: shape of (N, 3, 3) |
| 225 | """ |
| 226 | K = np.zeros((num_frame, 3, 3)) |
| 227 | K[:, 0, 0] = focal_length |
| 228 | K[:, 1, 1] = focal_length |
| 229 | K[:, 0, 2] = det_width / 2 |
| 230 | K[:, 1, 2] = det_height / 2 |
| 231 | K[:, 2, 2] = 1 |
| 232 | return K |
| 233 | |
| 234 | |
| 235 | def convert_kp2d_to_bbox( |
no outgoing calls
no test coverage detected