IGEV icon indicating copy to clipboard operation
IGEV copied to clipboard

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

Open katsunori-waragai opened this issue 5 months ago • 0 comments

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 avatar Aug 27 '24 05:08 katsunori-waragai