add dali image iterator for arcface #1339
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
nvidia-dali 从入门到放弃
安装
官方文档:https://docs.nvidia.com/deeplearning/dali/user-guide/docs/installation.html
我用的是 cuda101,按照 CUDA 10 的方式安装:
参考例程
转换训练数据
因为原始的数据头尾都带有一些信息,无法用作训练,暂时还不知道咋用 dali 把头尾数据解析出来,就直接暴力去掉了。
修改文件
dali_convert_rec.py
(见附件)内参数:path_imgrec
path_rec
path_idx
, 然后运行:测试
修改文件
recognition/ArcFace/dali_image_iter.py
内参数path_imgrec
路径后, 运行该文件:只增加了随机镜像的增强方式,SSD 速度约 18000 samples/s,HHD 速度约 8000 samples/s。
附件
dali_convert_rec.py.zip