GithubHelp home page GithubHelp logo

hpc203 / scrfd-opencv Goto Github PK

View Code? Open in Web Editor NEW
102.0 1.0 33.0 20.62 MB

使用OpenCV部署SCRFD人脸检测,包含C++和Python两种版本的程序实现,本套程序只依赖opencv库就可以运行, 从而彻底摆脱对任何深度学习框架的依赖。

C++ 45.37% Python 54.63%
face-recognition face-landmark-detection opencv dnn anchor-free fcos

scrfd-opencv's Introduction

scrfd-opencv

使用OpenCV部署SCRFD人脸检测,包含C++和Python两种版本的程序实现,本套程序只依赖opencv库就可以运行, 从而彻底摆脱对任何深度学习框架的依赖。

SCRFD是一个FCOS式的人脸检测器,2021年5月发出来的,SCRFD 是高效率高精度人脸检测算法,速度和精度相比其他算法都有提升。 你的机器里只要安装里OpenCV库,就能运行本套程序。C++版本的主程序是main.cpp,Python版本的主程序是main.py。 程序输出检测到的人脸矩形框和5个关键点

scrfd-opencv's People

Contributors

hpc203 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scrfd-opencv's Issues

ERROR in main.cpp

main.py detects 123 faces in selfie.jpg
main.cpp detects 1334 faces in slelfie.jpg (ERROR)
Why?
How to solve it?

error when run python main.py

Traceback (most recent call last):
File "main.py", line 125, in
outimg = mynet.detect(srcimg)
File "main.py", line 107, in detect
i = i[0]
IndexError: invalid index to scalar variable.

采用dnn加载onnx模型失败

File "d:\AI\Face\Face_detect\SCRFD\scrfd-opencv\main.py", line 12, in init
self.net = cv2.dnn.readNet(onnxmodel) #加载失败
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\include\opencv2/dnn/dnn.inl.hpp:349: error: (-204:Requested object was not found) Required argument "starts" not found into dictionary in function 'cv::dnn::dnn4_v20191202::Dict::get'

我试了其他scrfd的onnx模型,加载都是各种报错.不懂你有没有出现这种问题. onnxruntime 加载是正常的

两个版本都有点报错,求助一下

C++版本报错:
1>------ 已启动生成: 项目: ConsoleApplication2, 配置: Release x64 ------
1>main.obj : error LNK2001: 无法解析的外部符号 "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class cv::_InputArray const &)" (?imshow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV_InputArray@1@@z)
1>已完成生成项目“ConsoleApplication2.vcxproj”的操作 - 失败。
========== 生成: 0 成功,1 失败,0 最新,0 已跳过 ==========
有9个无法解析符号的报错

python版本的报错:
Traceback (most recent call last):
File "E:\karuizhi\scrfd-opencv-main\main.py", line 123, in
outimg = mynet.detect(srcimg)
File "E:\karuizhi\scrfd-opencv-main\main.py", line 78, in detect
bboxes = self.distance2bbox(anchor_centers, bbox_preds)
File "E:\karuizhi\scrfd-opencv-main\main.py", line 35, in distance2bbox
x1 = points[:, 0] - distance[:, 0]
ValueError: operands could not be broadcast together with shapes (12800,) (3200,)
这个相减维度不匹配x1 = points[:, 0] - distance[:, 0]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.