• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
MKT-porter
博客园    首页    新随笔    联系   管理    订阅  订阅

MAST3r计算结果

 

 

https://blog.csdn.net/gitblog_00870/article/details/153381137

image

 

image

 

# 1. 准备图像和配置
imgs = ["image1.jpg", "image2.jpg", "image3.jpg"]
pairs_in = [[{"idx":0}, {"idx":1}], [{"idx":1}, {"idx":2}], [{"idx":0}, {"idx":2}]]
cache_path = "./cache"
 
# 2. 加载模型
model = load_mast3r_model("mast3r_large")
 
# 3. 运行稀疏全局对齐
mast3r_ga = sparse_global_alignment(
    imgs, pairs_in, cache_path, model, 
    kinematic_mode='hclust-ward', 
    shared_intrinsics=False,
    lr1=0.07, niter1=300,
    lr2=0.01, niter2=300
)
 
# 4. 获取优化结果
K = mast3r_ga.get_intrinsics()
cam2w = mast3r_ga.get_cam2w()
pts3d = mast3r_ga.get_sparse_pts3d()
 
# 5. 可视化结果
mast3r_ga.show()

  

posted on 2026-02-15 04:19  MKT-porter  阅读(16)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3