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

Not working for detecting the hand. #2

Open
shijie2016 opened this issue Jan 6, 2022 · 1 comment
Open

Not working for detecting the hand. #2

shijie2016 opened this issue Jan 6, 2022 · 1 comment

Comments

@shijie2016
Copy link

Hi,

When I run the run_detector.py, I got the following errors:

Traceback (most recent call last):
File "C:\Users\nieshijie\Downloads\BlazePalm-master\BlazePalm-master\ML\run_detector.py", line 31, in
cropped_hand = frame[y:endy, x:endx]
TypeError: only integer tensors of a single element can be converted to an index

I modified line 25~30 and convert type from float to int. It seems that the detected bound box is wrong. Could you please check about that? Thanks.

@arctanbell
Copy link

just convert the data type like this:
# crop this image, pad it, run landmarks
x = max(0, p[0].type(torch.int))
y = max(0, p[1].type(torch.int))
endx = min(ll, p[2].type(torch.int))
endy = min(ll, p[3].type(torch.int))

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