menghao666 / minimal-hand-pytorch Goto Github PK
View Code? Open in Web Editor NEWPyTorch reimplementation of minimal-hand (CVPR2020)
License: MIT License
PyTorch reimplementation of minimal-hand (CVPR2020)
License: MIT License
Hello, how should this error be corrected
Traceback (most recent call last):
File "D:/Work/writing/Minimal-Hand-pytorch-main/Minimal-Hand-pytorch-main/demo.py", line 60, in
hand_verts, j3d_recon = mano(pose0, shape.float())
File "D:\software\anaconda\envs\yolov5\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Work\writing\Minimal-Hand-pytorch-main\Minimal-Hand-pytorch-main\manopth\manolayer.py", line 196, in forward
root_trans = th_with_zeros(torch.cat([root_rot, root_j], 2))
RuntimeError: All input tensors must be on the same device. Received cuda:0 and cpu
I find only five fingertips are used in these two datasets. Is this a common practice?
This original paper said they use these five joints for global scale and translation alignment, but did not mention that they just use these five joints for evaluation. Why not evaluate all 21 joints after alignment?
delta_map = kin_chain[:, :, np.newaxis, np.newaxis].repeat(32, axis=-2).repeat(32, axis=-1)
It seems to make the value in W/H the same. is it right? We only need to train the corresponding position of the groundtruth. But we find the position of maximum value of the predicted heatmap to match the groundthuth.
as in
Minimal-Hand-pytorch/utils/AIK.py
Line 102 in 947f29a
Minimal-Hand-pytorch/config.py
Line 126 in 947f29a
it seems the input image is not normalized to [0,1] in the demo.
when I run demo.py, I got the following pro:
File "demo.py", line 40, in <module> weight=1e-5) File "/storage07/wuwenbin02/Projects/minimal-hand/utils/LM_new.py", line 38, in __init__ _, self.joints = self.mano_layer(self.th_pose, self.th_beta) File "/storage07/wuwenbin02/anaconda3/envs/minimal-hand-torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/storage07/wuwenbin02/anaconda3/envs/minimal-hand-torch/lib/python3.7/site-packages/manopth/manolayer.py", line 183, in forward th_betas.transpose(1, 0)).permute( RuntimeError: size mismatch, m1: [2334 x 10], m2: [48 x 1] at /opt/conda/conda-bld/pytorch_1565272271120/work/aten/src/TH/generic/THTensorMath.cpp:752
Hey,
I tried installing the environment, unfortunately, it fails either due to manopth or the MANO models.
Can you help me out? Anything I need to specify differently?
(minimal-hand-torch) muellelu@e130-pc25:~/git/minimal-hand-pytorch$ python demo.py
Traceback (most recent call last):
File "demo.py", line 3, in <module>
from manopth import manolayer
File "/home/AD/muellelu/xconda3/envs/minimal-hand-torch/lib/python3.7/site-packages/manopth/manolayer.py", line 7, in <module>
from mano.webuser.smpl_handpca_wrapper_HAND_only import ready_arguments
File "/home/AD/muellelu/git/minimal-hand-pytorch/mano/webuser/smpl_handpca_wrapper_HAND_only.py", line 137
print 'FINITO'
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('FINITO')?
(minimal-hand-torch) muellelu@e130-pc25:~/git/minimal-hand-pytorch$
Hi, thanks for your great work.
I think there is a small bug at
Minimal-Hand-pytorch/model/detnet/detnet.py
Line 136 in ab9768c
If the batch size is equal to 1, the first dimension will also be squeezed.
I think it should be squeeze(2) instead of squeeze().
Thank you.
hello , there are three questions
1.your data is STB datasets I cant open the website,can you send my email ([email protected])? thank you!
2.another file data “dexter+object” is different of data structure see the follow picture.
in my unzip file "dexter+object",there is missing file "bbox_dexter+object.csv" and "Do_pred_2d.npy"。
3.in code demo.py -"check_point = torch.load('new_check_point/ckp_detnet_83.pth', map_location=device)"
run demo.py ,then result:Traceback (most recent call last):
File "G:/Minimal-Hand-pytorch-main/demo.py", line 16, in
check_point = torch.load('new_check_point/ckp_detnet_83.pth', map_location=device)
File "G:\software-setup\python 3.6.7-setup\lib\site-packages\torch\serialization.py", line 366, in load
load model start
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'new_check_point/ckp_detnet_83.pth'
"new_check_point/ckp_detnet_83.pth" the file i don't find it.
please answer this .thank you !
I try to run the demo.py
, but get the following errors:
load model start
load model finished
start opencv
opencv finished
Traceback (most recent call last):
File "demo.py", line 54, in <module>
hand_verts, j3d_recon = mano(pose0, shape.float())
File "/home/zhy/anaconda3/envs/minimal-hand-torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/home/zhy/anaconda3/envs/minimal-hand-torch/lib/python3.7/site-packages/manopth/manolayer.py", line 188, in forward
self.th_posedirs, th_pose_map.transpose(0, 1)).permute(2, 0, 1)
RuntimeError: Expected object of backend CPU but got backend CUDA for argument #2 'mat2'
How to fix this bug?
Can you tell me that you test on GPU or CPU? THX
based on your experiments log, does analytical IK improves the performance over IKNet?
我不能仅仅用“cmu”数据集去train,在hand143_panopticdb.py中,我发现他们不能正确的使用3D数据
raceback (most recent call last):
File "/ssd3/hfang/Mini-hand2/train_detnet.py", line 547, in
main(parser.parse_args())
File "/ssd3/hfang/Mini-hand2/train_detnet.py", line 160, in main
args=args, loss_all=loss_all
File "/ssd3/hfang/Mini-hand2/train_detnet.py", line 348, in train
am_loss_dm.update(losses['det_dm'].item(), targets['batch_3d_size'].item())
File "/ssd3/hfang/Mini-hand2/utils/eval/evalutils.py", line 26, in update
self.avg = self.sum / self.count
ZeroDivisionError: float division by zero
I find all the link assocaited with STB datasets are miss. Could you provide the link could download STB datasets?
Hi, I am wondering, once the pose and shape parameters are estimated, the absolute scale of the hand model will also be recovered. Does it mean that the network estimates an absolute-scale hand model from a single image?
I am a new hand in this area, is the MANO model scale-independent?
class detnet(nn.Module):
def forward(self, x):
features = self.resnet50(x)
device = x.device
pos_tile = get_pose_tile_torch(features.shape[0]).to(device)
x = torch.cat([features, pos_tile], dim=1)
could you please explain what is the purpose of this pos_tile and why is needed to concat with features?
Hi, on running demo.py, i am getting error
PS D:\KISHAN FILES\Minimal-Hand-pytorch-main> python demo.py
load model start
Traceback (most recent call last):
File "demo.py", line 16, in
check_point = torch.load('new_check_point/ckp_detnet_83.pth', map_location=device)
File "C:\Users\saisr\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\serialization.py", line 579, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\saisr\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\Users\saisr\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'new_check_point/ckp_detnet_83.pth'
where is this .pth file 4?
Hi,
Thanks for this great implementation!
I believe you should drop the requirement for manopth==0.0.1
from your environment.yml
file, as it does not exists in PyPI. Just leave the requirement to install it from its Github project.
I have recently connected the original code to Unity through fast sockets. It looks easier and more powerful than open3d or matplotlib.
Hi, there
I've been trying to run the code but failed, this is the error I get.
el start
load model finished
start opencv
opencv finished
Traceback (most recent call last):
File "C:/Users/1/PycharmProjects/Minimal-Hand-pytorch-main/demo.py", line 55, in
hand_verts, j3d_recon = mano(pose0, shape.float())
File "E:\Users\1\anaconda3\envs\yolo\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\1\PycharmProjects\Minimal-Hand-pytorch-main\manopth\manolayer.py", line 187, in forward
th_v_posed = th_v_shaped + torch.matmul(
RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)
[ WARN:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-n4ekh6o5\opencv\modules\videoio\src\cap_msmf.cpp (435) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
Any ideas as to how to fix this? Thanks in advance
i got that error after trying to run demo.py
line 3 :from manopth import manolayer
ImportError: cannot import name 'manolayer'
under folder manopth i can see only one file (rotproj.py)
hi~have you ever try some other more efficient network which can be run on mobile phone?
Hi!
When I tried using the command 'conda env create --file=environment.yml', it threw me the following error:
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
Do I need to install all these dependencies individually or should the above command have worked as it is?
Please help me out as installing them individually is also not working with pip. Further, let me know if I need to use some package manager other than pip for individual installation.
Thanks in advance!
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.