You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I built openpose correctly on my Windows machine, everything works, imports work perfectly too.
I wanted to create a python script where I wanted to put openpose import and in my main file I wanted to execute it, Is there any way to import pyopenpose in a simpler way?
For example:
oenpose_importer.py
import os
import cv2
import sys
from sys import platform
import argparse
import time
# Import Openpose (Windows/Ubuntu/OSX)
#dir_path = os.path.dirname(os.path.realpath(__file__))
dir_path = "path_to/openpose
try:
# Windows Import
if platform == "win32":
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append(dir_path + '/build/python/openpose/Release');
os.add_dll_directory(dir_path + '/build/x64/Release')
os.add_dll_directory(dir_path + '/build/bin')
#print("Openpose imported correctly")
import pyopenpose as op
else:
# Change these variables to point to the correct folder (Release/x64 etc.)
sys.path.append('../../python');
# If you run `make install` (default path is `/usr/local/python` for Ubuntu), you can also access the OpenPose/python module from there. This will install OpenPose and the python library at your desired installation path. Ensure that this is in your python path in order to use it.
# sys.path.append('/usr/local/python')
from openpose import pyopenpose as op
except ImportError as e:
print('Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?')
raise e
in my main.py
import os
import cv2
import sys
from sys import platform
import argparse
import time
import openpose_importer as op
# CODE HERE
Right now I'm getting the error: module 'openpose_importer' has no attribute 'WrapperPython'
Is there any way to achive what I'm trying to do?
The text was updated successfully, but these errors were encountered:
Windows 11 / Latest Openpose / Python 3.9
Hello, I built openpose correctly on my Windows machine, everything works, imports work perfectly too.
I wanted to create a python script where I wanted to put openpose import and in my main file I wanted to execute it, Is there any way to import pyopenpose in a simpler way?
For example:
oenpose_importer.py
in my main.py
Right now I'm getting the error:
module 'openpose_importer' has no attribute 'WrapperPython'
Is there any way to achive what I'm trying to do?
The text was updated successfully, but these errors were encountered: