Skip to content

use action="store_true" in IGEV-Stereo/demo_imgs.py - #81

Open
katsunori-waragai wants to merge 1 commit into
gangweix:mainfrom
katsunori-waragai:fix/save_numpy
Open

katsunori-waragai wants to merge 1 commit into
gangweix:mainfrom
katsunori-waragai:fix/save_numpy

Conversation

@katsunori-waragai

@katsunori-waragai katsunori-waragai commented Aug 27, 2024 •

Copy link
Copy Markdown

why

I found that --save_numpy option in IGEV-Stereo/demo_imgs.py is not working as expected.

cd IGEV-Stereo
python3 demo_imgs.py --restore_ckpt sceneflow.pth -l=../test_data/left.png  -r=../test_data/right.png --save_numpy
usage: demo_imgs.py [-h] [--restore_ckpt RESTORE_CKPT] [--save_numpy SAVE_NUMPY] [-l LEFT_IMGS] [-r RIGHT_IMGS]
                    [--output_directory OUTPUT_DIRECTORY] [--mixed_precision] [--valid_iters VALID_ITERS]
                    [--hidden_dims HIDDEN_DIMS [HIDDEN_DIMS ...]] [--corr_implementation {reg,alt,reg_cuda,alt_cuda}]
                    [--shared_backbone] [--corr_levels CORR_LEVELS] [--corr_radius CORR_RADIUS] [--n_downsample N_DOWNSAMPLE]
                    [--slow_fast_gru] [--n_gru_layers N_GRU_LAYERS] [--max_disp MAX_DISP]
demo_imgs.py: error: argument --save_numpy: expected one argument

what

I found that the following modification would work as expected:

-    parser.add_argument('--save_numpy', default=False, help='save output as numpy arrays')
+    parser.add_argument('--save_numpy', action="store_true", help='save output as numpy arrays')

@katsunori-waragai katsunori-waragai changed the title use store_true use action="store_true" Aug 27, 2024
@katsunori-waragai katsunori-waragai changed the title use action="store_true" use action="store_true" in IGEV-Stereo/demo_imgs.py Aug 27, 2024
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

Successfully merging this pull request may close these issues.

1 participant