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

About inference #8

Open
fenguan opened this issue Mar 13, 2023 · 6 comments
Open

About inference #8

fenguan opened this issue Mar 13, 2023 · 6 comments

Comments

@fenguan
Copy link

fenguan commented Mar 13, 2023

Hello, I'm having some problems with inference. I can successfully infer using the photos you provided but not on my dataset. It's still the original photo.

In addition, I want to use this to judge where people are looking. Is it possible to do this?
Here is the image I use.
thirdView000211

@hnuzhy
Copy link
Owner

hnuzhy commented Mar 14, 2023

It is normal that our released model may not predict head pose well of persons from some in-the-wild images. This is because the train-set AGORA-HPE is a synthetic dataset, which inherently has domain gap with real images such as your demo picture. I guess you may turn the --conf-thres value smaller (e.g., from 0.4 to 0.1 or 0.05) for detecting possible head bboxes and their poses.

@hnuzhy
Copy link
Owner

hnuzhy commented Mar 14, 2023

By the way, if you want to judge where people are looking, I think the body orientation is an alternative indicator. You can refer my another work about joint multi-person body detection and orientation estimation in https://github.com/hnuzhy/JointBDOE. It is based and trained on COCO-MEBOW dataset with in-the-wild images. It has good generalization for real application.

@fenguan
Copy link
Author

fenguan commented Mar 25, 2023

It is normal that our released model may not predict head pose well of persons from some in-the-wild images. This is because the train-set AGORA-HPE is a synthetic dataset, which inherently has domain gap with real images such as your demo picture. I guess you may turn the value smaller (e.g., from 0.4 to 0.1 or 0.05) for detecting possible head bboxes and their poses.--conf-thres

Your suggestion works great. I ordered --conf-thres=0.05. The effect is as follows:
1

Are there other ways to improve it?

@fenguan
Copy link
Author

fenguan commented Mar 25, 2023

By the way, if you want to judge where people are looking, I think the body orientation is an alternative indicator. You can refer my another work about joint multi-person body detection and orientation estimation in https://github.com/hnuzhy/JointBDOE. It is based and trained on COCO-MEBOW dataset with in-the-wild images. It has good generalization for real application

In this project, I set --conf-thres=0.05 --iou-thres=0.1. This is the result of direct inference
2
3
4
But sometimes people cannot be detected well.

So want to judge whether a person is looking around in the crop.
Snipaste_2023-03-25_22-17-27

Is it possible to combine your two efforts to achieve this? I would be very grateful if you have other suggestions.

@hnuzhy
Copy link
Owner

hnuzhy commented Mar 25, 2023

It seems that your task is mostly related to multi-person body detection and orientation estimation. I simply run my JointBDOE (https://github.com/hnuzhy/JointBDOE) work in your demo images. The results of person orientation are basically reliable.

224728890-c3b084e0-2c7e-4db8-a4a0-37bdc23cc5cd_res

227721824-1479139f-367a-4983-98fc-6c07d4d86efe_res

227722436-3224a597-f670-4206-af06-1b80a489e5fd_res

227722441-5c091bb7-53ff-4ea6-ba54-708e4229c023_res

227722862-134d2dcc-b615-47c8-ac50-df231ec14688_res

@hnuzhy
Copy link
Owner

hnuzhy commented Mar 25, 2023

If you want to further judge whether a person is looking around or not, you may run single HPE task with full-range view. You may refer the method WHE-Net (https://github.com/Ascend-Research/HeadPoseEstimation-WHENet or https://github.com/PINTO0309/HeadPoseEstimation-WHENet-yolov4-onnx-openvino) which uses a well-cropped head image as its input.

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

No branches or pull requests

2 participants