Closed jschoch closed 1 day ago
Interesting, thanks for sharing!
If I may ask, why do you use WSL? Pose2Sim works on Linux, but it also natively works on Windows, so that would save you a lot of trouble.
amd 7900 xtx, only gets rocm in linux :(
Oh okay, thanks!
I also seem to have this problem with sports2d, it actually makes a QT window and then i get the odd error
Processing video stream...
100%|█████████████████████████████████████████████████████| 230/230 [01:16<00:00, 3.00it/s]
Video processing completed.
Processed video saved to /home/schoch/sports2d/demo_Sports2D/demo_Sports2D.mp4.
Processed images saved to /home/schoch/sports2d/demo_Sports2D/demo_Sports2D_img.
Post-processing pose:
- Person 0: Interpolating missing sequences if they are smaller than 10 frames. Large gaps filled with last_value.
Filtering with Butterworth filter, 4th order, 3 Hz.
Pose saved to /home/schoch/sports2d/demo_Sports2D/demo_Sports2D_px_person00.trc.
QObject::moveToThread: Current thread (0x431e700) is not the object's thread (0x447ade0).
Cannot move to target thread (0x431e700)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/schoch/miniconda3/envs/sports2d/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
crazy long thread on this at stack overflow. https://stackoverflow.com/questions/46449850/how-to-fix-the-error-qobjectmovetothread-in-opencv-in-python
what i did was:
pip uninstall opencv-python conda install opencv -c conda-forge
that seems to fix the qpa plugin issue. Still digging into to an easy way to run the pose estimation with rocm.
rocm works with this change
@@ -242,6 +242,10 @@ def setup_pose_tracker(det_frequency, mode, tracking):
device = 'cuda'
backend = 'onnxruntime'
logging.info(f"\nValid CUDA installation found: using ONNXRuntime backend with GPU.")
+ elif torch.cuda.is_available() == True and 'ROCMExecutionProvider' in ort.get_available_providers():
+ device = 'rocm'
+ backend = 'onnxruntime'
+ logging.info(f"\nValid CUDA installation found ROCM: using ONNXRuntime backend with GPU.")
else:
raise
except:
and this update to rtmlib
Added to the code 👍
I have a bit of an oddball environment and wanted to document issues with it.
firstly you have to get rocm setup and working. this is a bit off topic but it takes a bit of effort.
Then you can confirm wslg is working by installing somethiinig like gedit and setting the DISPLAY=:0
there is some issue with python-opencv and QT when using "wslg". I'm not really sure what is happening, but after in installed vlc (a qt app) I was able to run the single person demo.
in ipython oddly I had to run this QT demo code and then I could run the demo.
I think there are some ONNX issues falling back to CPU for some things but it runs.