Jumpat / SegmentAnythingin3D

Segment Anything in 3D with NeRFs (NeurIPS 2023)
Apache License 2.0
873 stars 54 forks source link

coarse_segmentationgui.tar #63

Open Awesome0324 opened 6 months ago

Awesome0324 commented 6 months ago

您好,不好意思又叨扰您了! 当我要按照readme执行run SA3D in GUI的代码时,提示我FileNotFoundError: [Errno 2] No such file or directory: './logs/llff\fern\coarse_segmentationgui.tar'。

2024-03-28 08:52:06,483 - INFO - Dash is running on http://127.0.0.1:8050/

请问这个问题怎么解决?

Jumpat commented 6 months ago

你好,这里看上去只是文件名错误,请查看./logs/llff\fern\这个文件夹找到对应的tar文件。在我印象里这个文件不是这样命名的,你是否修改了代码中的某些内容呢?

Awesome0324 commented 6 months ago

感谢你的回复,我并没有修改过代码,./logs/llff\fern\这个文件夹里只有命名为final , 02000, 01000 这三个tar文件,抱歉详细的名称我没记清,那台电脑不在我手边。 有可能是我环境配置的问题吗?因为我的电脑按照requirements的环境配置会出现问题,所以我的是pytorch2.1+cuda11.8。

Jumpat commented 6 months ago

能否提供下你之前使用的具体脚本,指令等,目前这些信息我们没办法debug

Awesome0324 commented 6 months ago

我用的时llff的fern数据 运行python run.py --config=configs/llff/fern.py --stop_at=20000 --render_video --i_weights=10000指令正常

这个是我的文件夹里的文件image

运行python run_seg_gui.py --config=configs/llff/seg/seg_fern.py --segment --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt指令如下:

(3d) E:\SA3D\SegmentAnythingin3D>python run_seg_gui.py --config=configs/llff/seg/seg_fern.py --segment --sp_name=_gui --num_prompts=20 --render_opt=train --save_ckpt Using C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118\render_utils_cuda\build.ninja... Building extension module render_utils_cuda... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module render_utils_cuda... Using C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118\total_variation_cuda\build.ninja... Building extension module total_variation_cuda... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module total_variation_cuda... Using C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118 as PyTorch extensions root... No modifications detected for re-loaded extension module render_utils_cuda, skipping build step... Loading extension module render_utils_cuda... Using C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118 as PyTorch extensions root... No modifications detected for re-loaded extension module render_utils_cuda, skipping build step... Loading extension module render_utils_cuda... Using C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118\ub360_utils_cuda\build.ninja... Building extension module ub360_utils_cuda... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module ub360_utils_cuda... Using C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file C:\Users\rjjszx\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu118\adam_upd_cuda\build.ninja... Building extension module adam_upd_cuda... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module adam_upd_cuda... UserWarning: Failed to load custom C++ ops. Running on CPU mode Only! UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, please use torch.set_default_dtype() and torch.set_default_device() as alternatives. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\tensor\python_tensor.cpp:453.) Loading images from ./data/nerf_llff_data/fern\images_4 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 49.75it/s] Loaded image data (756, 1008, 3, 20) [ 756. 1008. 815.13158322] Loaded ./data/nerf_llff_data/fern 16.985296178676084 80.00209740336334 recentered (3, 5) [[ 1.0000000e+00 0.0000000e+00 0.0000000e+00 1.4901161e-09] [ 0.0000000e+00 1.0000000e+00 -1.8730975e-09 -9.6857544e-09] [-0.0000000e+00 1.8730975e-09 1.0000000e+00 0.0000000e+00]] UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:264.) Data: (20, 3, 5) (20, 756, 1008, 3) (20, 2) HOLDOUT view is 12 Loaded llff (20, 756, 1008, 3) torch.Size([120, 3, 5]) [ 756. 1008. 815.1316] ./data/nerf_llff_data/fern Auto LLFF holdout, 8 DEFINING BOUNDS NEAR FAR 0.0 1.0 train: start compute_bbox_by_cam_frustrm: start UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\TensorShape.cpp:3527.) compute_bbox_by_cam_frustrm: xyz_min tensor([-1.4360, -1.2948, -1.0000]) compute_bbox_by_cam_frustrm: xyz_max tensor([1.4386, 1.2588, 1.0000]) compute_bbox_by_cam_frustrm: finish SAM initializd. scene_rep_reconstruction (coarse): reload from ./logs/llff\fern\fine_last.tar Load model with num_objects = 1 dvgo: set density bias shift to tensor([-4.5951], device='cpu') dvgo: voxel_size tensor(0.0077) dvgo: world_size tensor([375, 333, 261]) dvgo: voxel_size_base tensor(0.0077) dvgo: voxel_size_ratio tensor(1.) tensor([-1.4360, -1.2948, -1.0000]) tensor([1.4386, 1.2588, 1.0000]) tensor([375, 333, 261]) tensor([-1.4360, -1.2948, -1.0000]) tensor([1.4386, 1.2588, 1.0000]) tensor([375, 333, 261]) tensor([-1.4360, -1.2948, -1.0000]) tensor([1.4386, 1.2588, 1.0000]) tensor([375, 333, 261]) dvgo: feature voxel grid TensoRFGrid(channels=9, world_size=[375, 333, 261], n_comp=48) dvgo: mlp Sequential( (0): Linear(in_features=36, out_features=64, bias=True) (1): ReLU(inplace=True) (2): Sequential( (0): Linear(in_features=64, out_features=64, bias=True) (1): ReLU(inplace=True) ) (3): Linear(in_features=64, out_features=3, bias=True) ) NeRF loaded with msg: _IncompatibleKeys(missing_keys=['seg_mask_grid.grid', 'seg_mask_grid.xyz_min', 'seg_mask_grid.xyz_max', 'dual_seg_mask_grid.grid', 'dual_seg_mask_grid.xyz_min', 'dual_seg_mask_grid.xyz_max'], unexpected_keys=[]) create_optimizer_or_freeze_model: param seg_mask_grid lr 1.0 create_optimizer_or_freeze_model: param dual_seg_mask_grid lr 1.0 create_optimizer_or_freeze_model: param density freeze create_optimizer_or_freeze_model: param k0 freeze create_optimizer_or_freeze_model: param rgbnet freeze NeRF loaded with msg: _IncompatibleKeys(missing_keys=['seg_mask_grid.grid', 'seg_mask_grid.xyz_min', 'seg_mask_grid.xyz_max', 'dual_seg_mask_grid.grid', 'dual_seg_mask_grid.xyz_min', 'dual_seg_mask_grid.xyz_max'], unexpected_keys=[]) Segmentation model: COARSE MODE. create_optimizer_or_freeze_model: param seg_mask_grid lr 1 create_optimizer_or_freeze_model: param dual_seg_mask_grid lr 1 create_optimizer_or_freeze_model: param density freeze create_optimizer_or_freeze_model: param k0 freeze create_optimizer_or_freeze_model: param rgbnet freeze Dash is running on http://127.0.0.1:8050/

2024-03-29 10:15:43,236 - INFO - Dash is running on http://127.0.0.1:8050/