yangli18 / hand_detection Goto Github PK
View Code? Open in Web Editor NEWA Light CNN based Method for Hand Detection and Orientation Estimation
License: MIT License
A Light CNN based Method for Hand Detection and Orientation Estimation
License: MIT License
@yangli18 I have completed training and evaluation. I want test my own image. You have not included the code to print test image result with hand orientation vectors. Please provide code to print hand orientation with test image
感谢您分享了这份代码,我想问一下xmin, ymin, xmax, ymax, wx, wy, hx, hy, wristx, wristy中wx, wy, hx, hy, wristx, wristy分别代表什么意思,期盼您的答复
Thank you for providing the code,But I encountered difficulties when testing.How can I test my own picture and output the result of the picture?
So, now i'm on Ubuntu 16.04 everything appears to be fine until build.py i got this error :
Traceback (most recent call last):
File "build.py", line 3, in
from torch.utils.ffi import create_extension
File "/home/the-taco-coder/.local/lib/python3.5/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Any help would be really appreciated.
Thanks iin advance for the awesome work
你好,非常感谢你共享自己的代码。
目前我在运行时出现了一点问题,ModuleNotFoundError: No module named 'layers._ext'。
我看之前issue里面也有关于这个模块的错误,但是没有找到解决方案。._ext文件在 layers文件夹里面好像也没有。
期待你的回答
@yangli18 很好的项目,想请问下有没有caffe版本的实现呢?
@yangli18 What a great work. I just saw your work few days ago, read your paper but when looking into your codes, I cant see where Projection loss and Wrist loss are ?
You have done great work. I want to use custom images, while using model. I would like to know how to create annotation for custom image dataset.
Hello, I do not find the codes to get the orientation the hand in eval.py, Could you tell me about it?
the detection of result distinguish right hand from left
what is version with pytorch to run demo?i have installde 1.2.but when i run dem,bui it is wrong.
error in mobilenet_v1_base "end_point_base"
Basically that my problem i have already fixewd all my previous issues but now i get this error in the make.sh execution.
Any help would be very appreciated sir
Thanks in advance
My OS is Windows 10 by the way
Hello, I have problem during running the python3 eval.py --trained_model weights/ssd_new_mobilenet_FFA.pth --version ssd_new_mobilenet_FFA
The error message is KeyError: 'module name can\'t contain "."'
How to fix it?
Hi
I wanted to try your code but due to updates in python the modules cannot contain "." in their keys so it cannot be used to load your pretrained weights to train. Is there a way you can change their keys? e.g. features.Conv2d_6.pointwise.0.weight to features_Conv2d_6.pointwise.0.weight
There is a script to perform inference? cant fin it by hte way awesome work
python eval.py --trained_model weights/ssd_new_mobilenet_FFA.pth --version ssd_new_mobilenet_FFA --cuda False
got error:
ImportError: /home/vr/handOrientation/hand_detection/layers/_ext/nms/_nms.so: undefined symbol: __cudaRegisterFatBinaryEnd
Hello, Thanks for your detailed instructions.
Pleas help me to resolve the below error.
I compiled the NMS code as you given sh layers/src/make.sh
and I mentioned the trace logs of this compilation as below:
Compiling nms kernels by nvcc...
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers
generating /tmp/tmp0wro7mgm/_nms.c
setting the current directory to '/tmp/tmp0wro7mgm'
running build_ext
building '_nms' extension
creating home
creating home/vasanthahr
creating home/vasanthahr/code
creating home/vasanthahr/code/python
creating home/vasanthahr/code/python/proj
creating home/vasanthahr/code/python/proj/live_video_process
creating home/vasanthahr/code/python/proj/live_video_process/pytorch
creating home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient
creating home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master
creating home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers
creating home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/include/python3.5m -c _nms.c -o ./_nms.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/include/python3.5m -c /home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.c -o ./home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.o
In file included from /home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:4:0,
from /home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.c:1:
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.c: In function ‘cpu_nms’:
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.c:7:42: warning: passing argument 1 of ‘THLongTensor_isContiguous’ from incompatible pointer type [-Wincompatible-pointer-types]
THArgCheck(THLongTensor_isContiguous(boxes), 2, "boxes must be contiguous");
^
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:80:35: note: in definition of macro ‘THArgCheck’
_THArgCheck(__FILE__, __LINE__, __VA_ARGS__); \
^~~~~~~~~~~
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:39: note: expected ‘const THLongTensor * {aka const struct THLongTensor *}’ but argument is of type ‘THFloatTensor * {aka struct THFloatTensor *}’
#define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME)
^
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:118:37: note: in definition of macro ‘TH_CONCAT_4_EXPAND’
#define TH_CONCAT_4_EXPAND(x,y,z,w) x ## y ## z ## w
^
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:27: note: in expansion of macro ‘TH_CONCAT_4’
#define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME)
^~~~~~~~~~~
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/generic/THTensor.h:115:12: note: in expansion of macro ‘THTensor_’
TH_API int THTensor_(isContiguous)(const THTensor *self);
^~~~~~~~~
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.c:9:42: warning: passing argument 1 of ‘THLongTensor_isContiguous’ from incompatible pointer type [-Wincompatible-pointer-types]
THArgCheck(THLongTensor_isContiguous(areas), 4, "areas must be contiguous");
^
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:80:35: note: in definition of macro ‘THArgCheck’
_THArgCheck(__FILE__, __LINE__, __VA_ARGS__); \
^~~~~~~~~~~
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:39: note: expected ‘const THLongTensor * {aka const struct THLongTensor *}’ but argument is of type ‘THFloatTensor * {aka struct THFloatTensor *}’
#define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME)
^
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:118:37: note: in definition of macro ‘TH_CONCAT_4_EXPAND’
#define TH_CONCAT_4_EXPAND(x,y,z,w) x ## y ## z ## w
^
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:27: note: in expansion of macro ‘TH_CONCAT_4’
#define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME)
^~~~~~~~~~~
/home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/env_pytorch_hand_det/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/generic/THTensor.h:115:12: note: in expansion of macro ‘THTensor_’
TH_API int THTensor_(isContiguous)(const THTensor *self);
^~~~~~~~~
gcc -pthread -shared ./_nms.o ./home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/nms.o /home/vasanthahr/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/src/cuda/nms_kernel.cu.o -o ./_nms.so
After compiling above NMS, i tried to execute the demo.ipynb file, but I was getting below error:
ImportError Traceback (most recent call last)
<ipython-input-1-53ca6c231f5b> in <module>
14 sys.path.append('../')
15 # from data import VOC_CLASSES
---> 16 from models.ssd_new_mobilenet_FFA import build_ssd
~/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/models/ssd_new_mobilenet_FFA.py in <module>
3 import torch.nn.functional as F
4 from torch.autograd import Variable
----> 5 from layers import *
6 from data import v2
7 import os
~/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/__init__.py in <module>
----> 1 from .functions import *
2 from .modules import *
~/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/functions/__init__.py in <module>
----> 1 from .detection import Detect
2 from .prior_box import PriorBox
3
4
5 __all__ = ['Detect', 'PriorBox']
~/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/functions/detection.py in <module>
4 from torch.autograd import Function
5 from torch.autograd import Variable
----> 6 from ..box_utils import decode_v2, nms_new, nms_new_gpu, nms_old
7 from data import v2 as cfg
8
~/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/box_utils.py in <module>
283
284
--> 285 from ._ext import nms
286
287 def nms_new(boxes, scores, overlap=0.5, top_k=200):
~/code/python/proj/live_video_process/pytorch/hand_det_orient/hand_detection-master/layers/_ext/nms/__init__.py in <module>
1
2 from torch.utils.ffi import _wrap_function
----> 3 from ._nms import lib as _lib, ffi as _ffi
4
5 __all__ = []
ImportError: ../layers/_ext/nms/_nms.so: undefined symbol: __gxx_personality_v0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.