open-mmlab / mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
https://mmpose.readthedocs.io/en/latest/
Apache License 2.0
5.26k stars 1.17k forks source link

[Bug] output_heatmaps option missing #3068

Open EltonCN opened 3 weeks ago

EltonCN commented 3 weeks ago

Prerequisite

Environment


OrderedDict([('sys.platform', 'win32'), ('Python', '3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]'), ('CUDA available', False), ('MUSA available', False), ('numpy_random_seed', 2147483648), ('MSVC', 'Microsoft (R) C/C++ Optimizing Compiler Versao 19.36.32534 para x64'), ('GCC', 'n/a'), ('PyTorch', '2.2.1+cpu'), ('PyTorch compiling details', 'PyTorch built with:\n  - C++ Version: 201703\n  - MSVC 192930151\n  - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications\n  - Intel(R) MKL-DNN v3.3.2 (Git Hash 2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)\n  - OpenMP 2019\n  - LAPACK is enabled (usually provided by MKL)\n  - CPU capability usage: AVX512\n  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CXX_COMPILER=C:/actions-runner/_work/pytorch/pytorch/builder/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /wd4624 /wd4068 /wd4067 /wd4267 /wd4661 /wd4717 /wd4244 /wd4804 /wd4273, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.2.1, USE_CUDA=0, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, \n'), ('TorchVision', '0.17.1+cpu'), ('OpenCV', '4.10.0'), ('MMEngine', '0.10.4'), ('MMPose', '1.3.1+8f0afd3')])

mmcv 2.1.0 mmdet 3.2.0 mmengine 0.10.4 mmpose 1.3.1

Reproduces the problem - code sample

import mmpose

MMPoseInferencer('human', output_heatmaps=True)

Reproduces the problem - command or script

Runned the command inside a Jupyter Notebook.

Reproduces the problem - error message

TypeError                                 Traceback (most recent call last)
Cell In[61], [line 1](vscode-notebook-cell:?execution_count=61&line=1)
----> [1](vscode-notebook-cell:?execution_count=61&line=1) inferencer = MMPoseInferencer('human', output_heatmaps=True)

TypeError: MMPoseInferencer.__init__() got an unexpected keyword argument 'output_heatmaps'

Additional information

  1. Expected result

According to the documentation, MMPoseInferencer have a parameter output_heatmaps (here, first "Parameters" block), but the class __init__ doesn't support this parameter.

Also, this parameters was intended to return the heatmap in the results, or only to generate a visualization for it (as the draw_heatmap inference parameter already does)? I'm trying to get only the heatmap image for each keypoint, and I'm a confused about how to do it.

  1. Dataset used None

  2. Possible reason Incorrect documentation