Giter Club home page Giter Club logo

deep-prior-pp's Introduction

DeepPrior++: Improving Fast and Accurate 3D Hand Pose Estimation

Author: Markus Oberweger [email protected]

Requirements:

  • OS
    • Ubuntu 14.04
    • CUDA 7 + cuDNN 5
  • via Ubuntu package manager:
    • python2.7
    • python-matplotlib
    • python-scipy
    • python-pil
    • python-numpy
    • python-vtk6
    • python-pip
  • via pip install:
    • scikit-learn
    • progressbar
    • psutil
    • theano 0.9
  • Camera driver
    • OpenNI for Kinect
    • DepthSense SDK for Creative Senz3D

For a description of our method see:

M. Oberweger and V. Lepetit. DeepPrior++: Improving Fast and Accurate 3D Hand Pose Estimation. In ICCV Workshop, 2017.

Setup:

  • Put dataset files into ./data (e.g. ICVL, or MSRA (thanks to @geliuhao for providing), or NYU dataset)
  • Goto ./src and see the main file test_realtimepipeline.py how to handle the API
  • Camera interface for the Creative Senz3D is included in ./src/util. Build them with cmake . && make.

Pretrained models:

Download pretrained models for ICVL and NYU dataset.

Datasets:

The ICVL and MSRA dataset is trained for a time-of-flight camera, and the NYU dataset for a structured light camera. The annotations are different. See the papers for it.

D. Tang, H. J. Chang, A. Tejani, and T.-K. Kim. Latent Regression Forest: Structured Estimation of 3D Articulated Hand Posture. In Conference on Computer Vision and Pattern Recognition, 2014.

X. Sun, Y. Wei, S. Liang, X. Tang and J. Sun. Cascaded Hand Pose Regression. In Conference on Computer Vision and Pattern Recognition, 2015.

J. Tompson, M. Stein, Y. LeCun, and K. Perlin. Real-Time Continuous Pose Recovery of Human Hands Using Convolutional Networks. ACM Transactions on Graphics, 33, 2014.

deep-prior-pp's People

Contributors

moberweger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-prior-pp's Issues

The com parameter in cropArea3D function

Hi, @moberweger
Thank you for sharing your great work.
I'm a little confused about the com parameter in cropArea3D function. If I'm not mistaken, it is the center of mass, around which the cube is cropped. But in loadSequence function of Importer (1017 line), the center joint position is passed as the com parameter. It seems a bit difference with what you've done in the paper, which use the center of mass of depth to segment hand.
Since I'd like to follow what you've done in the paper, should I do the cropping like this:
com,size=hd.detect(size=config['cube'])
dpt, M, com = hd.cropArea3D(com=com, size=config['cube'])

Is there guide to install DepthSense SDK

When I build src/util, it reports the error:

**

[ 33%] Building CXX object CMakeFiles/_dscapture.dir/initdepthsense.cxx.o
/fast/junyan/HandPose/deep-prior-pp/src/util/initdepthsense.cxx:36:10: fatal error: DepthSense.hxx: No such file or directory
#include <DepthSense.hxx>
^~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/_dscapture.dir/build.make:86: recipe for target 'CMakeFiles/_dscapture.dir/initdepthsense.cxx.o' failed
make[2]: *** [CMakeFiles/_dscapture.dir/initdepthsense.cxx.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/_dscapture.dir/all' failed
make[1]: *** [CMakeFiles/_dscapture.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

**

Thus, I file the star for help.
It looks like I have not installed DepthSense SDK camera, is there the official guide and corresponding link for such suites?

Thanks

Find one mistake in main_msra15_com_refine.py

main_msra15_com_refine.py line: 86

trainSeqs = [Seq0_1, Seq0_2, Seq1_1, Seq1_2, Seq2_1, Seq2_2, Seq3_1, Seq3_2, Seq4_1, Seq4_2, Seq5_1, Seq5_2, Seq6_1, Seq6_1, Seq7_1, Seq7_2, Seq8_1, Seq8_2]

I think it should be "Seq6_1, Seq6_2"

I have a doubt about the hand detection algorithm.

file: src/util/handdetector.py
function: def detect(self, size=(250, 250, 250), doHandSize=True) -> com, size
line: 606
The main code snippet is as follows:

 M = cv2.moments(contours[c])
cx = int(numpy.rint(M['m10']/M['m00']))
cy = int(numpy.rint(M['m01']/M['m00']))

# crop
xstart = int(max(cx-100, 0))
xend = int(min(cx+100, self.dpt.shape[1]-1))
ystart = int(max(cy-100, 0))
yend = int(min(cy+100, self.dpt.shape[0]-1))

cropped = self.dpt[ystart:yend, xstart:xend].copy()
cropped[cropped < i*dz + self.minDepth] = 0.
cropped[cropped > (i+1)*dz + self.minDepth] = 0.
com = self.calculateCoM(cropped)
if numpy.allclose(com, 0.):
    com[2] = cropped[cropped.shape[0]//2, cropped.shape[1]//2]
com[0] += xstart
com[1] += ystart

I donn't know why com[0] += xstart and com[1] += ystart

Left or right hand detection

Hello, thanks for your code.

I am now trying to use the pre-trained NYU model to track hand's posture from Realsense camera. It seems the code works well on the right hand but does not fit left hand.
Is there any setting I miss?
Thank you very much.

The result is shown below:
image2
image5

PreTrained MSRA model

Hi, @moberweger

Thanks for sharing your work.
I have read your papers and run your project. You already released pretrained models for ICVL and NYU dataset. In your models, there is MSRA_network_prior_0.pkl. This model cannot load in your project. I found this model just have 13 layers. And its size just have 7.9MB.

Can you tell me how to use this model? I want to test your method in MSRA dataset.

Sincerely yours

Pretrained ICVL model for COM

Hi!

My goal is to use main_icvl_com_refine.py. How exactly do I use the pertained model? I see that the model provided (the one that is not simple) has almost 200 layers. There's a method to load the network weights (NetBase.load). However, there's no way to "load" the network architecture itself (the almost 200 layers, not the weights). How do I use net_ICVL_COM_AUGMENT.pkl with main_icvl_com_refine.py? Thank you!

train/test split of the msra15 dataset

HI,

I wonder why “P0” of msra15 dataset is used as both train data and test data in main_msra15_com_refine.py.

And what is the train/test split setting of the pretrained net_MSRA15_COM_AUGMENT.pkl.

NYU testset

Dear @moberweger ,
Thanks for your sharing.
I have downloaded NYU dataset, and there is only one testset.
However, in main_nyu_com_refine.py:
Seq2_1 = di.loadSequence('test_1', docom=True)
Seq2_2 = di.loadSequence('test_2', docom=True)
Could you please tell me where I can find test_1 and test_2.

The error about "ImportError: Skipping parameter for convW0!"

First of all, Thank you very much for the great contribution. Could you help me with my error?
I have tried to use MSRA15 dataset for testing and use MSRA_network_prior_0.pkl and net_MSRA15_COM_AUGMENT.pkl for evaluating. Then I got the error as follow :
Using gpu device 0: GeForce GTX 850M (CNMeM is disabled, cuDNN 5110) /home/john/worksp/deep-prior-pp/src/net/convpoollayer.py:261: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'. pooled_out = pool_2d(input=conv_out, ds=poolsize, ignore_border=True, mode='max') Loading model parameters from ./eval/MSRA_network_prior_0.pkl Possibly not matching network configuration! ...... ..... ...... Traceback (most recent call last): File "test_realtimepipeline.py", line 81, in <module> rtp.processVideo(dev) File "/home/john/worksp/deep-prior-pp/src/util/realtimehandposepipeline.py", line 248, in processVideo self.initNets() File "/home/john/worksp/deep-prior-pp/src/util/realtimehandposepipeline.py", line 121, in initNets self.poseNet = ResNet(numpy.random.RandomState(23455), cfgParams=self.poseNet) File "/home/john/worksp/deep-prior-pp/src/net/resnet.py", line 340, in __init__ self.load(self.cfgParams.loadFile) File "/home/john/worksp/deep-prior-pp/src/net/netbase.py", line 474, in load raise ImportError("Skipping parameter for {}! Shape {} does not fit {}.".format(p.name, p.get_value().shape, v.shape)) ImportError: Skipping parameter for convW0! Shape (32, 1, 5, 5) does not fit (8, 1, 5, 5).
Or anyone found the error same to mine, how do you solve it?
I use theano 0.9.0, cuda 7.5, cudnn 5.1.
Thank you very much. Sincerely,

About the inference speed

hi~
thanks for your job. I have a question about the inference speed.
you display the fps in table 6 in your paper. I want to know the type of GPU,gtx1080 or titanX?
I will look forward to your response。

refineNet

Dear @moberweger

Thanks for sharing your work.
I have read your paper and have some questions about the hand location refinement.
In your paper, it says that you use the ResNet architecture as the refineNet to refine hand location. However, I look into the code(main_myu_posereg_embedding.py) you released,

comref = None # "./eval/NYU_COM_AUGMENT/net_NYU_COM_AUGMENT.pkl"
di = NYUImporter('../data/NYU/', refineNet=comref)

and I realized that you set the refineNet = comref which is None. In my opinion, it means that hand location refinement hasn't been done.
I downloaded the pretrained models and tried to get the net_NYU_COM_AUGMENT.pkl but it seems that it doesn't exsit.

Can you tell me where I can find the net_NYU_COM_AUGMENT.pkl if my opinion was right about the hand location refinement. And It will be appreciated that you can tell me the right answer if I was wrong about the whole refinement things.

Sincerely yours
April

about the openni2 and kinect

hello,after i installed and compiled the openni2, there be question:can't find device.can you tell me,are you only install openni2? did you installed sensorkinect or nite or ros?if there be someone else can tell me this question.i will thank you very much.it have been make confused longtime

Error when compiling compute_output()

I try to use the test_realtimepipeline.py with MSRA15 . I already use the PoseRegNetParams with MSRA_network_prior_0.pkl
poseNetParams = PoseRegNetParams(type=11, nChan=1, wIn=128, hIn=128, batchSize=1,
numJoints=21, nDims=3)
The program fail when compiling compute_output()
Here is the Traceback

['nvcc', '-shared', '-O3', '-Xlinker', '-rpath,/usr/local/cuda-8.0/lib64', '-arch=sm_61', '-m64', '-Xcompiler', '-fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden', '-Xlinker', '-rpath,/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/cuda_ndarray', '-I/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/cuda_ndarray', '-I/usr/local/cuda-8.0/include', '-I/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/sandbox/cuda', '-I/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/numpy/core/include', '-I/home/ducky/anaconda3/envs/python27/include/python2.7', '-I/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof', '-L/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/cuda_ndarray', '-L/home/ducky/anaconda3/envs/python27/lib', '-o', '/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/tmpv0UWaU/ea4e203b6529466794536f8a1bfa77ae.so', 'mod.cu', '-lcudart', '-lcublas', '-lcuda_ndarray', '-lcudnn', '-lpython2.7']
Process Process-3:
Traceback (most recent call last):
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/ducky/Workspace/handpose/deep-prior-pp-master/src/util/realtimehandposepipeline.py", line 182, in threadConsumer
self.initNets()
File "/home/ducky/Workspace/handpose/deep-prior-pp-master/src/util/realtimehandposepipeline.py", line 119, in initNets
self.poseNet.computeOutput(numpy.zeros(self.poseNet.cfgParams.inputDim, dtype='float32'))
File "/home/ducky/Workspace/handpose/deep-prior-pp-master/src/net/netbase.py", line 281, in computeOutput
mode='FAST_RUN', on_unused_input='warn')
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/compile/function.py", line 326, in function
output_keys=output_keys)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/compile/pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/compile/function_module.py", line 1795, in orig_function
defaults)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/compile/function_module.py", line 1661, in create
input_storage=input_storage_lists, storage_map=storage_map)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/link.py", line 699, in make_thunk
storage_map=storage_map)[:3]
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/vm.py", line 1047, in make_all
impl=impl))
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/op.py", line 935, in make_thunk
no_recycling)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/op.py", line 839, in make_c_thunk
output_storage=node_output_storage)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/cc.py", line 1190, in make_thunk
keep_lock=keep_lock)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/cc.py", line 1131, in compile
keep_lock=keep_lock)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/cc.py", line 1586, in cthunk_factory
key=key, lnk=self, keep_lock=keep_lock)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/cmodule.py", line 1159, in module_from_key
module = lnk.compile_cmodule(location)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof/cc.py", line 1489, in compile_cmodule
preargs=preargs)
File "/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/sandbox/cuda/nvcc_compiler.py", line 405, in compile_str
'for cmd', ' '.join(cmd))
Exception: ('The following error happened while compiling the node', GpuDnnConv{algo='small', inplace=True}(GpuContiguous.0, GpuContiguous.0, GpuAllocEmpty.0, GpuDnnConvDesc{border_mode='valid', subsample=(1, 1), conv_mode='conv', precision='float32'}.0, Constant{1.0}, Constant{0.0}), '\n', 'nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 -Xlinker -rpath,/usr/local/cuda-8.0/lib64 -arch=sm_61 -m64 -Xcompiler -fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker -rpath,/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/cuda_ndarray -I/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/cuda_ndarray -I/usr/local/cuda-8.0/include -I/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/sandbox/cuda -I/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/numpy/core/include -I/home/ducky/anaconda3/envs/python27/include/python2.7 -I/home/ducky/anaconda3/envs/python27/lib/python2.7/site-packages/theano/gof -L/home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/cuda_ndarray -L/home/ducky/anaconda3/envs/python27/lib -o /home/ducky/.theano/compiledir_Linux-4.15--generic-x86_64-with-debian-stretch-sid-x86_64-2.7.15-64/tmpv0UWaU/ea4e203b6529466794536f8a1bfa77ae.so mod.cu -lcudart -lcublas -lcuda_ndarray -lcudnn -lpython2.7', "[GpuDnnConv{algo='small', inplace=True}(<CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CDataType{cudnnConvolutionDescriptor_t}>, Constant{1.0}, Constant{0.0})]")

Process finished with exit code 0

Accuracy of Realtime Pipeline

Hi Markus,

Thanks a lot for sharing you code and for explaining in the paper how small changes in the pipeline can significantly improve performance!

I have tested on Linux test_realtimepipeline.py on NUY dataset, using pretrained networks net_NYU_COM_AUGMENT and NYU_network_prior that you have provided. The system compiles and runs without any issues, however the accuracy is a bit lower than in should be, the example results are below:
image

  1. Could you please tell, if this performance expected since test_realtimepipeline.py is not using ground truth bounding box? If not, do not maybe have some suggestions of what could have gone wrong and what should I check?

  2. I have run main_nuy_com_refine.py with net_NYU_COM_AUGMENT and got mean error around 5 mm on the first subject and 11 mm on both subjects, is this the expected performance (just confirming, the results look great)?

  3. I attempted to test main_nuy_posereg_embedding.py, but NYU_EMB_t0nF8mp421fD553h1024_PCA30 network is not in provided in pretrained networks. If possible, could you please share it? (I an not attempting to train it, since there seems to be something wrong in my installation of the system.)

Best regards,
Anastasia

the code be written in tensorflow

Hi, thanks for your code sharing, but because your code is written in theano, but I'm not familiar with it. So I want to ask if you have the code be written in tensorflow ? thank you !

use ICVLImporter and NYUImporter

Hi! Thanks for you code.
I'm intersted in hand pose estimation, I try to use the ICVLImporter and NYUImporter " di = ICVLImporter(basepath)
Seq0 = di.loadSequence('train', ['0'], shuffle=True, rng=rng)
Seq1 = di.loadSequence('test_seq_1')" but I get the error that"FileNotFoundError: [Errno 2] No such file or directory: 'F:/Hand Pose Dataset/ICVL Hand Posture Dataset/Training/train.txt'" I found that there have no such label file in the icvl dataset, just a "labels.txt", it include about 330K lines. And the NYUImporter also has error.
How can I solve it? Can you tell me some details?
Thank you for you helping!

use icvl data

hi i run the test with icvl hand data set and i have this what can i do ??
thanks for helping

File "/home/hand/1/src/data/importers.py", line 313, in loadSequence
inputfile = open(trainlabels)
IOError: [Errno 2] No such file or directory: '../data/ICVL//test_seq_1.txt

the test_seq_1.txt * how can i find that ???

thanks for helping

This is some woring with the code!

This is a error in deep-prior-pp/src/data/transformations.py(line: 117):

from transforms3d.euler import euler2mat
R[:3, :3] = euler2mat(alpha_x, alpha_y, alpha_z, 'rxyz')

I cannot found the transforms3d in this project.
How can I fix it ?

Train msra15 PoseRegNetParams(type=0......

I trained msra15 dataset using main_msra15_posereg_embedding_crossval.py
In line 135, PoseRegNetParams(type=0, type is '0'.

But why when I used the trained model, the type should be '11'?

Thanks!

Can this code run on Kinect v1?

Hi, thank you for your research. I want to run your code on my own computer. My OS is Ubuntu 14.04 and camera is kinect v1. Does your code fit this camera or must be used with Creative Senz3D?

problem? loading ICVL test_seq dataset

Hi, @moberweger
when I want to rerun the main_icvl_com_refine.py, I find the code confusing here.
Seq2 = di.loadSequence('test_seq_1', docom=True) testSeqs = [Seq2] L55
why only load the test_seq_1.txt, I do not know why not load the file seq_2.txt , what is the difference between this two files?

reference point(center point)

Hi, @moberweger
i find other authors use your network to generate reference point(center point) to get a cubic including a hand,and you can tell me where is the network in your code.For example ,i need reference point of MSRA dataset. What should i do

Run the network on the mobile device?

Hi,I am interested in the research and I have a question.
The deepprior++ can run about 30 fps with GTX980Ti, but it is hard to run on mobile device in realtime.
Did you try to use mobilenet or other light network ?

Dataset issue

Hi, thanks for sharing your awesome work.

I wonder your model is only appliable for depth images labeled with the 3D joint locations or I can apply your method for depth images without 3D joint locations?

Thanks

Loading test_1 dataset error

Hi,
I have split the test folder into test_1 and test_2, and the train dataset is loading correctly. But there was error when loading the test_1 part. Can you give me some advice? Thank you very much!

regards,
weiguo

create data
Loading train100%|##########################################################################################################################################################################################|
Loaded 72757 samples.
Save cache data to ./cache//NYUImporter_train_False_gt_300_cache.pkl
Shuffling
Loading train100%|##########################################################################################################################################################################################|
Loaded 72757 samples.
Save cache data to ./cache//NYUImporter_train_False_com_300_cache.pkl
Shuffling
Traceback (most recent call last):
File "main_nyu_com_refine.py", line 55, in
Seq2_1 = di.loadSequence('test_1', docom=True)
File "/home/alex/PhD/DeepPrior/deep-prior-pp-master/src/data/importers.py", line 958, in loadSequence
mat = scipy.io.loadmat(trainlabels)
File "/home/alex/anaconda2/envs/tensorflow/lib/python2.7/site-packages/scipy/io/matlab/mio.py", line 141, in loadmat
MR, file_opened = mat_reader_factory(file_name, appendmat, **kwargs)
File "/home/alex/anaconda2/envs/tensorflow/lib/python2.7/site-packages/scipy/io/matlab/mio.py", line 64, in mat_reader_factory
byte_stream, file_opened = _open_file(file_name, appendmat)
TypeError: 'NoneType' object is not iterable

Other Version for this project

Is there any other version of deep-prior-pp on ubuntu16, cuda9?
(It's not convenient to implement this code on ubuntu14 and cuda7 )

How to choose the right cube sizes?

Hi, I hope you're having a great day. Thank you for the amazing work!

I'm trying to train DeepPrior++ on my own dataset and I'm currently having issues, which I've managed to narrow down to the camera intrinsics numbers and the cube size numbers set in importers.py. I've also noticed that for some datasets the cube sizes change depending on what part of the dataset is being looked at. How do I choose a cube size that will work with my dataset?

Thank you for the help!

Build in ./src/util with cmake . && make, errors happen

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found version "3.5.2") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xc/xzz/deep-prior-pp-master/src/util
Scanning dependencies of target _dscapture
[ 33%] Building CXX object CMakeFiles/_dscapture.dir/depthsense.cxx.o
[ 66%] Building CXX object CMakeFiles/_dscapture.dir/initdepthsense.cxx.o
/home/xc/xzz/deep-prior-pp-master/src/util/initdepthsense.cxx:36:26: fatal error: DepthSense.hxx: No such file or directory
compilation terminated.
CMakeFiles/_dscapture.dir/build.make:86: recipe for target 'CMakeFiles/_dscapture.dir/initdepthsense.cxx.o' failed
make[2]: *** [CMakeFiles/_dscapture.dir/initdepthsense.cxx.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/_dscapture.dir/all' failed
make[1]: *** [CMakeFiles/_dscapture.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

An read error when using the "comref" mode

HeIlo, I found the code's default mode is "com". I want to use the "comref" mode, so I changed
"comref = None
docom = False"
to
"comref = "./eval/NYU_COM_AUGMENT/net_NYU_COM_AUGMENT.pkl"
docom = True"

Then, I got an read error:
Traceback (most recent call last):
File "main_nyu_posereg_embedding.py", line 55, in
Seq1 = di.loadSequence('train', shuffle=True, rng=rng, docom=docom)
File "/home/hyqian/projects/deep-prior-pp/src/data/importers.py", line 975, in loadSequence
self.loadRefineNetLazy(self.refineNet)
File "/home/hyqian/projects/deep-prior-pp/src/data/importers.py", line 180, in loadRefineNetLazy
numJoints=1, nDims=3)
File "/home/hyqian/projects/deep-prior-pp/src/net/scalenet.py", line 132, in init
raise NotImplementedError("not implemented")
NotImplementedError: not implemented

After tracing the source, I found the root cause of the problem is the line 179 in the importers.py:

"comrefNetParams = ScaleNetParams(type=5, nChan=1, wIn=128, hIn=128, batchSize=1, resizeFactor=2,
numJoints=1, nDims=3)"

the "type=5" should be changed to "type=1", did I do the right thing or I still miss somehing?

centers for custom dataset

Hi @moberweger ,

Thank you for the code. I am trying to implement V2V PoseNet algorithm on First-Person Hand Action Benchmark. But they mentioned deep prior++ for center extraction.

I am trying to calculate centers for First-Person Hand Action Benchmark. I am ran MSRA15_com_refine.py file and I am not sure at which point it results Center points.
Please send a pointer at which I can get centers.

Thank you for your help!

Pretrained ICVL and NYU accuracy

When I evaluate the pre-trained models for the ICVL and NYU datasets using main_icvl_posereg_embedding.py and main_nyu_posereg_embedding.py, I get the mean errors 6.41 mm and 4.1 mm whereas at your paper you have mean errors 8.1 and 12.3 mm, respectively. I was wondering whether the estimator has been improved or how it could happen?

PS I use the code as follows:

rng = np.random.RandomState(23455)

print("create data")
aug_modes = ['com', 'rot', 'none']  # 'sc',

comref = None  # "./eval/ICVL_COM_AUGMENT/net_ICVL_COM_AUGMENT.pkl"
docom = False

di = ICVLImporter('../data/ICVL/', refineNet=comref, cacheDir='/home/mahdi/HVR/git_repos/deep-prior-pp/src/cache')

Seq2 = di.loadSequence('test_seq_2', docom=docom)
testSeqs = [Seq2]

testDataSet = ICVLDataset(testSeqs)
test_data, test_gt3D = testDataSet.imgStackDepthOnly('test_seq_2')


print("create network")
batchSize = 64

poseNetParams = ResNetParams(type=4, nChan=1, wIn=128, hIn=128, batchSize=64, numJoints=16, nDims=3)
poseNetParams.loadFile = "./eval/{}/{}_network_prior.pkl".format(eval_prefix, eval_prefix)
poseNet = ResNet(rng, cfgParams=poseNetParams)


#  test
print("Testing ...")
gt3D = [j.gt3Dorig for j in testSeqs[0].data]
jts_embed = poseNet.computeOutput(test_data)
jts = jts_embed
joints = []
for i in xrange(test_data.shape[0]):
    joints.append(jts[i].reshape((-1, 3)) * (testSeqs[0].config['cube'][2] / 2.) + testSeqs[0].data[i].com)

joints = np.array(joints)

hpe = ICVLHandposeEvaluation(gt3D, joints)
hpe.subfolder += '/' + eval_prefix + '/'
print("Mean error: {}mm, max error: {}mm".format(hpe.getMeanError(), hpe.getMaxError()))
print("{}".format([hpe.getJointMeanError(j) for j in range(joints[0].shape[0])]))
print("{}".format([hpe.getJointMaxError(j) for j in range(joints[0].shape[0])]))

# save results
cPickle.dump(joints,
             open("./eval/{}/result_{}_{}.pkl".format(eval_prefix, os.path.split(__file__)[1], eval_prefix), "wb"),
             protocol=cPickle.HIGHEST_PROTOCOL)

`

Scale augmentation

Hi, @moberweger

Thanks for sharing your work.
After reading your great paper and the code, I have a question about the scaling augmentation. In the paper, you said that "we scale the 3D joint locations according to the random factor". However, I failed to find it in the scaleHand function. It seems that you just made the new_joints3D equal to the joints3D.
Did I missed something here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.