I want to run this facial expression recognition model. (justinshenk/fer) The default model on google colab is for video, and I'm trying to change it to image analysis by referring to the README of the author. And I keep getting the error below.
UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[node model_3/conv2d_12/Conv2D
(defined at /usr/local/lib/python3.7/dist-packages/keras/layers/convolutional.py:240)
]] [Op:__inference_predict_function_9501]
Errors may have originated from an input operation.
Input Source operations connected to node model_3/conv2d_12/Conv2D:
In[0] IteratorGetNext (defined at /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:1789)
In[1] model_3/conv2d_12/Conv2D/ReadVariableOp:
My current code to run the model is as below.
%matplotlib inline
from fer import Video
from fer import FER
import matplotlib.pyplot as plt
import os
import sys
import cv2
img2 = cv2.imread("/content/sample_data/frame_image/justin.jpg")
detector = FER(mtcnn=True)
detector.detect_emotions(img2)