Closed taro-ishihara closed 2 years ago
Hello @taro-ishihara can you please try the colab with pycocotools installation (! pip install pycocotools==2.0.0). Thanks!
hi @jjonnala I have tried to implement your advice now, but the situation did not change anything. Because this line (! apt-get install protobuf-compiler) automatically install pycocotools 2.0.0. Thanks.
Then I tried downgrading and upgrading numpy.
downgrade to 1.19.5 Error is changed. This is indeed an error from pycocotools, but it seems that numpy version has to be newer.
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "object_detection/model_main.py", line 25, in <module>
from object_detection import model_lib
File "/usr/local/lib/python3.7/dist-packages/object_detection/model_lib.py", line 29, in <module>
from object_detection import eval_util
File "/usr/local/lib/python3.7/dist-packages/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.7/dist-packages/object_detection/metrics/coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "/usr/local/lib/python3.7/dist-packages/object_detection/metrics/coco_tools.py", line 51, in <module>
from pycocotools import coco
File "/usr/local/lib/python3.7/dist-packages/pycocotools/coco.py", line 52, in <module>
from . import mask as maskUtils
File "/usr/local/lib/python3.7/dist-packages/pycocotools/mask.py", line 3, in <module>
import pycocotools._mask as _mask
File "pycocotools/_mask.pyx", line 1, in init pycocotools._mask
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
upgrade to 1.20.0(next to 1.19.5) and 1.21.5(latest) Nothing changed.
OK, finally I solved this issue. Numpy downgrading AND pycocotools installation is needed.
! pip install -U numpy==1.19.5
! pip install -U pycocotools==2.0.0
Thanks, @hjonnala
Description
I tried tutorial "Retrain SSDLite MobileDet detector for the Edge TPU (TF1)" and exec
python3 object_detection/model_main.py
and then an error has occurred with message "NotImplementedError: Cannot convert a symbolic Tensor (cond_2/strided_slice:0) to a numpy array.".I have not changed anything from the sample, and I use just GoogleColab. Any ideas?
Click to expand!
### Issue Type Build/Install ### Operating System Mac OS ### Coral Device _No response_ ### Other Devices _No response_ ### Programming Language Python 3.7 ### Relevant Log Output ```shell Traceback (most recent call last): File "object_detection/model_main.py", line 108, in