Exception in thread
sebo361 opened this issue · 2 comments
Dear Authors, great work and the results seem to be impressive. Unfortunately I can't get the videopose.py
with your provided demo video running as I am facing following error:
the video is 25.051 f/s
Loading YOLO model..
Loading pose model from joints_detectors/Alphapose/models/sppe/duc_se.pth
Start pose estimation...
0%| | 0/338 [00:00<?, ?it/s]Exception in thread Thread-4:
Traceback (most recent call last):
File "/home/sebastian/anaconda3/envs/video_to_pose3D/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/sebastian/anaconda3/envs/video_to_pose3D/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/sebastian/video-to-pose3D/joints_detectors/Alphapose/dataloader.py", line 678, in update
img = vis_frame(orig_img, result)
File "/home/sebastian/video-to-pose3D/joints_detectors/Alphapose/fn.py", line 219, in vis_frame
polygon = cv2.ellipse2Poly((int(mX), int(mY)), (int(length / 2), stickwidth), int(angle), 0, 360, 1)
TypeError: only integer tensors of a single element can be converted to an index
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 338/338 [00:22<00:00, 15.10it/s]
===========================> Rendering remaining images in the queue...
===========================> If this step takes too long, you can enable the --vis_fast flag to use fast rendering (real-time).
I waited for long time but this step does not proceed (the --vis_fast flag does not seem to exist anymore). I am not sure if its a threading or visualization issue - do you have any idea how to solve this?
Thanks and best, Sebastian
The TypeError
seems caused by the version incompatibility of numpy or opencv.
What I'm using:
- opencv-python 4.1.0.25
- numpy 1.16.4
Try to downgrade or upgrade these two packages in your environment.
Thanks for the quick response @zh-plus !
opencv-python==4.1.0.25 seems not to be available anymore (ERROR: Could not find a version that satisfies the requirement opencv-python==4.1.0.25 (from versions: 3.4.8.29, 3.4.9.31, 4.1.2.30, 4.2.0.32)
) and i get the same error with other opencv-python versions.
Can you maybe share your requirements.txt
or post your conda env list
in order to check other library versions?