3 Star 4 Fork 0

CV_Lab / Face-Img-Filter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 5.54 KB
一键复制 编辑 原始数据 按行查看 历史
代码阿尔法 提交于 2023-10-09 21:10 . readme update

Simple Icons

基于YOLOv8的人脸图片过滤与管理工具

code check Releases Version License

YOLOv8 Version Python Version Torch Version TorchVision Version pre-commit

🚀 作者简介

曾逸夫,从事人工智能研究与开发;主研领域:计算机视觉;YOLOv8官方开源项目代码贡献人YOLOv5官方开源项目代码贡献人

❤️ Github:https://github.com/Zengyf-CVer

🚀更新走势

📌 项目整体流程

📌 项目示例

💡项目结构

.
├── Face-Img_Filter	 						# 项目名称
│   ├── util								# 工具包
│   │   ├── time_format.py					# 时间格式化
│   │   ├── classify_parse.py				# 分类解析
│   │   └── img_fix.py						# 图片修复
│   ├── sample								# 样本图片集
│   ├── face_img_filter.py					# 主程序文件
│   ├── setup.cfg							# pre-commit CI检查源配置文件
│   ├── .pre-commit-config.yaml				# pre-commit配置文件
│   ├── LICENSE								# 项目许可
│   ├── .gitignore							# git忽略文件
│   ├── README.md							# 项目说明
│   ├── yolov8_widerface.md					# 基于yolov8的widerface人脸检测教程
│   ├── yolov8_classify.md					# 基于yolov8的人脸属性分类教程
│   └── requirements.txt					# 脚本依赖包

🔥安装教程

✅ 第一步:创建conda环境

conda create -n yolo python==3.9
conda activate yolo # 进入环境

✅ 第二步:克隆

git clone https://gitee.com/CV_Lab/face-img-filter.git

✅ 第三步:安装Face Img Filter依赖

cd face-img-filter
pip install -r ./requirements.txt -U

⚡使用教程

🔥 基于WIDER FACE的YOLOv8人脸检测模型的构建

❤️点击上方的链接,查看yolov8_widerface.md文件,关于基于WIDER FACE的YOLOv8人脸检测模型的构建过程

📌 人脸过滤

# 人脸过滤
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path

# 调节置信度阈值
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -cf 0.8

# 调节IoU阈值
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -iu 0.6

# 调节推理尺寸
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -is 320

# 更换人脸检测模型
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -fm ./custom_face_model.pt

🔥 基于YOLOv8的人脸属性分类模型的构建

❤️点击上方的链接,查看yolov8_classify.md文件,关于基于YOLOv8的人脸属性分类模型的构建过程

📌 人脸性别属性过滤

# 性别过滤(默认为man)
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -gc -gn woman

# 更换人脸性别分类模型
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -gc -gn woman -gm ./face_gender_model.pt

{0: 'man', 1: 'woman'}

📌 人脸年龄属性过滤

# 年龄过滤(默认为Youth)
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -ac -an Teenagers

# 更换人脸年龄分类模型
python face_img_filter.py -ir ./origin_img_path -it ./target_img_path -ac -an Teenagers -am ./face_age_model.pt

{0: 'Children', 1: 'Elderly', 2: 'Infants', 3: 'Middle', 4: 'Teenagers', 5: 'Youth'}

❤️ 项目sample目录提供图片样本,可以进行测试实验

💬 技术交流

  • 如果你发现任何Face Img Filter存在的问题或者是建议, 欢迎通过Gitee Issues给我提issues。
  • 欢迎加入CV Lab技术交流群
Python
1
https://gitee.com/CV_Lab/face-img-filter.git
git@gitee.com:CV_Lab/face-img-filter.git
CV_Lab
face-img-filter
Face-Img-Filter
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891