Comments (7)
Dear @timtensor , I've finally been able to reproduce the error and fix it. It was related to different sys.path
initialization between anaconda and non-anaconda environments.
Thank you for sharing your code. Indeed, my workaround is similar to yours, but it works regardless of the path of the project.
Regarding CUDA, you just need to install pytorch with CUDA support. If the script outputs cuda:0
, it means that the GPU 0 (with CUDA support) is used to execute the network.
If you need further support, please open a specific issue (e.g. "frame rate is very low").
from simple-hrnet.
Hi! To import the simpleHRNet
module, you need to have the project root path (i.e. the directory with the file SimpleHRNet.py
) in your "python path" (i.e. the path in which python search the packages).
By default, the working directory is automatically added to your "python path" so it should work if you run the script from the project root with the command python scripts/live-demo.py
.
On Linux, you can check it running the command python -c "import sys;print(sys.path)"
: you should find your working directory in the printed list. (On Windows, the working directory is represented with an empty string.)
If you don't find it, just add the project root path to the environment variable PYTHONPATH
.
from simple-hrnet.
Hi @stefanopini ,Ok i think i understand you . I did a print out of the system configuration which i do have the root folder
['', '/home/pm/pf/simple-HRNet/datasets', '/home/pm/pf/simple-HRNet/misc', '/home/pm/pf/simple-HRNet/models', '/home/pm/pf/simple-HRNet/__pycache__', '/home/pm/pf/simple-HRNet/scripts', '/home/pm/pf/simple-HRNet/test', '/home/pm/pf/simple-HRNet/weights', '/home/pm', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/pm/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/pyOpenSSL-19.0.0-py2.7.egg', '/usr/lib/python2.7/dist-packages']
However i have two versions of python ,
python3.5and
python2.7` . Do you think it interferes ??
from simple-hrnet.
Yes, it could because I didn't test the script on python 2.7... You should use python 3.
Can you try to run the software using python3 scripts/live-demo.py
?
In any case, I suggest you to use a virtual environment (see https://docs.python.org/3.7/tutorial/venv.html).
from simple-hrnet.
Hi @stefanopini , as you suggested i created a virtua enviroment . I see an error from the yolo
model and running on python3.6
The error is as follows
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/test/simple-HRNet/SimpleHRNet.py", line 6, in <module>
from models.detectors.YOLOv3 import YOLOv3
File "/home/test/simple-HRNet/models/detectors/YOLOv3.py", line 7, in <module>
from .yolo.models import Darknet
File "/home/test/simple-HRNet/models/detectors/yolo/models.py", line 9, in <module>
from utils.parse_config import *
ModuleNotFoundError: No module named 'utils'
The above error seems to be of yolo
module , so i am not sure what is the problem
the output of the sys path is as follows
'/home/test/simple-HRNet', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/test/simple-HRNet/simpleHrnet/lib/python3.6/site-packages']
from simple-hrnet.
You're right, there was a bug on the yolo import... I should have just fixed it.
Let me know if it works now.
from simple-hrnet.
@stefanopini finally i managed to run the script but modying the sys path
in the file ``/live-demo.py ` .
import sys
sys.path.append("/home/test/simple-HRNet")
Maybe it is a dirty solution but seems to work .
and running the following , I still need to specify the --weights
flag . However , when i run it , in a CUDA enabled device , i still get CUDA 0
and was wondering how can i get the venv
access the CUDA. Do i have to install the CUDA toolkit for the venv
?? And did you have some ideas as in how to optimzie the detections ??
We get the following printout of torch.cuda.is_available()
True cuda:0
Does it mean it is accesing the CUDA drivers ? the output frame rate seems to very slow .
from simple-hrnet.
Related Issues (20)
- TypeError: __init__() takes 2 positional arguments but 3 were given HOT 2
- 有剪枝,蒸馏方面的计划吗? HOT 1
- RuntimeError: Error(s) in loading state_dict for HRNet: HOT 1
- Evaluate custom dataset HOT 4
- Get inference time HOT 1
- Use YOLOv5 as a detector HOT 2
- Turn off some keypoints
- Data augmentations of training
- How to solce Error: ffprobe error (see stderr output for detail) HOT 2
- Integrating with poseflow HOT 1
- RuntimeError: The size of tensor a (645) must match the size of tensor b (646) at non-singleton dimension 2 HOT 3
- FileNotFoundError: [WinError 2] The system cannot find the specified file HOT 7
- How to Train with 1 Class??
- [Request] Making a python file to get AP/AR for each class? HOT 1
- ImportError: cannot import name 'FFProbe' HOT 3
- Using a different detector HOT 1
- how to output the result in coco json file and retrain a new model HOT 2
- PermissionError: [Errno 13] Permission denied: / FileNotFoundError: [WinError 2] HOT 1
- Broken model file pose_hrnet_w48_384x288.pth HOT 1
- ffmpeg._run.Error: ffprobe error (see stderr output for detail) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-hrnet.