Tau-J / rtmlib

RTMPose series (RTMPose, DWPose, RTMO, RTMW) without mmcv, mmpose, mmdet etc.
Apache License 2.0
239 stars 28 forks source link

ModuleNotFoundError: No module named 'rtmlib.tools.solution.utils' #11

Closed qingzew closed 9 months ago

qingzew commented 9 months ago

in release 0.0.8, via pip install rtmlib -i https://pypi.org/simple

Tau-J commented 9 months ago

Hi @qingzew , I cannot reproduce this error. Could you provide more information (things like the code you run)?

qingzew commented 9 months ago
import cv2

from rtmlib import Wholebody, draw_skeleton

device = 'cpu'  # cpu, cuda
backend = 'onnxruntime'  # opencv, onnxruntime, openvino

openpose_skeleton = False  # True for openpose-style, False for mmpose-style

wholebody = Wholebody(to_openpose=openpose_skeleton,
                      mode='balanced',  # 'performance', 'lightweight', 'balanced'. Default: 'balanced'
                                            backend=backend, device=device)

img = cv2.imread('./videoframe_0.png')
keypoints, scores = wholebody(img)
img_show = draw_skeleton(img, keypoints, scores, kpt_thr=0.5)
cv2.imwrite('img1.jpg', img_show)
print(keypoints.shape)

Traceback (most recent call last): File "/data1/demo.py", line 3, in from rtmlib import Wholebody, draw_skeleton File "/usr/local/lib/python3.10/dist-packages/rtmlib/init.py", line 1, in from .tools import (RTMO, YOLOX, Body, Hand, PoseTracker, RTMDet, RTMPose, File "/usr/local/lib/python3.10/dist-packages/rtmlib/tools/init.py", line 3, in from .solution import Body, Hand, PoseTracker, Wholebody File "/usr/local/lib/python3.10/dist-packages/rtmlib/tools/solution/init.py", line 4, in from .wholebody import Wholebody File "/usr/local/lib/python3.10/dist-packages/rtmlib/tools/solution/wholebody.py", line 48, in from .utils.types import BodyResult, Keypoint, PoseResult ModuleNotFoundError: No module named 'rtmlib.tools.solution.utils'

python version

Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux

system info

Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Aug 22 21:09:27 UTC 2017

problem

utils/types.py not in the installed dir
Tau-J commented 9 months ago

That's weird. Perhaps you can try reinstalling again, or install via clone this repo and run pip install -e .

mprib commented 9 months ago

I will chime in here and say that I ran into the same issue with the pip install , ultimately using the editable install as suggested above.

I think that the version on pip may be out of date. There is no utils within rtmlib.tools.solution that is packaged in PyPI:

image

Tau-J commented 9 months ago

I will chime in here and say that I ran into the same issue with the pip install , ultimately using the editable install as suggested above.

I think that the version on pip may be out of date. There is no utils within rtmlib.tools.solution that is packaged in PyPI:

image

Thanks for pointing this out. I'll update the pipy soon.

qingzew commented 9 months ago

still missing rtmlib.tools.solution.utils, release 0.0.9

Tau-J commented 9 months ago

still missing rtmlib.tools.solution.utils, release 0.0.9

I have released 0.0.10 to fix this bug, could you please help to give me any feedback? Thanks in advance.

qingzew commented 9 months ago

another problem

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/rtmlib/__init__.py", line 3, in <module>
    from .visualization.draw import draw_bbox, draw_skeleton
ModuleNotFoundError: No module named 'rtmlib.visualization'