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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

katsunori-waragai
Copy link

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

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