Sign-Language-and-Static-gesture-recognition-using-sklearn icon indicating copy to clipboard operation
Sign-Language-and-Static-gesture-recognition-using-sklearn copied to clipboard

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

Open buliuguyy opened this issue 4 years ago • 1 comments

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

buliuguyy avatar Dec 15 '20 13:12 buliuguyy

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?

mon95 avatar Dec 23 '20 19:12 mon95