ROMP icon indicating copy to clipboard operation
ROMP copied to clipboard

[simple-romp] Error instead of usage hints on invocation without arguments

Open vivi90 opened this issue 2 years ago • 1 comments

Invocation without any arguments:

(sromp) PS C:\Users\Vivien\Projekte> romp
Using ROMP v1
[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_(''): can't open/read file: check file path/integrity
Traceback (most recent call last):
  File "C:\tools\miniconda3\envs\sromp\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\tools\miniconda3\envs\sromp\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\tools\miniconda3\envs\sromp\Scripts\romp.exe\__main__.py", line 7, in <module>
  File "C:\tools\miniconda3\envs\sromp\lib\site-packages\romp\main.py", line 181, in main
    outputs = romp(image)
  File "C:\tools\miniconda3\envs\sromp\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\tools\miniconda3\envs\sromp\lib\site-packages\romp\utils.py", line 728, in wrap_func        
    result = func(*args, **kwargs)
  File "C:\tools\miniconda3\envs\sromp\lib\site-packages\romp\main.py", line 158, in forward
    outputs, image_pad_info = self.single_image_forward(image)
  File "C:\tools\miniconda3\envs\sromp\lib\site-packages\romp\main.py", line 105, in single_image_forward
    input_image, image_pad_info = img_preprocess(image)
  File "C:\tools\miniconda3\envs\sromp\lib\site-packages\romp\utils.py", line 27, in img_preprocess    
    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Invocation with explicit --help argument:

(sromp) PS C:\Users\Vivien\Projekte> romp --help 
usage: romp [-h] [-m MODE] [-i INPUT] [-o SAVE_PATH] [--GPU GPU] [--onnx] [-t]
            [--center_thresh CENTER_THRESH] [--show_largest] [-sc SMOOTH_COEFF] [--calc_smpl]
            [--render_mesh] [--renderer RENDERER] [--show] [--show_items SHOW_ITEMS] [--save_video]    
            [--frame_rate FRAME_RATE] [--smpl_path SMPL_PATH] [--model_path MODEL_PATH]
            [--model_onnx_path MODEL_ONNX_PATH] [--root_align ROOT_ALIGN]

ROMP: Monocular, One-stage, Regression of Multiple 3D People

optional arguments:
  -h, --help            show this help message and exit
  -m MODE, --mode MODE  Inferece mode, including image, video, webcam
  -i INPUT, --input INPUT
                        Path to the input image / video
  -o SAVE_PATH, --save_path SAVE_PATH
                        Path to save the results
  --GPU GPU             The gpu device number to run the inference on. If GPU=-1, then running in cpu  
                        mode
  --onnx                Whether to use ONNX for acceleration.
  -t, --temporal_optimize
                        Whether to use OneEuro filter to smooth the results
  --center_thresh CENTER_THRESH
                        The confidence threshold of positive detection in 2D human body center
                        heatmap.
  --show_largest        Whether to show the largest person only
  -sc SMOOTH_COEFF, --smooth_coeff SMOOTH_COEFF
                        The smoothness coeff of OneEuro filter, the smaller, the smoother.
  --calc_smpl           Whether to calculate the smpl mesh from estimated SMPL parameters
  --render_mesh         Whether to render the estimated 3D mesh mesh to image
  --renderer RENDERER   Choose the renderer for visualizaiton: pyrender (great but slow), sim3dr       
                        (fine but fast)
  --show                Whether to show the rendered results
  --show_items SHOW_ITEMS
                        The items to visualized, including
                        mesh,pj2d,j3d,mesh_bird_view,mesh_side_view,center_conf. splited with ,        
  --save_video          Whether to save the video results
  --frame_rate FRAME_RATE
                        The frame_rate of saved video results
  --smpl_path SMPL_PATH
                        The path of smpl model file
  --model_path MODEL_PATH
                        The path of ROMP checkpoint
  --model_onnx_path MODEL_ONNX_PATH
                        The path of ROMP onnx checkpoint
  --root_align ROOT_ALIGN
                        Please set this config as True to use the ROMP checkpoints trained by
                        yourself.
(sromp) PS C:\Users\Vivien\Projekte> 

I recommend the following solution (not tested): https://stackoverflow.com/a/47440202/3699361

My pip freeze output:

black==22.3.0
certifi==2021.10.8
click==8.1.2
colorama==0.4.4
Cython==0.29.30
lap==0.4.0
mypy-extensions==0.4.3
numpy==1.22.3
opencv-python==4.5.5.64
pathspec==0.9.0
platformdirs==2.5.1
simple-romp==1.0.5
tomli==2.0.1
torch==1.11.0
typing_extensions==4.1.1
wincertstore==0.2

System:

  • Python: v3.9.12
  • OS: Windows 10 Enterprise (64-bit, Version 21H2, Build 19044.1706)

vivi90 avatar Jun 08 '22 23:06 vivi90

Hi, Vivian,

Thanks a lot.

Arthur151 avatar Jun 21 '22 14:06 Arthur151