open-mmlab / mmpose

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

How to change directory of visualizer while doing inference? #2423

Closed peterpark12 closed 1 year ago

peterpark12 commented 1 year ago

What is the feature?

I've noticed that visualizer.py code in site-packages is used while doing inference with "topdown_demo_with_mmdet.py" .

/opt/conda/lib/python3.7/site-packages/mmengine/visualization/visualizer.py:666: UserWarning: Warning: The circle is out of bounds, the drawn circle may not be in the image ' the drawn circle may not be in the image', UserWarning)

But it is bit difficult fix and customizing the code in site-packages, so I wanted to make it set to use mmengine/visualization/visualizer.py code in my work directory. What should I do?

Any other context?

No response

Ben-Louis commented 1 year ago

Hello, you can install mmengine from source following this doc and modify the code in the cloned repo.

peterpark12 commented 1 year ago

I already installed mmengine before using mmpose. So, imported visualizer from mmpose.registry in "topdown_demo_with_mmdet.py" is refer to visualizer module in site-packages. What I want to know is how to make it change visualizer module to refer to local mmengine code in my work directory.

Ben-Louis commented 1 year ago

You can install mmengine *from source* following this doc and modify the code in the cloned repo.

peterpark12 commented 1 year ago

Thank you, I made it!