Error when trying to run face recognition in Livebook
13:42:07.562 [error] Kino.listen with #Function<44.65746770/1 in :erl_eval.expr/5> failed with reason:
** (FunctionClauseError) no function clause matching in Evision.FaceRecognizerSF.feature/2
(evision 0.1.31) lib/generated/evision_facerecognizersf.ex:231: Evision.FaceRecognizerSF.feature({:error, "OpenCV(4.7.0) /home/livebook/.cache/mix/installs/elixir-1.14.2-erts-12.3.2.2/a6208935cb3fad81dd0c837b0fb54863/deps/evision/3rd_party/opencv/opencv-4.7.0/modules/dnn/src/onnx/onnx_importer.cpp:275: error: (-210:Unsupported format or combination of formats) Failed to parse ONNX model: /home/livebook/.cache/face_recognition_sface_2021dec.onnx in function 'ONNXImporter'\n"}, {:error, "cannot get `Ptr<cv::FaceRecognizerSF>` from `self`: mismatched type or invalid resource?"})
(stdlib 3.17.2) erl_eval.erl:685: :erl_eval.do_apply/6
(stdlib 3.17.2) erl_eval.erl:446: :erl_eval.expr/5
(stdlib 3.17.2) erl_eval.erl:123: :erl_eval.exprs/5
(kino 0.9.4) lib/kino.ex:407: Kino.safe_apply/3
(elixir 1.14.2) lib/enum.ex:980: anonymous fn/3 in Enum.each/2
(elixir 1.14.2) lib/enum.ex:4307: anonymous fn/3 in Enum.each/2
(elixir 1.14.2) lib/stream.ex:1799: anonymous fn/3 in Enumerable.Stream.reduce/3
It appears that the model file has not been downloaded correctly.
The model file face_recognition_sface_2021dec.onnx appears to be HTML.
Error when trying to run face recognition in Livebook
It appears that the model file has not been downloaded correctly. The model file face_recognition_sface_2021dec.onnx appears to be HTML.
https://github.com/cocoa-xu/evision/blob/7369af18373bf885d86d9a50f9757ff63cad775b/lib/zoo/face_recognition/sface.ex#L325
Probably because the branch name of opencv_zoo was changed from master to main, it is not downloaded correctly.