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

Could not achieve same results in demo #51

Open
tszhang97 opened this issue Nov 27, 2023 · 3 comments
Open

Could not achieve same results in demo #51

tszhang97 opened this issue Nov 27, 2023 · 3 comments

Comments

@tszhang97
Copy link

I use the code of demo.py and test the video in the demo. The results below look wired. I also test other videos and a common problem is that the results have lots of jitters.
https://github.com/thohemp/6DRepNet/assets/39046939/740edd75-7565-4bfa-a82b-0303b7ee9bde

@tszhang97
Copy link
Author

@thohemp
Copy link
Owner

thohemp commented Nov 27, 2023

Did you use my demo video with box visualization as input to process it again?

@tszhang97
Copy link
Author

@thohemp Do you mean this part? I've already used the code below:
detector = RetinaFace(gpu_id=gpu)
with torch.no_grad():
for frame in img_list:
faces = detector(frame)
for box, landmarks, score in faces:
# Print the location of each face in this image
if score < .95:
continue
x_min = int(box[0])
y_min = int(box[1])
x_max = int(box[2])
y_max = int(box[3])

            bbox_width = abs(x_max - x_min)
            bbox_height = abs(y_max - y_min)

            x_min = max(0, x_min - int(0.2 * bbox_height))
            y_min = max(0, y_min - int(0.2 * bbox_width))
            x_max = x_max + int(0.2 * bbox_height)
            y_max = y_max + int(0.2 * bbox_width)
            img = frame[y_min:y_max, x_min:x_max]

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