Output tensor size mismatch with SSD FPN Models on mobile

927 Views Asked by At

I am trying to get different SSD Models from Tensorflow 2 to work in Android. The example .tflite file works fine, but different other models i've converted and tried all seem to have the same issue.

I've mostly followed this guide on how to convert those models for mobile: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tf2.md And that all worked fine, but when trying to run this on mobile the first frame checked throws this error:

Error occurred when initializing ObjectDetector: Output tensor at index 0 is expected to have 3 dimensions, found 2.

Models i've tried:

  • SSD MobileNet V2 FPNLite 640x640
  • SSD ResNet152 V1 FPN 1024x1024 (RetinaNet152)
  • SSD ResNet101 V1 FPN 640x640 (RetinaNet101)

Does anyone have any idea what i might be doing wrong?

EDIT: I've found a similiar issue which was opened a few days ago. Might be related: https://github.com/tensorflow/tensorflow/issues/51591#issuecomment-905216674

0

There are 0 best solutions below