Spaces:
Running on Zero
Running on Zero
multimodalart HF Staff
Learn2Splat ZeroGPU demo: app, vendored optgs, prebuilt sm_120 wheels
9196862 verified Download pycolmap/image.py from hugging-apps/learn2splat: direct link, hf CLI and curl.
- Browser
- Download file 944 Bytes
-
https://huggingface.co/spaces/hugging-apps/learn2splat/resolve/main/pycolmap/image.py
- Command line
-
hf download hf://spaces/hugging-apps/learn2splat/pycolmap/image.py
-
curl -L -o image.py https://huggingface.co/spaces/hugging-apps/learn2splat/resolve/main/pycolmap/image.py
944 Bytes
| # Author: True Price <jtprice at cs.unc.edu> | |
| import numpy as np | |
| #------------------------------------------------------------------------------- | |
| # | |
| # Image | |
| # | |
| #------------------------------------------------------------------------------- | |
| class Image: | |
| def __init__(self, name_, camera_id_, q_, tvec_): | |
| self.name = name_ | |
| self.camera_id = camera_id_ | |
| self.q = q_ | |
| self.tvec = tvec_ | |
| self.points2D = np.empty((0, 2), dtype=np.float64) | |
| self.point3D_ids = np.empty((0,), dtype=np.uint64) | |
| #--------------------------------------------------------------------------- | |
| def R(self): | |
| return self.q.ToR() | |
| #--------------------------------------------------------------------------- | |
| def C(self): | |
| return -self.R().T.dot(self.tvec) | |
| #--------------------------------------------------------------------------- | |
| def t(self): | |
| return self.tvec | |