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 model SCRFD support #68

Merged
merged 63 commits into from
Aug 4, 2022
Merged

Conversation

ziqi-jin
Copy link
Contributor

@ziqi-jin ziqi-jin commented Aug 3, 2022

  • Face detection model SCRFD
  • supply the decoding process when the exported ONNX file includes face key points or not
  • add is_dynamic support for all yolo series

vis_result
截屏2022-08-03 下午4 32 45

csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
examples/vision/deepinsight_scrfd.cc Outdated Show resolved Hide resolved
examples/vision/deepinsight_scrfd.cc Outdated Show resolved Hide resolved
fastdeploy/vision/deepinsight/__init__.py Outdated Show resolved Hide resolved
model_zoo/vision/scrfd/cpp/scrfd.cc Outdated Show resolved Hide resolved
csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
@ziqi-jin ziqi-jin requested a review from DefTruth August 3, 2022 10:58
}

void SCRFD::GeneratePoints() {
if (center_points_is_update_ && !is_dynamic_input_) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里也改成统一的风格吧

if (center_points_is_update_ && !is_dynamic_input_) {
  return;
}

float* landmarks_ptr =
static_cast<float*>(infer_result.at(f + 2 * fmc).Data());
// landmarks
const float* kps_offsets = landmarks_ptr + i * 10;
Copy link
Collaborator

Choose a reason for hiding this comment

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

这句也应该是用landmarks_per_face * 2来计算地址

const float* kps_offsets = landmarks_ptr + i * 10;
// 改成
const float* kps_offsets = landmarks_ptr + i *(landmarks_per_face * 2);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实

bool center_points_is_update_;

// feature map count
unsigned int fmc;
Copy link
Collaborator

Choose a reason for hiding this comment

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

fmc 和 center_points都是私有的,都加一下下划线吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
csrcs/fastdeploy/vision/deepinsight/scrfd.cc Outdated Show resolved Hide resolved
@ziqi-jin ziqi-jin requested a review from DefTruth August 3, 2022 12:15
@jiangjiajun jiangjiajun merged commit bd0482f into PaddlePaddle:develop Aug 4, 2022
@ziqi-jin ziqi-jin deleted the scrfdpr branch August 10, 2022 06:21
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.

3 participants