INNER CODE UNIT · Python
main
MIT-SPARK/VGGT-SLAM · main_realtime.py:147
def main():
args = parser.parse_args()
device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Using device: {device}")
# When --run_os is set, SAM3/decord loads its own libxcb which poisons
# OpenCV's XCB state and makes cv2.waitKey() hang. Skip cv2 display in that
# case and print periodic status to the console instead.
use_display = not args.run_os
solver = Solver(
init_conf_threshold=args.conf_threshold,
lc_thres=args.lc_thres,
vis_voxel_size=args.vis_voxel_size,
vis_imgs=args.vis_imgs,
)