3

I have a question about Tensorflows Object Detection API. I trained Faster R-CNN Inception v2 model with my own dataset for Traffic Sign Classification and I want to deploy it to Android but Tensorflows Object Detection API for Android and/or Tensorflow Lite seems only supporting SSD models.

Is there any way to deploy a Faster R-CNN model to Android? I mean how can I put my frozen inference graph of Faster R-CNN to android API instead of SSDs frozen inference graph ?

Yusuf Altıparmak
  • 456
  • 1
  • 6
  • 16

2 Answers2

5

For SSD models, it must be possible using the export_tflite_ssd_graph.py tool. But:

At this time only SSD models are supported. Models like faster_rcnn are not supported at this time

See this guide for more information.

Dmytro Prylipko
  • 4,762
  • 2
  • 25
  • 44
0

One way to achieve this is by making a flask API, which will contain all the code for making prediction for a given image, and post it to a remote server such as Heroku. You can call the API by simply converting the image to Base64 or 32 from Android and sending it to the REST API deployed on Heroku. The API will compute the result (inference) and convert the output image back to Base64 and send it back to Android app. The android app will convert Base64 to bitmap and Walah! you made your prediction. You can use either HttpConnection library or just Retrofit for remote API calls in Android

FawwazFaisal
  • 57
  • 2
  • 11