conservationtechlab/animl-r

Error with loadMDModel

Opened this issue · 1 comments

I'm using an Apple M1 machine and trying to load the latest MegaDetector model v5.0 using the following code:

mdsession <- loadMDModel("/Users/gerardocelis//Downloads/md_v5b.0.0.pt")

I get the following error:

Error in py_call_impl(callable, call_args$unnamed, call_args$named) : google.protobuf.message.DecodeError: Field number 0 is illegal.
reticulate::py_last_error()

── Python Exception Message
Traceback (most recent call last):
File "/Users/gerardocelis/.virtualenvs/r-tensorflow/lib/python3.9/site-packages/google/protobuf/message.py", line 202, in ParseFromString
return self.MergeFromString(serialized)
File "/Users/gerardocelis/.virtualenvs/r-tensorflow/lib/python3.9/site-packages/google/protobuf/internal/python_message.py", line 1128, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/Users/gerardocelis/.virtualenvs/r-tensorflow/lib/python3.9/site-packages/google/protobuf/internal/python_message.py", line 1178, in InternalParse
raise message_mod.DecodeError('Field number 0 is illegal.')
google.protobuf.message.DecodeError: Field number 0 is illegal.

── R Traceback

  1. └─animl::loadMDModel("/Users/gerardocelis/Downloads/md_v5b.0.0.pt")
  2. └─tfgraphdef$ParseFromString(f$read())
  3. └─reticulate:::py_call_impl(callable, call_args$unnamed, call_args$named)

I encountered the same issue on Windows 10 (R 4.4.0).