Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add YOLOv5Face model support #38

Merged
merged 31 commits into from
Jul 25, 2022
Merged

Conversation

DefTruth
Copy link
Collaborator

@DefTruth DefTruth commented Jul 25, 2022

  • add YOLOv5Face model support
  • add FaceDetectionResult、Sort/NMS/Visualize methods for FaceDetectionResult
  • format ScaledYOLOv4
  • fixed runtime_option print func bugs

DefTruth and others added 30 commits July 12, 2022 02:51
merge from paddlepaddle/fastdeploy:develop
std::vector<std::array<float, 4>> boxes;
// landmark: x, y, landmarks may empty if the
// model don't detect face with landmarks.
// Note, one face might have multiple landmarks,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

什么类型的模型会没有landmark; 当没有landmark时,模型的开发应该是用DetectionResullt,还是用FaceDetectionResult呢

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 关于什么时候会没有landmark?
    在人脸检测中,带landmark和不带landmark的模型都是非常常见的。landmark通常作为一个辅助任务出现在人脸检测的算法中。所以定义一个FaceDetectionResult确实是需要考虑这两种情况。以下是一些例子:
  • 带landmark的人脸检测器:YOLOv5Face、RetinaFace、SCRFD、CenterFace、BlazeFace等等
  • 不带landmark的人脸检测器:DSFD(Tencent)、SSH、UltraFace、LFFD、LFD、S3FD等等
  1. 关于若不带landmark是否复用DetectionResullt?
    个人观点:不建议。理由有以下3个:
  • 首先,人脸检测和通用目标检测确实应该是两个不同的cv子领域,虽然说有一定的相似性,但从任务上来说是不一样的,都用DetectionResullt感觉有点奇怪
  • 人脸检测没有多分类的label_id,只有人脸,目标检测通常是多类别的,需要有label_id;因此人脸检测也不需要像yolov5那样在做NMS时先通过label_id*max_wh来做offset提高recall
  • 很多的人脸检测器带有landmark,但是大部分目标检测器是不带landmark的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants