vggt icon indicating copy to clipboard operation
vggt copied to clipboard

About encoder

Open Mr-ind1fferent opened this issue 6 months ago • 1 comments

Amazing work!

Wondering how to use vggt pertrained encoder?

thanks!

Mr-ind1fferent avatar Jun 04 '25 02:06 Mr-ind1fferent

Hi you can simply use the pretrained encoder following the steps in the readme, e.g.:

from vggt.utils.pose_enc import pose_encoding_to_extri_intri
from vggt.utils.geometry import unproject_depth_map_to_point_map

with torch.no_grad():
    with torch.cuda.amp.autocast(dtype=dtype):
        images = images[None]  # add batch dimension
        aggregated_tokens_list, ps_idx = model.aggregator(images)

jytime avatar Jun 06 '25 14:06 jytime