init project
Browse filesFiles changed (2)
85 unmodified lines86878889909192374 unmodified lines46746846947047147247347447547647785 unmodified linesscene.export(file_obj=outfile)return outfile# @spaces.GPU(duration=180)def get_3D_model_from_scene(outdir, scene, min_conf_thr=3, as_pointcloud=False, mask_sky=False,clean_depth=False, transparent_cams=False, cam_size=0.05):"""374 unmodified lineselif scenegraph_type == "oneref":scenegraph_type = scenegraph_type + "-" + str(refid)pairs = make_pairs(imgs, scene_graph=scenegraph_type, prefilter=None, symmetrize=True)output = inference(pairs, pe3r.mast3r, device, batch_size=1, verbose=not silent)mode = GlobalAlignerMode.PointCloudOptimizer if len(imgs) > 2 else GlobalAlignerMode.PairViewerscene_1 = global_aligner(output, cog_seg_maps, rev_cog_seg_maps, cog_feats, device=device, mode=mode, verbose=not silent)lr = 0.01# if mode == GlobalAlignerMode.PointCloudOptimizer:loss = scene_1.compute_global_alignment(tune_flg=True, init='mst', niter=niter, schedule=schedule, lr=lr)85 unmodified lines86878889909192374 unmodified lines46746846947047147247347447547647747847948048185 unmodified linesscene.export(file_obj=outfile)return outfile@spaces.GPU(duration=180)def get_3D_model_from_scene(outdir, scene, min_conf_thr=3, as_pointcloud=False, mask_sky=False,clean_depth=False, transparent_cams=False, cam_size=0.05):"""374 unmodified lineselif scenegraph_type == "oneref":scenegraph_type = scenegraph_type + "-" + str(refid)print('0')pairs = make_pairs(imgs, scene_graph=scenegraph_type, prefilter=None, symmetrize=True)print('a')output = inference(pairs, pe3r.mast3r, device, batch_size=1, verbose=not silent)print('b')mode = GlobalAlignerMode.PointCloudOptimizer if len(imgs) > 2 else GlobalAlignerMode.PairViewerscene_1 = global_aligner(output, cog_seg_maps, rev_cog_seg_maps, cog_feats, device=device, mode=mode, verbose=not silent)lr = 0.01print('c')# if mode == GlobalAlignerMode.PointCloudOptimizer:loss = scene_1.compute_global_alignment(tune_flg=True, init='mst', niter=niter, schedule=schedule, lr=lr)
441 unmodified lines442443444445446447448441 unmodified linesreturn refresh_confidence_map.view(H, W)@torch.cuda.amp.autocast(enabled=False)def compute_global_alignment(self, tune_flg=False, init=None, niter_PnP=10, **kw):if tune_flg:441 unmodified lines442443444445446447448441 unmodified linesreturn refresh_confidence_map.view(H, W)# @torch.cuda.amp.autocast(enabled=False)def compute_global_alignment(self, tune_flg=False, init=None, niter_PnP=10, **kw):if tune_flg:
app.py+5-1
modules/dust3r/cloud_opt/base_opt.py+1-1