cocoa-xu / evision

Evision: An OpenCV-Erlang/Elixir binding
https://evision.app
Apache License 2.0
337 stars 22 forks source link

Face recognition error #146

Closed iwarshak closed 1 year ago

iwarshak commented 1 year ago

Running version 0.1.24 in LiveBook, and I get the following error with the face recognition task.

13:59:20.360 [error] Task #PID<0.287.0> started from Kino.DynamicSupervisor terminating
** (RuntimeError) Unknown distance_type: :cosine_similarity
    (evision 0.1.24) lib/zoo/face_recognition/sface.ex:224: Evision.Zoo.FaceRecognition.SFace.match_feature/4
    #cell:x7tqyvxbm7siszngkrhp5tczeoh5snu7:74: (file)
    (elixir 1.14.2) src/elixir.erl:309: anonymous fn/4 in :elixir.eval_external_handler/1
    (stdlib 4.1.1) erl_eval.erl:748: :erl_eval.do_apply/7
    (stdlib 4.1.1) erl_eval.erl:492: :erl_eval.expr/6
    (stdlib 4.1.1) erl_eval.erl:136: :erl_eval.exprs/6
    (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
cocoa-xu commented 1 year ago

Hi @iwarshak, thanks for reporting this issue. I'm sorry it was caused by some typos in the code. I've fixed it and released v0.1.25. It should work now. :)

iwarshak commented 1 year ago

@cocoa-xu this fixed it. thanks!