Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coarse_segmentationgui.tar #63

Open
Awesome0324 opened this issue Mar 28, 2024 · 6 comments
Open

coarse_segmentationgui.tar #63

Awesome0324 opened this issue Mar 28, 2024 · 6 comments

Comments

@Awesome0324
Copy link

您好,不好意思又叨扰您了!
当我要按照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/

  • Serving Flask app 'lib.gui'
  • Debug mode: off
    2024-03-28 08:52:06,493 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on http://127.0.0.1:8050
    2024-03-28 08:52:06,495 - INFO - Press CTRL+C to quit
    train: coarse segmentation in 00:01:01
    train: finish (eps time 00:01:03 )
    Rendering with ckpt ./logs/llff\fern\coarse_segmentationgui.tar
    Traceback (most recent call last):
    File "E:\SA3D\SegmentAnythingin3D\run_seg_gui.py", line 119, in
    model, optimizer, start = utils.load_existed_model(args, cfg, cfg.fine_train, ckpt_path, device)
    File "E:\SA3D\SegmentAnythingin3D\lib\utils.py", line 75, in load_existed_model
    model = load_model(model_class, reload_ckpt_path).to(device)
    File "E:\SA3D\SegmentAnythingin3D\lib\utils.py", line 205, in load_model
    ckpt = torch.load(ckpt_path)
    File "E:\Anaconda\envs\3d\lib\site-packages\torch\serialization.py", line 986, in load
    with _open_file_like(f, 'rb') as opened_file:
    File "E:\Anaconda\envs\3d\lib\site-packages\torch\serialization.py", line 435, in _open_file_like
    return _open_file(name_or_buffer, mode)
    File "E:\Anaconda\envs\3d\lib\site-packages\torch\serialization.py", line 416, in init
    super().init(open(name, mode))
    FileNotFoundError: [Errno 2] No such file or directory: './logs/llff\fern\coarse_segmentationgui.tar'

请问这个问题怎么解决?

@Jumpat
Copy link
Owner

Jumpat commented Mar 28, 2024

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

@Awesome0324
Copy link
Author

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

@Jumpat
Copy link
Owner

Jumpat commented Mar 29, 2024

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

@Awesome0324
Copy link
Author

我用的时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/

  • Serving Flask app 'lib.gui'
  • Debug mode: off
    2024-03-29 10:15:43,249 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on http://127.0.0.1:8050
    2024-03-29 10:15:43,249 - INFO - Press CTRL+C to quit
    train: coarse segmentation in 00:00:18
    train: finish (eps time 00:00:19 )
    Rendering with ckpt ./logs/llff\fern\coarse_segmentation_gui.tar
    Traceback (most recent call last):
    File "E:\SA3D\SegmentAnythingin3D\run_seg_gui.py", line 119, in
    model, optimizer, start = utils.load_existed_model(args, cfg, cfg.fine_train, ckpt_path, device)
    File "E:\SA3D\SegmentAnythingin3D\lib\utils.py", line 75, in load_existed_model
    model = load_model(model_class, reload_ckpt_path).to(device)
    File "E:\SA3D\SegmentAnythingin3D\lib\utils.py", line 205, in load_model
    ckpt = torch.load(ckpt_path)
    File "E:\Anaconda\envs\3d\lib\site-packages\torch\serialization.py", line 986, in load
    with _open_file_like(f, 'rb') as opened_file:
    File "E:\Anaconda\envs\3d\lib\site-packages\torch\serialization.py", line 435, in _open_file_like
    return _open_file(name_or_buffer, mode)
    File "E:\Anaconda\envs\3d\lib\site-packages\torch\serialization.py", line 416, in init
    super().init(open(name, mode))
    FileNotFoundError: [Errno 2] No such file or directory: './logs/llff\fern\coarse_segmentation_gui.tar'

@himoi
Copy link

himoi commented Oct 16, 2024

能否提供下你之前使用的具体脚本,指令等,目前这些信息我们没办法debug
the same issue, need your answer, really thanks!

@Zanue
Copy link
Collaborator

Zanue commented Oct 25, 2024

the same issue, need your answer, really thanks!

Seems that the segmentation process is not conducted, otherwise there will be coarse_segmentation_gui.tar under the exp dir.
Do you use the gui correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants