arxiv2017_Face Detection using Deep Learning:An Improved Faster RCNN Approach

本文介绍了一种基于Faster R-CNN的人脸检测方法,该方法在FDDB等数据集上取得了优异的成绩。主要改进包括特征融合、难例挖掘、多尺度训练及预训练策略。实验结果显示,在WIDER FACE数据集上进行预训练并在FDDB数据集上进行微调,能显著提升检测精度。
深图智服人脸检测paper,基于faster rcnn,ranking the best among all the published approaches in FDDB until 2017-01
做了改进策略为:
1 feature concatenation
2 hard negative mining
3 multi-scale training:图像训练多尺度,但是尺度从三个scale里面随机选;增加了随机性;
4 model pretraining:先在wider face上来一波
5 proper calibration of key parameters:anchor尺度增加一个64*64

the VJ framework was the first one to apply rectangular Haar-like features in a cascaded Adaboost classifier for achieving real-time face detection.

因为基于frcnn,所以简单介绍了下frcnn:
1 RPN for generating a list of region proposals which likely contain objects, or called regions of interest (RoIs);
2 a Fast RCNN network for classifying a region of image into objects (and background) and refining the boundaries of those regions.

训练步骤,比较简单的:
1 train the CNN model(VGG16 from imagenet) of Faster RCNN using the WIDER FACE dataset.
2 use the same dataset to test the pre-trained model so as to generate hard negatives.
3 These hard negatives are fed into the network as the second step of our training procedure.----就是说通过2中生成的难例,再在wider face上训练一波;
4 The resulting model will be further fine-tuned on the FDDB dataset.
最终 fine-tuning process,两个小技巧:
1 multi-scale training process
2 feature concatenation strategy
3 将检测的bbox从矩形转换为椭圆形(可选);


feature concatenation strategy:特征融合策略
比较简单:训练+测试的前向操作中,rpn网络得到了roi,原始roi pooling只在conv上做,论文中在conv3、4、5上做(加个L2正则化),然后做一个concate。剩下的操作就是走fast rcnn了;

hard negative mining:只挖掘false positive,OHEM挖掘false positive + false negtive;
multi-scale training:
The Faster RCNN architecture typically adopt a fixed scale for all the training images. FRCNN只使用一个尺度进行训练;论文中用了三个尺度,随机对每张图像用一个尺度做resize,再扔到模型去训练;达到对尺度的不变性;

实验:
wider face中,根据每个人脸的难度赋值,如果困难度大于2,就直接舍弃,不用于训练;图像中有1000个以上的人脸,也不加入训练;anchor数目3*4;
负难例:score > 0.8 & iou with gt < 0.5
训练step3,也就是在fddb上finetune,使用10-fold cross-validation + 多尺度训练(step1 + step 3都使用多尺度);
测试:也是图像多尺度,扔进去做测试;

ablation studies里面很好地说明了本论文中所采用的方法:ID7效果最好


论文参考
1 arxiv2017_Face Detection using Deep Learning:An Improved Faster RCNN Approach

这个错误表明脚本 `raw_arxiv_to_jsonl.py` 需要一个必需的参数 `arxiv_src_dir`,但你在命令行中没有提供它。以下是解决方案和详细说明: --- ### **错误原因** 脚本的调用方式不正确。根据错误提示: - **必需参数**:`arxiv_src_dir`(未提供) - **可选参数**:`--work_dir`、`--num_proc` - **你的命令**: ```bash python data-juicer-main/tools/preprocess/raw_arxiv_to_jsonl.py --src_dir src --target_dir output3 ``` 但脚本可能期望直接传递 `arxiv_src_dir` 作为位置参数,而不是通过 `--src_dir` 标志。 --- ### **正确调用方式** 根据错误信息,脚本的语法应为: ```bash python raw_arxiv_to_jsonl.py ARXIV_SRC_DIR TARGET_DIR [--work_dir WORK_DIR] [--num_proc NUM_PROC] ``` 因此,你需要直接提供 `arxiv_src_dir` 和 `target_dir` 作为位置参数,而不是使用 `--src_dir` 和 `--target_dir` 标志。 #### **修正后的命令** ```bash python data-juicer-main/tools/preprocess/raw_arxiv_to_jsonl.py src output3 ``` 或(如果需要可选参数): ```bash python data-juicer-main/tools/preprocess/raw_arxiv_to_jsonl.py src output3 --work_dir ./work --num_proc 4 ``` --- ### **参数说明** 1. **`arxiv_src_dir`**(必需): - 包含原始ArXiv数据的目录路径(如解压后的ArXiv数据集)。 - 示例:`src/` 目录下应包含ArXiv的 `.tar.gz` 或 `.json` 文件。 2. **`target_dir`**(必需): - 输出JSONL文件的目录路径(如 `output3`)。 3. **`--work_dir`**(可选): - 临时工作目录,默认为 `./work`。 4. **`--num_proc`**(可选): - 并行进程数,默认为 `1`(建议根据CPU核心数调整,如 `4` 或 `8`)。 --- ### **验证数据目录结构** 确保 `src` 目录包含有效的ArXiv数据。例如: ``` src/ ├── arXiv_src_submit_1234567.tar.gz ├── arXiv_src_submit_7654321.tar.gz └── ... ``` 或(如果是已解压的JSON文件): ``` src/ ├── 2301.00001.json ├── 2301.00002.json └── ... ``` --- ### **其他可能问题** 1. **路径问题**: - 如果脚本报错找不到文件,尝试使用绝对路径: ```bash python data-juicer-main/tools/preprocess/raw_arxiv_to_jsonl.py D:/DATAJUICER/src D:/DATAJUICER/output3 ``` 2. **依赖缺失**: - 确保已安装 `data-juicer` 及其依赖(如 `tqdm`、`pandas`): ```bash pip install data-juicer tqdm pandas ``` 3. **查看帮助文档**: - 运行以下命令查看详细参数说明: ```bash python data-juicer-main/tools/preprocess/raw_arxiv_to_jsonl.py --help ``` --- ### **总结步骤** 1. 检查 `src` 目录是否包含有效的ArXiv数据。 2. 使用正确的命令格式: ```bash python raw_arxiv_to_jsonl.py src output3 [--work_dir ./work --num_proc 4] ``` 3. 如果仍有问题,提供完整的错误日志和目录结构以便进一步排查。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值