当前位置: 首页 > news >正文

AI 实战5 - pytorch框架实现face检测

pytorch框架实现face检测

  • 环境
    • 开发环境
    • SDK 环境
  • 数据
  • 训练
  • 测试

环境

开发环境

  1. GPU服务器:pytorch1.13.0,python3.10,cuda==11.7
  2. nvidia-smi 查看 CUDA 版本
    在这里插入图片描述3. 官网查看对应cuda版本的PyTorch,使用生成命令行安装
    在这里插入图片描述3. 环境安装
conda create -n centerface python=3.7
conda activate centerface
pip3 install torch torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple

# 不安装cython报错,编译cocoAPI报错缺少 _mask.c
pip install -U cython -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install -U 'setuptools>=18.0' -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U 'matplotlib>=2.1.0' -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install tqdm -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U progress -i https://pypi.tuna.tsinghua.edu.cn/simple

## 原因:不修改,训练出来的模型精度有影响
## 定位 torch.batch_norm行,将 torch.backends.cudnn.enabled 选项更改为False
## vim /data/miniconda/envs/centernet/lib/python3.7/site-packages/torch/nn/functional.py +1697

## 安装cocoAPI
mkdir /data/coding/detect
COCOAPI=/data/coding/detect/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
python setup.py install --user
make

# 获取训练工程
CenterFace_ROOT=/data/coding/detect/centerface_pytorch
git clone http://developer.sourcefind.cn/codes/modelzoo/centerface_pytorch.git $CenterFace_ROOT

cd $CenterNet_ROOT/src/lib/external/
python setup.py install --user
make

# 编译NMS
# cd $CenterNet_ROOT/lib/nms
# make

pip install opencv-python
pip install numba -i https://pypi.tuna.tsinghua.edu.cn/simple

SDK 环境

  1. 参考 https://github.com/chenjun2hao/CenterFace.pytorch
  2. 开源训练数据:http://shuoyang1213.me/WIDERFACE/

数据

训练

测试

http://www.dtcms.com/a/51997.html

相关文章:

  • 如何快速的用pdfjs建立一个网页可以在线阅读你的PDF文件
  • 自动驾驶---不依赖地图的大模型轨迹预测
  • 在 Spring Boot 中格式化 LocalDateTime
  • Ubuntu20.04双系统安装及软件安装(九):谷歌浏览器
  • 开发环境搭建-01.前端环境搭建
  • 【算法方法总结·四】字符串操作的一些技巧和注意事项
  • html常用标签
  • spi_device,spi_driver,spi_controller,spi_res,spi_transfer,spi_message之间的联系
  • DSP笔记
  • 【商城实战(7)】商城项目中用户信息管理功能的全栈开发
  • java使用第三方库 semver4j 处理语义化版本,递增,对比等操作
  • 初识Python:一门简洁而强大的编程语言
  • 大语言模型(LLM)和嵌入模型的统一调用接口
  • GB28181开发--SRS+Jessibuca‌
  • LINUX网络基础 [一] - 初识网络,理解网络协议
  • 集合论--形式化语言里的汇编码
  • vulnhub渗透日记23:bulldog
  • SQLite Having 子句详解
  • java基础100道面试题
  • AT32F421专题---PA9 PA10的I2C1连接AT24C02失败及解决
  • Diffusion模型中时间t嵌入的方法
  • Teaching Small Language Models Reasoning throughCounterfactual Distillation
  • Hive-07之企业级调优
  • Docker部署MySQL
  • Python:简单的爬虫程序,从web页面爬取图片与标题并保存MySQL
  • 大模型核心要素完全解析:从数字神经元到智能对话的奥秘
  • go语言数据类型
  • (50)[HGAME 2023 week2]before_main
  • AutoGen学习笔记系列(六)Tutorial - Termination
  • unittest框架 核心知识的系统复习及与pytest的对比