MCPcopy Create free account
hub / github.com/DNA-Rendering/DNA-Rendering / get_Keypoints3d

Method get_Keypoints3d

scripts/3DGS/SMCReader.py:322–347  ·  view source on GitHub ↗

Get keypoint3D Frame_id, TODO coordinate Args: Frame_id a.(int/str of a number): '0' ~ 'num_frame-1'('149') b.list of numbers (int/str) c.None: get batch of all imgs in order of time sequence Returns: Keypoints3d te

(self, Frame_id=None)

Source from the content-addressed store, hash-verified

320
321 ###Keypoints3d
322 def get_Keypoints3d(self, Frame_id=None):
323 """Get keypoint3D Frame_id, TODO coordinate
324
325 Args:
326 Frame_id a.(int/str of a number): '0' ~ 'num_frame-1'('149')
327 b.list of numbers (int/str)
328 c.None: get batch of all imgs in order of time sequence
329 Returns:
330 Keypoints3d tensor: np.ndarray of shape ([N], ,3)
331 """
332 if not 'Keypoints_3D' in self.smc:
333 print("=== no key: Keypoints_3D.\nplease check available keys!")
334 return None
335
336 if isinstance(Frame_id, (str,int)):
337 Frame_id = int(Frame_id)
338 return self.smc['Keypoints_3D']["keypoints3d"][Frame_id,:]
339 else:
340 if Frame_id is None:
341 return self.smc['Keypoints_3D']["keypoints3d"]
342 elif isinstance(Frame_id, list):
343 Frame_id_list = Frame_id
344 rs = []
345 for fi in tqdm.tqdm(Frame_id_list):
346 rs.append(self.get_Keypoints3d(fi))
347 return np.stack(rs,axis=0)
348
349 ###SMPLx
350 def get_SMPLx(self, Frame_id=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected