Object detection model training

  numpy, object-detection, python-3.x, tensorflow2.0

I would like to train my custom model for object detection. For this purpose I’ve already downloaded one of pretrained model from TensorFlow 2 Detection Model Zoo (https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md) and I’ve changed all required paths in pipeline.config. After that I was trying to use model_main_tf2.py from tensorflow/models/research/object_detection/ but I received an error:

NotImplementedError: Cannot convert a symbolic Tensor (cond_2/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported

Of course, I was looking how to resolve this error and I found out that I have to downgrade numpy. So I did. But after that (no matter if I downgraded numpy to 1.19.5 or to 1.18 or to 1.16), another error popped up:

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

Do you have any idea what can I do?

Source: Python-3x Questions