# HumanDetectionUsingDepth **Repository Path**: uniubi-opensource/HumanDetectionUsingDepth ## Basic Information - **Project Name**: HumanDetectionUsingDepth - **Description**: This is an implementation of a series human detection algorithms which use depth images. - **Primary Language**: C++ - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2022-03-28 - **Last Updated**: 2024-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 简介 该项目是一系列用深度图进行人体检测的一些机器学习方法的实现,主要方法是通过传统特征算子提取特征,然后训练SVM分类器,通过多尺度滑窗的方式处理整幅图像。 ![image](imgs/1.png) ![image](imgs/2.png) ## 包括的论文 **HDD:** Wu S, Yu S, Chen W. An attempt to pedestrian detection in depth images[C]//Intelligent Visual Surveillance (IVS), 2011 Third Chinese Conference on. IEEE, 2011: 97-100. **SLTP:** Yu S, Wu S, Wang L. Sltp: A fast descriptor for people detection in depth images[C]//Advanced Video and Signal-Based Surveillance (AVSS), 2012 IEEE Ninth International Conference on. IEEE, 2012: 43-47. **ELDP:** Zhong F, Zhang J. Face recognition with enhanced local directional patterns[J]. Neurocomputing, 2013, 119: 375-384. **LDP:** Jabid T, Kabir M H, Chae O. Facial expression recognition using local directional pattern (LDP)[C]//2010 IEEE International Conference on Image Processing. IEEE, 2010: 1605-1608. **LTDP:** Shen Y, Hao Z, Wang P, et al. A novel human detection approach based on depth map via Kinect[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops. 2013: 535-541. ## 编译安装 项目依赖OpenCV3, 假设OpenCV位于D://opencv, 则将CMakeLists.txt中OpenCV_DIR设置为此路径,以方便找到OpenCV. 项目目前支持Windows,但只是一些目录操作使用了windows API, 去除这部分后即可用于其他平台。 ``` mkdir build && cd build cmake .. -G "Visual Studio 14 2015 Win64" ``` ## 训练 ### 数据准备 准备正负样本图片,其中正样本目录数据为人体图片,训练时会resize为64x128,负样本为背景图片随机抠图。 在训练时,可将负样本原图(即不包含人体)也输入,在训练过程中可进行误检困难样本的挖掘。 ### 训练 在trainer.cpp中设置样本路径,模型存放路径以及困难样本的保存路径,设置要训练的特征算子方法,即可开始训练。 在一轮训练后,将在负样本原图上执行算法,并将误检的图片加入训练,再进行一次训练。 ## 测试&使用 参考detector.cpp, 输入原图,即可得到预测的检测框。如图: ![image](imgs/1.png)