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

once I've trained my model, how can I use it to recognize an image? thx #7

Open
buliuguyy opened this issue Dec 15, 2020 · 1 comment

Comments

@buliuguyy
Copy link

I tried to do this by(in python3):
signDetector = GestureRecognizer.load_model(name="sign_detector.pkl.gz")
image = io.imread(r"C:\Users\thinkpad\Desktop\Sign-Language-and-Static-gesture-recognition-using-sklearn-
master\dataset\user_3\A0.jpg")
out1, final_predictions=signDetector.recognize_gesture(image)
print(final_predictions)

however,I received a ValueError from _prepare_colorarray : Input array must have a shape == (..., 3)), got (128, 128, 2)
and i am confused

@mon95
Copy link
Owner

mon95 commented Dec 23, 2020

Sorry, I don't remember the exact details as I did this a long long time ago. But, I'd recommend you check the readme to see if everything aligns.

The error itself looks like you're passing in a 2-channel image (for eg., black and white images) when the input expected would be a 3-channel image (for e.g., RGB color images) - so could you check this?

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