MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / custom_meshgrid

Function custom_meshgrid

wan/data/utils.py:218–225  ·  view source on GitHub ↗

Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py

(*args)

Source from the content-addressed store, hash-verified

216 self.c2w_mat = np.linalg.inv(w2c_mat_4x4)
217
218def custom_meshgrid(*args):
219 """Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py
220 """
221 # ref: https://pytorch.org/docs/stable/generated/torch.meshgrid.html?highlight=meshgrid#torch.meshgrid
222 if pver.parse(torch.__version__) < pver.parse('1.10'):
223 return torch.meshgrid(*args)
224 else:
225 return torch.meshgrid(*args, indexing='ij')
226
227def get_relative_pose(cam_params):
228 """Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py

Callers 1

ray_conditionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected