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

Dims don't broadcast #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ opencv-python==4.0.0.21 to opencv-python==4.6.0.66<br>
<b>Acknowledgement:</b><br>
Face detection using mtcnn https://github.com/ipazc/mtcnn.<br>
Face detection using retinaface https://github.com/peteryuX/retinaface-tf2
Face detection using scrfd https://github.com/deepinsight/insightface/tree/master/detection/scrfd
6 changes: 3 additions & 3 deletions pose_detection_scrfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def detect(self, srcimg):
# inference output
scores_list, bboxes_list, kpss_list = [], [], []
for idx, stride in enumerate(self._feat_stride_fpn):
scores = outs[idx * self.fmc][0]
bbox_preds = outs[idx * self.fmc + 1][0] * stride
kps_preds = outs[idx * self.fmc + 2][0] * stride
scores = outs[idx][0]
bbox_preds = outs[idx + self.fmc][0] * stride
kps_preds = outs[idx + self.fmc * 2][0] * stride
height = blob.shape[2] // stride
width = blob.shape[3] // stride
anchor_centers = np.stack(np.mgrid[:height, :width][::-1], axis=-1).astype(np.float32)
Expand Down