Skip to content

为什么我直接跑demo获取不到点云图 #230

@CslhJdlh

Description

@CslhJdlh

显卡是1660s
(venv) PS I:\git_proj\FoundationStereo> python scripts/run_demo.py --left_file ./assets/left.png --right_file ./assets/right.png --ckpt_dir ./pretrained_models/23-51-11/model_best_bp2.pth --out_dir ./test_outputs/
I:\git_proj\FoundationStereo\scripts
args:
{'corr_implementation': 'reg', 'corr_levels': 2, 'corr_radius': 4, 'finetune_ckpt_name': 'model_best_bp2.pth', 'finetune_from': None, 'hidden_dims': [128, 128, 128], 'img_gamma': None, 'inference_tile':
0, 'low_memory': 0, 'max_disp': 416, 'max_val_sample': None, 'mixed_precision': True, 'n_downsample': 2, 'n_gru_layers': 3, 'notes': '', 'num_steps': 200000, 'num_worker': 8, 'slow_fast_gru': False, 't
ags_more': [], 'tile_min_overlap': [16, 16], 'tile_wtype': 'gaussian', 'time_limit': 14400, 'train_iters': 22, 'val_interval': 1, 'valid_iters': 32, 'wdecay': 0, 'world_size': 32, 'vit_size': 'vitl', 'l
eft_file': './assets/left.png', 'right_file': './assets/right.png', 'intrinsic_file': 'I:\git_proj\FoundationStereo\scripts/../assets/K.txt', 'ckpt_dir': './pretrained_models/23-51-11/model_best_bp2.pth', 'out_dir': './test_outputs/', 'scale': 1, 'hiera': 0, 'z_far': 10, 'get_pc': 1, 'remove_invisible': 1, 'denoise_cloud': 1, 'denoise_nb_points': 30, 'denoise_radius': 0.03}
Using pretrained model from ./pretrained_models/23-51-11/model_best_bp2.pth
I:\git_proj\FoundationStereo./dinov2\dinov2\layers\swiglu_ffn.py:43: UserWarning: xFormers is available (SwiGLU)
warnings.warn("xFormers is available (SwiGLU)")
I:\git_proj\FoundationStereo./dinov2\dinov2\layers\attention.py:27: UserWarning: xFormers is available (Attention)
warnings.warn("xFormers is available (Attention)")
I:\git_proj\FoundationStereo./dinov2\dinov2\layers\block.py:33: UserWarning: xFormers is available (Block)
warnings.warn("xFormers is available (Block)")
using MLP layer as FFN
ckpt global_step:200000, epoch:40
I:\git_proj\FoundationStereo\scripts\run_demo.py:71: DeprecationWarning: Starting with ImageIO v3 the behavior of this function will switch to that of iio.v3.imread. To keep the current behavior (and make this warning disappear) use import imageio.v2 as imageio or call imageio.v2.imread directly.
img0 = imageio.imread(args.left_file)
I:\git_proj\FoundationStereo\scripts\run_demo.py:73: DeprecationWarning: Starting with ImageIO v3 the behavior of this function will switch to that of iio.v3.imread. To keep the current behavior (and make this warning disappear) use import imageio.v2 as imageio or call imageio.v2.imread directly.
img1 = imageio.imread(args.right_file)
img0: (540, 960, 3)
I:\git_proj\FoundationStereo\scripts\run_demo.py:87: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
with torch.cuda.amp.autocast(True):
I:\git_proj\FoundationStereo\scripts/..\core\foundation_stereo.py:206: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
with autocast(enabled=self.args.mixed_precision):
I:\git_proj\FoundationStereo\scripts/..\core\submodule.py:390: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
with torch.cuda.amp.autocast(enabled=False):
I:\git_proj\FoundationStereo\scripts/..\core\geometry.py:73: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
with torch.cuda.amp.autocast(enabled=False):
I:\git_proj\FoundationStereo\scripts/..\core\foundation_stereo.py:245: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
with autocast(enabled=self.args.mixed_precision):
I:\git_proj\FoundationStereo\scripts/..\core\foundation_stereo.py:191: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
with autocast(enabled=self.args.mixed_precision):
I:\git_proj\FoundationStereo\scripts/..\Utils.py:128: RuntimeWarning: invalid value encountered in cast
vis = cv2.applyColorMap(vis.clip(0, 255).astype(np.uint8), color_map)[...,::-1]
Output saved to ./test_outputs/
[Open3D WARNING] Write PLY failed: point cloud has 0 points.
PCL saved to ./test_outputs/
[Optional step] denoise point cloud...
[Open3D WARNING] [KDTreeFlann::SetRawData] Failed due to no data.
[Open3D WARNING] Write PLY failed: point cloud has 0 points.
Visualizing point cloud. Press ESC to exit.
[Open3D WARNING] The number of points is 0 when creating axis-aligned bounding box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions