Missing multi_lvl_cluster_features.pth after running training scripts
I ran train_scene.py and train_affinity_features.py successfully. But the inference.ipynb (cell 7) fails because it expects:
.../output/point_cloud/iteration_30000/multi_lvl_cluster_features.pth
These files are nowhere to be found and I can’t see any notebook cell or script that generates them.
Hi, you can generate it in the inference.ipynb. See sec '3D Scene Decomposition' and sec 'View-Aggreated Semantic Representation'. The saving code is above 'Language-driven Segmentation'.
Got it, thanks!
@Jumpat @leongreiner
Hi, I've successfully run train_scene.py. But I got an error running train_affinity_features.py:
Looking for config file in /home/junyi.wu/code/LaGa/output/0965ea6b-a/cfg_args Config file found: /home/junyi.wu/code/LaGa/output/0965ea6b-a/cfg_args Optimizing /home/junyi.wu/code/LaGa/output/0965ea6b-a Loading trained model at iteration 30000, None [17/06 14:34:16] Allow Camera Principle Point Shift: False [17/06 14:34:16] Reading camera 1/299Traceback (most recent call last): File "train_affinity_features.py", line 264, in
training(lp.extract(args), op.extract(args), pp.extract(args), args.iteration, args.downsample) File "train_affinity_features.py", line 36, in training scene = Scene(dataset, gaussians, feature_gaussians, load_iteration=iteration, shuffle=False, target='contrastive_feature', mode='train', sample_rate=sample_rate) File "/home/junyi.wu/code/LaGa/scene/init.py", line 104, in init scene_info = sceneLoadTypeCallbacks["Colmap"](args.source_path, args.images, args.eval, need_features = args.need_features, need_masks = args.need_masks, sample_rate = sample_rate, allow_principle_point_shift = args.allow_principle_point_shift, replica = 'replica' in args.model_path) File "/home/junyi.wu/code/LaGa/scene/dataset_readers_multi_lvl.py", line 175, in readColmapSceneInfo cam_infos_unsorted = readColmapCameras(cam_extrinsics=cam_extrinsics, cam_intrinsics=cam_intrinsics, images_folder=os.path.join(path, reading_dir), features_folder=os.path.join(path, feature_dir) if need_features else None, masks_folder=os.path.join(path, mask_dir) if need_masks else None, mask_scale_folder=None, sample_rate=sample_rate, allow_principle_point_shift = allow_principle_point_shift) File "/home/junyi.wu/code/LaGa/scene/dataset_readers_multi_lvl.py", line 114, in readColmapCameras features = torch.from_numpy(np.load(os.path.join(masks_folder, image_name.split('.')[0] + "_f.npy"))) if masks_folder is not None else None File "/opt/conda/lib/python3.7/site-packages/numpy/lib/npyio.py", line 417, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: '/data/lerf_ovs/lerf_ovs/lerf_ovs/figurines/language_features/frame_00288_f.npy'
it seems that language_features file is missing. How can we generate it? Thanks!
Hey @adreamwu, You have to run preprocess.py (from langsplat but also avail in this repo, which uses SAM and CLIP) to create the language_features. But be aware that it needs some time, especially if you have higher resolution and many images. In my case, since i was able to use a powerful gpu (a100), I parallelized the process to get more workload to the gpu, made a huge difference.