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

Method __init__

wan/data/utils.py:206–216  ·  view source on GitHub ↗
(self, entry)

Source from the content-addressed store, hash-verified

204 """Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py
205 """
206 def __init__(self, entry):
207 fx, fy, cx, cy = entry[1:5]
208 self.fx = fx
209 self.fy = fy
210 self.cx = cx
211 self.cy = cy
212 w2c_mat = np.array(entry[7:]).reshape(3, 4)
213 w2c_mat_4x4 = np.eye(4)
214 w2c_mat_4x4[:3, :] = w2c_mat
215 self.w2c_mat = w2c_mat_4x4
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected