I am new to machine learning. I am curious to know what is the difference between using Keras instead of TensorFlow object detection API. We need to manually configure hidden layers and input layer in Keras so what is the advantage to use Keras and how to know how many layers should configure to achieve object detection using Keras.

Please check two different types of implementation 1) Using Keras 2) Using Tensorflow Object detection API without Keras

Thanks !!!

  • $\begingroup$ Tensorflow and keras are different libraries but when we want to build a custom Deep Neural network we can use keras with tensorflow. Tensorflow has some predefined models but with the help of keras, we can build custom NNs. Also for object detection, tensorflow has included a pre-trained model which can give you direct prediction without even training(which is called tensorflow object detection API) but if you want and have required data, you can build your own object detection model using keras with tensorflow. $\endgroup$ – Bhanuday Birla Feb 18 at 6:04
  • $\begingroup$ You can check below link for further clarifications: edureka.co/blog/keras-vs-tensorflow-vs-pytorch $\endgroup$ – Bhanuday Birla Feb 18 at 6:11
  • $\begingroup$ As for tf 2.0 release, keras became official high-level interface and is shipping together with tf. $\endgroup$ – Piotr Rarus - Reinstate Monica Feb 18 at 8:16

Keras provides you high level api or can say wrapper written on top of multiple backends. These back ends have the core implementation of DNN. List of Keras supported backends are:

  1. Tensorflow
  2. Theano
  3. CNTK

**Source: Keras documentation for supported backends

Keras hides a bit complexity of DNN implementation, but again restrict your freedom. In case if you write a code in Tensorflow, you have explicitly specifies and calculate optimizer, cost function and other things, but it provides you flexibility.

So for me writing in Keras just a convenience.

As far my knowledge is concern, so far we dont have any fix formula to identify number of layers sufficient for Object detection :).

| improve this answer | |
  • $\begingroup$ As for tf 2.0 release few months ago, Keras is now its official API and won't support other backends (which weren't really used by people). $\endgroup$ – Piotr Rarus - Reinstate Monica Feb 18 at 8:15
  • $\begingroup$ Thanks for the update. $\endgroup$ – vipin bansal Feb 19 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.