Comments (4)
How to modify the parameter t?
def get_cos_sin(self, D, seq_len, device, dtype): if (D,seq_len,device,dtype) not in self.cache: inv_freq = 1.0 / (self.base ** (torch.arange(0, D, 2).float().to(device) / D)) t = torch.arange(seq_len, device=device, dtype=inv_freq.dtype) freqs = torch.einsum("i,j->ij", t, inv_freq).to(dtype) freqs = torch.cat((freqs, freqs), dim=-1) cos = freqs.cos() # (Seq, Dim) sin = freqs.sin() self.cache[D,seq_len,device,dtype] = (cos,sin) return self.cache[D,seq_len,device,dtype]
if you're going from 512 to 1024, you would do:
t = torch.arange(seq_len, device=device, dtype=inv_freq.dtype) * (512/1024)
from dust3r.
Another resolution (1536 x 1152) was tested with multiplication factor of (512/1536) for t with appropriate results. So far this works well for objects that have "good number" of features.
from dust3r.
How to modify the parameter t?
def get_cos_sin(self, D, seq_len, device, dtype):
if (D,seq_len,device,dtype) not in self.cache:
inv_freq = 1.0 / (self.base ** (torch.arange(0, D, 2).float().to(device) / D))
t = torch.arange(seq_len, device=device, dtype=inv_freq.dtype)
freqs = torch.einsum("i,j->ij", t, inv_freq).to(dtype)
freqs = torch.cat((freqs, freqs), dim=-1)
cos = freqs.cos() # (Seq, Dim)
sin = freqs.sin()
self.cache[D,seq_len,device,dtype] = (cos,sin)
return self.cache[D,seq_len,device,dtype]
from dust3r.
@KyunHwan thanks
from dust3r.
Related Issues (20)
- Exporting camera parameters and poses as well as 3D points to COLMAP-style files
- About single image input
- Hello, when i input two images ,webpage shows HTTP 500: Internal Server Error ,terminal shows: PermissionError: [Errno 13] Permission denied: '/tmp/gradio/5ff4baf71ad48a9439e595603e0cb48034d025de',how can i solve it?
- License
- CUDA version for RoPE HOT 1
- Are the pretrained model weights updated? HOT 6
- Ask for the checkpoint of MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt for 7-scenes localiztion HOT 1
- scannetpp_pairs not compatible with scannetpp's colmap data
- How can I evaluate on metric depth dataset like NYUv2?
- preprocess_co3d.py can't work HOT 1
- how to improve infer speed
- [QUESTION] about MST Initialization in Global Aligner
- Data preprocessing issues
- How to set up multi-GPU running
- pose estimation-rvec and tvec
- How can I get smoother mesh?
- The reconstructed model is layered
- scaling depth maps
- Table 1 discrepencies
- No module named 'models.dpt_block' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dust3r.