CURFIL: A GPU Library for Image Labeling with Random Forests

  • Hannes SchulzEmail author
  • Benedikt Waldvogel
  • Rasha Sheikh
  • Sven Behnke
Part of the Communications in Computer and Information Science book series (CCIS, volume 598)


Random forests are popular classifiers for computer vision tasks such as image labeling or object detection. Learning random forests on large datasets, however, is computationally demanding. Slow learning impedes model selection and scientific research on image features. We present an open-source implementation that significantly accelerates both random forest learning and prediction for image labeling of RGB-D and RGB images on GPU when compared to an optimized multi-core CPU implementation. We further use the fast training to conduct hyper-parameter searches, which significantly improves on earlier results on the NYU depth v2 dataset. Our flexible implementation allows to experiment with novel features, such as height above ground, which further increases classification accuracy. curfil prediction runs in real time at VGA resolution on a mobile GPU and has been used as data term in multiple applications.


Random forest Computer vision Image labeling GPU CUDA 


  1. Amit, Y., Geman, D.: Shape quantization and recognition with randomized trees. Neural Comput. 9(7), 1545–1588 (1997)CrossRefGoogle Scholar
  2. Bergstra, J., Bardenet, R., Bengio, Y., Kégl, B., et al.: Algorithms for hyper-parameter optimization. In: Neural Information Processing Systems (NIPS) (2011)Google Scholar
  3. Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  4. Couprie, C., Farabet, C., Najman, L., LeCun, Y.: Indoor semantic segmentation using depth information. The Computing Resource Repository (CoRR) abs/1301.3572 (2013)
  5. Eigen, D., Fergus, R.: Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. arXiv preprint arxiv:1411.4734 (2014)
  6. Gupta, S., Girshick, R., Arbeláez, P., Malik, J.: Learning rich features from RGB-D images for object detection and segmentation. In: Fleet, D., Pajdla, T., Schiele, B., Tuytelaars, T. (eds.) ECCV 2014, Part VII. LNCS, vol. 8695, pp. 345–360. Springer, Heidelberg (2014)Google Scholar
  7. Hermans, A., Floros, G., Leibe, B.: Dense 3D semantic mapping of indoor scenes from RGB-D images. In: International Conference on Robotics and Automation (ICRA). IEEE, Hong Kong, May 2014Google Scholar
  8. Ho, T.: Random decision forests. In: International Conference on Document Analysis and Recognition (ICDAR), vol. 1, pp. 278–282. IEEE (1995)Google Scholar
  9. Lepetit, V., Fua, P.: Keypoint recognition using randomized trees. IEEE Trans. Pattern Anal. Mach. Intell. (PAMI) 28(9), 1465–1479 (2006)CrossRefGoogle Scholar
  10. Lepetit, V., Lagger, P., Fua, P.: Randomized trees for real-time keypoint recognition. In: Conference on Computer Vision and Pattern Recognition (CVPR), vol. 2, pp. 775–781 (2005)Google Scholar
  11. Liao, Y., Rubinsteyn, A., Power, R., Li, J.: Learning random forests on the gpu. In: NIPS Workshop on Big Learning: Advances in Algorithms and Data Management (2013)Google Scholar
  12. Müller, A.C., Behnke, S.: Learning depth-sensitive conditional random fields for semantic segmentation of rgb-d images. In: International Conference on Robotics and Automation (ICRA). IEEE, Hong Kong, May 2014Google Scholar
  13. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., Duchesnay, E.: Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12, 2825–2830 (2011)MathSciNetzbMATHGoogle Scholar
  14. Rodrigues, J., Kim, J., Furukawa, M., Xavier, J., Aguiar, P., Kanade, T.: 6D pose estimation of textureless shiny objects using random ferns for bin-picking. In: International Conference on Intelligent Robots and Systems (IROS), pp. 3334–3341. IEEE (2012)Google Scholar
  15. Schulz, H., Höft, N., Behnke, S.: Depth and height aware semantic RGB-D perception with convolutional neural networks. In: European Symposium on Artificial Neural Networks (2015)Google Scholar
  16. Sharp, T.: Implementing decision trees and forests on a GPU. In: Forsyth, D., Torr, P., Zisserman, A. (eds.) ECCV 2008, Part IV. LNCS, vol. 5305, pp. 595–608. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  17. Shotton, J., Fitzgibbon, A., Cook, M., Sharp, T., Finocchio, M., Moore, R., Kipman, A., Blake, A.: Real-time human pose recognition in parts from single depth images. In: Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1297–1304 (2011)Google Scholar
  18. Shotton, J., Johnson, M., Cipolla, R.: Semantic texton forests for image categorization and segmentation. In: Conference on Computer Vision and Pattern Recognition (CVPR) (2008)Google Scholar
  19. Silberman, N., Hoiem, D., Kohli, P., Fergus, R.: Indoor segmentation and support inference from RGBD images. In: Fitzgibbon, A., Lazebnik, S., Perona, P., Sato, Y., Schmid, C. (eds.) ECCV 2012, Part V. LNCS, vol. 7576, pp. 746–760. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  20. Slat, D., Lapajne, M.: Random Forests for CUDA GPUs. Ph.D. thesis, Blekinge Institute of Technology (2010)Google Scholar
  21. Stückler, J., Birešev, N., Behnke, S.: Semantic mapping using object-class segmentation of RGB-D images. In: International Conference on Intelligent Robots and Systems (IROS), pp. 3005–3010. IEEE (2012)Google Scholar
  22. Stückler, J., Waldvogel, B., Schulz, H., Behnke, S.: Dense real-time mapping of object-class semantics from RGB-D video. J. Real-Time Image Process. 10, 599–609 (2013)CrossRefGoogle Scholar
  23. Van Essen, B., Macaraeg, C., Gokhale, M., Prenger, R.: Accelerating a random forest classifier: Multi-core, GP-GPU, or FPGA? In: International Symposium on Field-Programmable Custom Computing Machines (FCCM). IEEE (2012)Google Scholar
  24. Viola, P., Jones, M.: Rapid object detection using a boosted cascade of simple features. In: Conference on Computer Vision and Pattern Recognition (CVPR) (2001)Google Scholar
  25. Wehenkel, L., Pavella, M.: Decision trees and transient stability of electric power systems. Automatica 27(1), 115–134 (1991)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Hannes Schulz
    • 1
    Email author
  • Benedikt Waldvogel
    • 1
  • Rasha Sheikh
    • 1
  • Sven Behnke
    • 1
  1. 1.Autonomous Intelligent Systems, Computer Science Institute VIUniversity of BonnBonnGermany

Personalised recommendations