Use of Inception v3 model for Tensorflow Object Detection API - tensorflow

I have used Tensorflow Object Detection API suuccessfuly by using ssd_mobilenet_v1_coco_11_06_2017 model.
Now I need to use Inception v3 model instead of mobilenet model.
Question:
can I use it for Tensorflow Object Detection API and how can I change the config file and how to find it?

Simply you can refer ssd_mobilenet_v1_coco.config file. it is used to give configuration for the Tensorflow object detection API. you can edit it and give modifications as you want.

Related

can we build object detection model using Tensorflow or it is only possible with the help f tf.keras

Is there any way to build object detection model using Tensorflow without any help of tf.keras module?
From Tensorflow documentation I'm not able to find any example which helps to create model without Keras.
Keras is a high level API. But if you want to use only Tensorflow then you have to implement the architecture using low level API. You can certainly implement but you have to code it yourself to build all the convolutional layers and dense layer by yourself.

Understanding exactly what the pretrained model does on the Tensorflow object detection API

I am trying to understand what I need from any pre-trained model used in the API regardless of any additional code found on the Tensorflow object detection API.
For example: ssd_mobilenet_v1_coco_2017_11_17, depending on what I have understood: it is a model that is already trained to detect objects (there is a classification to know the category of the object + Regression to bound the objects with rectangles and those rectangles are actually the x,y,w,h coordinates on the object).
How do we benefit from the regression output of that model (x,y,w,h coordinates) to use them in another model?
Let's assume we want to print out just the coordinates x,y,w,h of a detected object on an image without any need of the code of Tensorflow object detection API, how can we do that?
Certainly you can use the pretrained model provided in tensorflow object detection model zoo without installing object detection api. The alternative solution is to use opencv.
Opencv has provided both c++ and python api to call .pb models generated by tensorflow. Here is a nice tutorial.

How to add feature extractor netwrok for example mobilenetv2 to tensorflow's object detection API

This tutorial discusses how to use objection detection API at tensorflow.
I am looking for the tutorial explaining how to add feature extractor such as mobilenetV2 to tensorflow's object detection framework.
Have you checked out the Tensorflow provided Model Zoo? :)
It includes various object detection models with various feature extractors such as MobileNet, Inception, ResNet etc.
Here below you will find a link to the Tensorflow Detection Model Zoo, where you can choose detection model architectures, Region-Based (R-CNN) or Single Shot Detector (SSD) models, and feature extractors.
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
You can download a frozen graph of the pre-trained models based on COCO, Kitti and Open-Images etc.

Setting a different architecture than MobileNet

I am following a codelab tutorial by Google for image recognition:
https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#3
However, in this case the tutorial is using MobileNet v1 for object detection. In fact, these env variables are set:
IMAGE_SIZE=224
ARCHITECTURE="mobilenet_0.50_${IMAGE_SIZE}"
But what if I would like to use MobileNet with SSD or SquezeNet for object detection? I guess ARCHITECTURE variable must change in something like
ARCHITECTURE="ssd_mobilenet_0.50_${IMAGE_SIZE}"
I can't find any helpful resource.
The tutorial you are following is using this retrain script which is an older version of the official tensorflow retrain script.
While you can only use either MobileNet or InceptionV3 by using the codelab script, you can follow the official documentation on image retraining to retrain using any model available on Tensorflow Hub.
UPDATE:
MobileNet and SqueezeNet are not suitable for object recognition, but only for image classification. Thus, SSDMobileNet is the possible way.

How to retrieve original TensorFlow frozen graph from .tflite?

Basically I am trying to use google's pre trained Speaker-id model for speaker detection. But this being a TensorFlow Lite model, I can't use it on my Linux pc. For that, I am trying to find a converter back to its frozen graph model.
Any help on this converter or any direct way to use tensorflow Lite pretrained models on desktop itself, will be appreciated.
You can use the converter which generates tflite models to convert it back to a .pb file if that is what you're searching for.
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/toco/g3doc/cmdline_examples.md