cocoa-xu / evision

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

`warpPerspective` error when executing Text Recognition #176

Closed Wigny closed 1 year ago

Wigny commented 1 year ago

After updating Evision to the last version (0.1.27), I''ve faced an error every time when trying to run the Model Zoo Text recognition.

That is the output I'm receiving:

21:13:26.337 [error] Task #PID<0.4109.0> started from Kino.DynamicSupervisor terminating
** (ArgumentError) argument error
    (evision 0.1.27) :evision_nif.warpPerspective([src: #Reference<0.3700306894.974782487.188473>, m: #Reference<0.3700306894.974782487.188478>, dsize: {100, 32}])
    (evision 0.1.27) lib/generated/evision.ex:37381: Evision.warpPerspective/3
    (evision 0.1.27) lib/zoo/text_recognition/crnn.ex:161: Evision.Zoo.TextRecognition.CRNN.preprocess/3
    (evision 0.1.27) lib/zoo/text_recognition/crnn.ex:136: Evision.Zoo.TextRecognition.CRNN.infer/4
    (elixir 1.14.2) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (stdlib 4.1) erl_eval.erl:744: :erl_eval.do_apply/7
    (stdlib 4.1) erl_eval.erl:492: :erl_eval.expr/6
    (stdlib 4.1) erl_eval.erl:136: :erl_eval.exprs/6
Function: #Function<3.50167069/0 in Kino.listen/2>
    Args: []

You should be able to reproduce the error with this livebook: text_recognition.livemd

Wigny commented 1 year ago

This error seems to be similar to the https://github.com/cocoa-xu/evision/issues/174 one.

cocoa-xu commented 1 year ago

Hi @Wigny, thank you for reporting this issue. I can confirm that this is the same issue as in #174.

I'm waiting for this last one workflow, once it's done I can release v0.1.28. :)

cocoa-xu commented 1 year ago

v0.1.28 is out! It should work as expected now :)