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 running tracker.py #35

Open
bbakpil opened this issue May 11, 2024 · 5 comments
Open

about running tracker.py #35

bbakpil opened this issue May 11, 2024 · 5 comments

Comments

@bbakpil
Copy link

bbakpil commented May 11, 2024

Hello, thanks for your awesome work.

I'm having trouble on running tracker.py.

def parse_batch(self, batch):
images = batch['image']
landmarks = batch['lmk']
landmarks_dense = batch['dense_lmk']

lmk_dense_mask = ~(landmarks_dense.sum(2, keepdim=True) == 0)
lmk_mask = ~(landmarks.sum(2, keepdim=True) == 0)

left_iris = landmarks_dense[:, left_iris_mp, :]
right_iris = landmarks_dense[:, right_iris_mp, :]
mask_left_iris = lmk_dense_mask[:, left_iris_mp, :]
mask_right_iris = lmk_dense_mask[:, right_iris_mp, :]

batch['left_iris'] = left_iris
batch['right_iris'] = right_iris
batch['mask_left_iris'] = mask_left_iris
batch['mask_right_iris'] = mask_right_iris

return images, landmarks, landmarks_dense[:, mediapipe_idx, :2], lmk_dense_mask[:, mediapipe_idx, :], lmk_mask

landmarks_dense.shape = [1, 68, 2], which seems like 68 landmarks.
However,
left_iris_mp = [468, 469, 470, 471, 472]
right_iris_mp = [473, 474, 475, 476, 477] and
mediapipe_idx = [276. 282, ... ]

left_iris_mp , right_iris_mp , and mediapipe_idx exceeds the index of landmarks_dense.
Am I doing something wrong? Please give me any suggestion if possible.

Thank you in advance.

@Zielon
Copy link
Owner

Zielon commented May 11, 2024

Hmm, there is some problem because landmarks_dense.shape = [1, 68, 2] is the wrong size. How did you generate the input?

@bbakpil
Copy link
Author

bbakpil commented May 11, 2024

Hello,
if my input images are in path_image = ./input/image,
I used MICA to generate identity.npy using path_image.
Then, I selected one identity.npy and put it into path_image.
Next, python tracker.py --cfg ./configs/actors/tmp.yml

@bbakpil
Copy link
Author

bbakpil commented May 12, 2024

Does the input have to be a video (.mp4)?

@chenzhekl
Copy link

I am having the same question as @bbakpil. We are interested in applying metrical-tracker to a single image.

@superhero177
Copy link

Hello, @bbakpil , Excuse me,
I used the same method as you.
Have you solved this problem?
image

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

4 participants