Two-stream convolutional neural network for accurate RGB-D ...

5
arXiv:1612.07978v1 [cs.CV] 23 Dec 2016 TWO-STREAM CONVOLUTIONAL NEURAL NETWORK FOR ACCURATE RGB-D FINGERTIP DETECTION USING DEPTH AND EDGE INFORMATION Hengkai Guo, Guijin Wang, Xinghao Chen Department of Electronic Engineering Tsinghua University, Beijing ABSTRACT Accurate detection of fingertips in depth image is critical for human-computer interaction. In this paper, we present a novel two-stream convolutional neural network (CNN) for RGB-D fingertip detection. Firstly edge image is extracted from raw depth image using random forest. Then the edge information is combined with depth information in our CNN structure. We study several fusion approaches and suggest a slow fu- sion strategy as a promising way of fingertip detection. As shown in our experiments, our real-time algorithm outper- forms state-of-the-art fingertip detection methods on the pub- lic dataset HandNet with an average 3D error of 9.9mm, and shows comparable accuracy of fingertip estimation on NYU hand dataset. Index TermsConvolutional Neural Network, Two- stream, Fingertip Detection, Edge detection, RGB-D imaging 1. INTRODUCTION Hand pose estimation from depth image [1] [2] is critical for human-computer interaction [3], and has been studied exten- sively in recently years [4] [5] [6] [7]. Among all the joints of hand, fingertips play an important role in interaction, which are related to lots of gestures such as swipe and tap [8]. In the meanwhile, fingertip positions are often the most difficult to learn due to various hand poses, large self-occlusion and poor depth recovery near fingertips [9]. Most of existing ap- proaches [10] [4] [5] [6] [7] rely on the topology structure of hand, leading to relative large error on fingertips (often larger than 1cm) due to error accumulation from palm to fingertip. To solve these problems, we propose a new method for ac- curate detection of fingertip positions based on convolutional neural network (CNN). Different from earlier works that em- ploy only depth image as input [11] [9] [7], we take advantage of both depth information and edge information from depth image (See Fig.1). We employ random forest (RF) to extract edges as in [12]. Then we investigate a different architec- ture based on two separate streams with both depth and edge images, which are then combined by fusion strategy. After comparison with different CNN structures and fusion strate- gies, a deep structure with slow fusion is chosen for precise fingertip detection. We will show that such strategy is able to improve fingertip estimation performance. Evaluated on two public datasets [13][9], our method outperforms other state- of-the-art algorithms with a 3D error of 9.9mm on fingertips, and obtains comparable performance on the challenging NYU hand dataset. Fig. 1. Depth image (left) and edge image (middle) of hand from HandNet[13] dataset. The red circles in the image (right) are the predicted fingertips with our algorithm. 2. RELATED WORK We briefly review the previous works that are related to our work, including hand pose estimation, edge detection and CNN on hand pose and fingertip regression. Hand pose estimation. State-of-the-art algorithms can be roughly divided into two categories: generative methods and discriminative methods. Generative methods adopt particle swarm optimization (PSO) [14] [3] or gradient descent [15] to optimize the energy function based on hand model. They all require initialization from either former frames [15] or coarse pose estimation [14] [3]. Discriminative methods directly predict the positions of hand joints from images. Among them, RF is popular with hierarchical hand structure: from wrist to fingertip [4] [6], or from whole to local [10] [5]. While such methods are robust to complex articulations, they may suffer from error accumulation on fingertips. Our work focuses on more accurate fingertip detection for better human interaction with depth imaging [16]. Edge information. Edges have been applied in high-level vision tasks such as object detection and object proposal gen- eration [17], which can be easily extracted with forest [12] or

Transcript of Two-stream convolutional neural network for accurate RGB-D ...

Page 1: Two-stream convolutional neural network for accurate RGB-D ...

arX

iv:1

612.

0797

8v1

[cs.

CV

] 23

Dec

201

6

TWO-STREAM CONVOLUTIONAL NEURAL NETWORK FOR ACCURATE RGB- DFINGERTIP DETECTION USING DEPTH AND EDGE INFORMATION

Hengkai Guo, Guijin Wang, Xinghao Chen

Department of Electronic EngineeringTsinghua University, Beijing

ABSTRACT

Accurate detection of fingertips in depth image is critical forhuman-computer interaction. In this paper, we present a noveltwo-stream convolutional neural network (CNN) for RGB-Dfingertip detection. Firstly edge image is extracted from rawdepth image using random forest. Then the edge informationis combined with depth information in our CNN structure.We study several fusion approaches and suggest a slow fu-sion strategy as a promising way of fingertip detection. Asshown in our experiments, our real-time algorithm outper-forms state-of-the-art fingertip detection methods on the pub-lic dataset HandNet with an average 3D error of 9.9mm, andshows comparable accuracy of fingertip estimation on NYUhand dataset.

Index Terms— Convolutional Neural Network, Two-stream, Fingertip Detection, Edge detection, RGB-D imaging

1. INTRODUCTION

Hand pose estimation from depth image [1] [2] is critical forhuman-computer interaction [3], and has been studied exten-sively in recently years [4] [5] [6] [7]. Among all the jointsofhand, fingertips play an important role in interaction, whichare related to lots of gestures such as swipe and tap [8]. Inthe meanwhile, fingertip positions are often the most difficultto learn due to various hand poses, large self-occlusion andpoor depth recovery near fingertips [9]. Most of existing ap-proaches [10] [4] [5] [6] [7] rely on the topology structure ofhand, leading to relative large error on fingertips (often largerthan 1cm) due to error accumulation from palm to fingertip.

To solve these problems, we propose a new method for ac-curate detection of fingertip positions based on convolutionalneural network (CNN). Different from earlier works that em-ploy only depth image as input [11] [9] [7], we take advantageof both depth information and edge information from depthimage (See Fig.1). We employ random forest (RF) to extractedges as in [12]. Then we investigate a different architec-ture based on two separate streams with both depth and edgeimages, which are then combined by fusion strategy. Aftercomparison with different CNN structures and fusion strate-gies, a deep structure with slow fusion is chosen for precise

fingertip detection. We will show that such strategy is able toimprove fingertip estimation performance. Evaluated on twopublic datasets [13][9], our method outperforms other state-of-the-art algorithms with a 3D error of 9.9mm on fingertips,and obtains comparable performance on the challenging NYUhand dataset.

Fig. 1. Depth image (left) and edge image (middle) of handfrom HandNet[13] dataset. The red circles in the image(right) are the predicted fingertips with our algorithm.

2. RELATED WORK

We briefly review the previous works that are related to ourwork, including hand pose estimation, edge detection andCNN on hand pose and fingertip regression.Hand pose estimation. State-of-the-art algorithms can beroughly divided into two categories: generative methods anddiscriminative methods. Generative methods adopt particleswarm optimization (PSO) [14] [3] or gradient descent [15] tooptimize the energy function based on hand model. They allrequire initialization from either former frames [15] or coarsepose estimation [14] [3]. Discriminative methods directlypredict the positions of hand joints from images. Amongthem, RF is popular with hierarchical hand structure: fromwrist to fingertip [4] [6], or from whole to local [10] [5].While such methods are robust to complex articulations, theymay suffer from error accumulation on fingertips. Our workfocuses on more accurate fingertip detection for better humaninteraction with depth imaging [16].Edge information. Edges have been applied in high-levelvision tasks such as object detection and object proposal gen-eration [17], which can be easily extracted with forest [12]or

Page 2: Two-stream convolutional neural network for accurate RGB-D ...

CNN [18]. Edge information has also been implicitly usedfor extracting shape context feature in human pose estimation[19] [20]. To the best of our knowledge, this is the first workto learn features from edges using CNN for joint regression.Convolutional neural network. Recently CNN structurehas been employed for hand pose regression and fingertip de-tection. For hand pose estimation, Tompson et al. [9] useCNN to produce heat maps with the 2D joint positions, andthen infer the 3D hand pose with inverse kinematics. Ober-weger et al. [11] regress the hand pose with multi-scale andmulti-stage CNN using pose prior. In [7] three CNNs areused separately for initialization, generation of depth imageand pose updating. For fingertip detection, Wetzler et al. [13]employ CNN for in-plane derotation of hand depth image andthen use RF or CNN for fingertip estimation. In [21], CNNsare designed to perform hand detection and index fingertip re-gression in egocentric RGB images. Different from previousCNN-based methods, our algorithm combines depth imagewith edge image using a two-stream CNN structure, whichimproves the accuracy of fingertip detection.

3. MODELS

Fig. 2 shows an overview of our algorithm. Given a depthimage, hand region is first cropped and resized to96 × 96 asin [13]. Then a pre-trained RF on NYU Depth dataset [22]is applied for edge detection from the cropped depth image(see [12] for details of edge algorithm). Finally, a two-streamCNN regresses fingertip and palm positions using depth andedge information.

We next discuss the architecture of our two-stream CNNin details. This is followed by a description of algorithm im-plementation.

3.1. Network Architecture

To exploit the information of depth and edge, we investigateseveral strategies to fuse two-stream images, which are differ-ent in when to fuse. We first describe a baseline single-streamCNN and then discuss its extensions according to differenttypes of fusion, including enhance fusion, early fusion, slowfusion, late fusion, and result fusion.Single-stream. We utilize a single-stream baseline ar-chitecture (Fig. 3(a)) to understand the contribution ofeach information. Using shorthand notation, the networkis C1(24, 5) − P1 − C2(24, 3) − C3(24, 3) − C4(24, 3) −C5(24, 3) − P2 − C6(32, 3) − C7(32, 3) − C8(48, 3) −

C9(48, 3) − C10(48, 3) − P3 − C11(96, 3) − C12(128, 3)−P4−FC1(1024)−FC2(1024)−FC3(18), whereC(d, f) in-dicates a convolutional layer withd filters of spatial sizef×f

when all the strides are 1.FC(n) is a fully connected layerwith n nodes. All the pooling layersP are non-overlappingmax-pooling in2 × 2 regions and each convolutional layeris followed by a Rectified Linear Unit (ReLU) layer. The

Fig. 2. Overview of our algorithm. Edge image is detectedfrom depth image using RF (left). Then both the depth andedge image are sent into two-stream CNN to obtain the palmand fingertip positions.

output ofFC3 is an 18-element vector with the 3D positionsof fingertips and palm.Enhance fusion. The enhance fusion model shares the samestructure with single-stream model, but with a different inputformulated as:

Ienhance = 0.8Idepth + 0.2Iedge (1)

whereIdepth andIedge represent the depth image and edgeimage respectively. This can be seen as one kind of imagesharpening, emphasizing the edges in depth image.Early fusion. The early fusion extension combines depthimage and edge image immediately as a double-channel im-age, and also uses the same structure of single-stream model(Fig.3(b)). The early concatenation allows the network tolearn different low-level filters for each information and thenfusion them for better estimation.Late fusion. The late fusion model employs two separatesingle-stream networks up toC12 layer with shared weights,and then merges them in the first fully connected layer (seeFig.3(c)). Therefore, they share the same feature pattern toavoid overfitting for feature learning.Slow fusion. The slow fusion strategy is a balanced mixturebetween early fusion and late fusion. While sharing first fiveconvolutional layers for low-level feature extraction, the two-stream networks are merged inC6 layer for high-level fusionas in Fig.3(d).Result fusion. The result fusion model simply applies two

Page 3: Two-stream convolutional neural network for accurate RGB-D ...

(a) Basic network (b) Early fusion network

(c) Late fusion network (d) Slow fusion network

Fig. 3. Different network structures for fingertip detection.C denotes a convolutional layer with the number of filters and thefilter size in the boxes, which is followed by a Rectified Linear Unit layer.P denotes a max-pooling layer with the pooling size.FC denotes a fully connected layer with the number of neurons.

separate single-stream networks on depth image and edge im-age without shared parameters. The predicted positions areaveraged for final results.

3.2. Implementation details

For edge detection, we adopt the public Matlab implementa-tion in [12] with their pre-trained depth model. For fingertipdetection, we use Caffe [23] to train the CNNs on a NvidiaTitan X GPU. We train the different architectures by mini-mizing the Euclidean loss between the prediction and groundtruth using a batch size of 196 and learning rate of 0.01. Allthe networks converge within 400000 iterations. Similar to[13], we do not perform any data augmentation during train-ing.

4. RESULTS

Experiments in this work are conducted on the HandNet fin-gertip dataset [13] and NYU Hand dataset [9], following thesettings in [13]. Mean precision (mP) as defined in [13] andmean 3D error of fingertips (errf ) is evaluated for each al-gorithm. Because no confidence score is predicted from ourmethod, we do not calculate mAP as in [13]. Running timeis also computed in the same environment with an Intel i7-4790 CPU, which has considered the time for edge detection.We first investigate different designs of network architectureon the HandNet dataset. Then we compare with the state-of-the-art methods on both datasets to show the efficiency of ouralgorithms.

Table 1. Result of different methods on the HandNet[13] testset. mP values indicate the mean precision defined in [13].errf means the average 3D error of fingertips. Time indicatesthe running time for single image.

Method mP errf /mm time/msCNN-depth-shallow 0.744 11.9 4.98CNN-depth-median 0.775 11.1 6.54CNN-depth-deep 0.816 10.0 8.02CNN-edge-deep 0.562 16.6 31.25

CNN-depth-deep-finger 0.803 10.4 8.05CNN-fusion-enhance 0.786 10.8 32.34

CNN-fusion-early 0.772 11.5 32.26CNN-fusion-late 0.801 10.6 50.21

CNN-fusion-result 0.776 11.1 33.32CNN-fusion-slow 0.820 9.9 37.04

Network depth. To study the effect of network depth,two single-stream networks with shallow and median depth(CNN-depth-shallow and CNN-depth-median) are involvedwith the similar architecture of single-stream baseline CNN(CNN-depth-deep). The median CNN removes three layersC5, C10 and C12 comparing with the deep one. And theshallow CNN further takes off two layers C11 and P4 whenchanging the stride of C8 to 2 with to the median one. Theresults (the first three rows in the second group in Table. 4)show that the performance can be significantly improved byincluding more layers (1.9mm error dropped from shallowCNN to deep CNN), because deeper structures help to form

Page 4: Two-stream convolutional neural network for accurate RGB-D ...

high-level features and obtain a larger receptive fields onoriginal image.Contributions of edges and palm position. Single-streamdepth-based CNN (CNN-depth-deep) and edge-based CNN(CNN-edge-deep) are implemented to investigate the impor-tance of different information sources. A CNN with the samearchitecture but regresses only fingertip positions is alsoin-cluded to study the influence of palm position prediction.From Table. 1 and Fig. 4, our two-stream slow-fusion CNN(CNN-fusion-slow) outperforms all the single-stream archi-tectures on mP and mean error of fingertips. And there is awide gap between depth-based and edge-based single-streamCNNs, because of the information loss from raw imagesto edges. Surprisingly, we observe an error drop (0.4mm)when training to predict only fingertip positions withoutpalm. While detecting the palm may add slight burden forthe network, the palm position itself is a strong prior to thefingertips, which is learned by CNN for better regression offingertips.Fusion strategies. Different fusion approaches are alsocompared in our experiments. The slow-fusion structureachieves the highest mP and the lowest mean error among allthe methods as shown in the last group in Table. 4, whichindicates that the edge image and depth image may share sim-ilar low-level features and have diverse high-level features.So too early or late for feature fusion may deteriorate theperformance of networks.Comparison with state-of-the-arts. Table.2 shows the re-sults. For HandNet dataset, we compare our methods withrandom decision tree (RDT) and CNN algorithms in [13] ontheir provided results. Our methods outperform all the state-of-the-art approaches with a large margin in mP from 0.63(RDT) or 0.61 (CNN) to 0.82 when no data augmentation isapplied as in [13]. Moreover, the slow-fusion structure ob-tains an average 3D error of 9.9mm on fingertip prediction,which is nearly half of that in [13] and is smaller than thedistance between adjacent fingertips [13]. For NYU dataset,our two-stream method is better than all the other CNN-basedalgorithms with 19.3mm errors on fingertips. However, RDTseems to handle such dataset better than CNNs. This maybecause the dataset enrolls single subject for training andtwoanother subjects for testing, which makes CNN easier to over-fit on training data.Timing. In Table. 1, all our methods provide acceptablespeed on CPU for real-time fingertip detection. While thesingle-stream depth-based CNN performs up to over 125 fps,the two-stream slow-fusion architecture reaches 25 fps, whichis enough for real-time application.

5. CONCLUSION

We propose an effective two-stream convolutional networkfor RGB-D fingertip detection. Edge information is slowlyfused with depth information to achieve better accuracy for

Table 2. Result of different methods on the HandNet[13] andNYU [9] test set. mP values indicate the mean precision de-fined in [13]. errf means the average 3D error of fingertip(for methods in [13]. we discard all the undefined resultswhose errors are larger than 30cm).

Dataset Method mP errf /mm

HandNetRDT-DeROT[13] 0.63 18.6CNN-DeROT[13] 0.61 23.4CNN-fusion-slow 0.82 9.9

NYU

RDT-DeROT[13] 0.63 -CNN-DeROT[13] 0.49 -

CNN-DeepPrior[11] 0.43 26.4CNN-Feedback[7] 0.38 23.2CNN-fusion-slow 0.50 19.3

Fig. 4. Mean precision under different thresholds for pro-posed method and other algorithms.

regression. By evaluation on HandNet dataset, we found thatdeep structure, two-stream information, slow-fusion strategyand palm constraint are the key factors for precise fingertipestimation. Our method significantly improves the predictionperformance of state-of-the-art methods. Next we will applythe same idea on full hand pose estimation [7] or human poseestimation [20]. Learning when to fuse instead of manual de-sign is also a promising direction for our work.Acknowledgments. This work is supported by The Na-tional Science Foundation of China (No. 61271390), andState High-Tech Development Plan (No. 2015AA016304).

6. REFERENCES

[1] Guijin Wang, Xuanwu Yin, Xiaokang Pei, and ChenboShi, “Depth estimation for speckle projection system us-ing progressive reliable points growing matching,”Ap-plied optics, vol. 52, no. 3, pp. 516–524, 2013.

[2] Xuanwu Yin, Guijin Wang, Chenbo Shi, and Qingmin

Page 5: Two-stream convolutional neural network for accurate RGB-D ...

Liao, “Efficient active depth sensing by laser speckleprojection system,”Optical Engineering, vol. 53, no. 1,pp. 013105–013105, 2014.

[3] Toby Sharp, Cem Keskin, Duncan Robertson, JonathanTaylor, Jamie Shotton, David Kim Christoph Rhe-mann Ido Leichter, Alon Vinnikov Yichen Wei, DanielFreedman Pushmeet Kohli Eyal Krupka, AndrewFitzgibbon, and Shahram Izadi, “Accurate, robust, andflexible real-time hand tracking,” inProc. CHI, 2015,vol. 8.

[4] Xiao Sun, Yichen Wei, Shuang Liang, Xiaoou Tang, andJian Sun, “Cascaded hand pose regression,” inProceed-ings of the IEEE Conference on Computer Vision andPattern Recognition, 2015, pp. 824–832.

[5] Peiyi Li, Haibin Ling, Xi Li, and Chunyuan Liao, “3dhand pose estimation using randomized decision forestwith segmentation index points,” inEuropean Confer-ence on Computer Vision, 2015.

[6] Danhang Tang, Jonathan Taylor, Pushmeet Kohli, CemKeskin, Tae-Kyun Kim, and Jamie Shotton, “Openingthe black box: Hierarchical sampling optimization forestimating human hand pose,” inEuropean Conferenceon Computer Vision, 2015.

[7] Markus Oberweger, Paul Wohlhart, and Vincent Lepetit,“Training a feedback loop for hand pose estimation,” inEuropean Conference on Computer Vision, 2015.

[8] Giulio Marin, Fabio Dominio, and Pietro Zanuttigh,“Hand gesture recognition with leap motion and kinectdevices,” inImage Processing (ICIP), 2014 IEEE Inter-national Conference on. IEEE, 2014, pp. 1565–1569.

[9] Jonathan Tompson, Murphy Stein, Yann Lecun, and KenPerlin, “Real-time continuous pose recovery of humanhands using convolutional networks,”ACM Transac-tions on Graphics (TOG), vol. 33, no. 5, pp. 169, 2014.

[10] Danhang Tang, Hyung Jin Chang, Alykhan Tejani, andTae-Kyun Kim, “Latent regression forest: Structuredestimation of 3d articulated hand posture,” inComputerVision and Pattern Recognition (CVPR), 2014 IEEEConference on. IEEE, 2014, pp. 3786–3793.

[11] Markus Oberweger, Paul Wohlhart, and Vincent Lepetit,“Hands deep in deep learning for hand pose estimation,”Computer Vision Winter Workshop, 2015.

[12] Piotr Dollar and C Lawrence Zitnick, “Structuredforests for fast edge detection,” inComputer Vision(ICCV), 2013 IEEE International Conference on. IEEE,2013, pp. 1841–1848.

[13] Aaron Wetzler, Ron Slossberg, and Ron Kimmel, “Ruleof thumb: Deep derotation for improved fingertip detec-tion,” in British Machine Vision Conference, 2015.

[14] Chen Qian, Xiao Sun, Yichen Wei, Xiaoou Tang, andJian Sun, “Realtime and robust hand tracking fromdepth,” in Computer Vision and Pattern Recognition(CVPR), 2014 IEEE Conference on. IEEE, 2014, pp.1106–1113.

[15] Srinath Sridhar, Franziska Mueller, Antti Oulasvirta,and Christian Theobalt, “Fast and robust hand trackingusing detection-guided optimization,” inProceedings ofthe IEEE Conference on Computer Vision and PatternRecognition, 2015, pp. 3213–3221.

[16] Chenbo Shi, Guijin Wang, Xuanwu Yin, Xiaokang Pei,Bei He, and Xinggang Lin, “High-accuracy stereomatching based on adaptive ground control points,”Im-age Processing, IEEE Transactions on, vol. 24, no. 4,pp. 1412–1423, 2015.

[17] Yonggang Qi, Yi-Zhe Song, Tao Xiang, HonggangZhang, Timothy Hospedales, Yi Li, and Jun Guo, “Mak-ing better use of edges via perceptual grouping,” inPro-ceedings of the IEEE Conference on Computer Visionand Pattern Recognition, 2015, pp. 1856–1865.

[18] Saining Xie and Zhuowen Tu, “Holistically-nested edgedetection,”arXiv preprint arXiv:1504.06375, 2015.

[19] Zhenning Li and Dana Kulic, “Local shape contextbased real-time endpoint body part detection and identi-fication from depth images,” inComputer and Robot Vi-sion (CRV), 2011 Canadian Conference on. IEEE, 2011,pp. 219–226.

[20] Li He, Guijin Wang, Qingmin Liao, and Jing-Hao Xue,“Depth-images-based pose estimation using regressionforests and graphical models,”Neurocomputing, vol.164, pp. 210–219, 2015.

[21] Xiaorui Liu, Yichao Huang, Xin Zhang, and LianwenJin, “Fingertip in the eye: A cascaded cnn pipeline forthe real-time fingertip detection in egocentric videos,”arXiv preprint arXiv:1511.02282, 2015.

[22] Pushmeet Kohli Nathan Silberman, Derek Hoiem andRob Fergus, “Indoor segmentation and support infer-ence from rgbd images,” inECCV, 2012.

[23] Yangqing Jia, Evan Shelhamer, Jeff Donahue, SergeyKarayev, Jonathan Long, Ross Girshick, Sergio Guadar-rama, and Trevor Darrell, “Caffe: Convolutional ar-chitecture for fast feature embedding,”arXiv preprintarXiv:1408.5093, 2014.