Here are the different approaches:
1. Tensorflow and Keras off-shelf: using keras.applications to import off-shelf model for image classification, with the weights trained on ImageNet. Available models being:
Xception
VGG16
VGG19
ResNet50
InceptionV3
InceptionResNetV2
Go ahead and run model prediction for the images acquired from our camera e.g. classify.py which will return predicted labels and 'probabilities'. No new labels/classes added to the model.
Keras documentation: https://keras.io/applications/
We cover how to do this, and how to install TensorFlow and Keras on Raspberry Pi, in this build guide: https://hackaday.io/project/20448-elephant-ai/log/68401-software-installing-on-rasp-pi-and-detection-w-tensorflow-keras-off-shelf
2. Tensorflow and Keras fine-tuning or transfer learning: keras.applications to import off-shelf model (e.g. InceptionV3) then fine-tune or transfer learning with our new labelled images (new classes)
We cover how to do this [here]
3. Tensorflow and TFSlim fine-tuning: so using the TFSlim API, import off-shelf model (e.g. InceptionV3 or VGG19), then fine-tune with our new labelled images (new classes)
TFSlim documentation: https://github.com/tensorflow/models/tree/master/research/slim
We cover how to do this [here]
4. Tensforflow and Bazel transfer learning: transfer learning for e.g. InceptionV3, using common approach detailed in Tensforflow tutorial, with our new labelled images (new classes)
** we won't cover how to do this.
5. Tensorflow transfer learning without bazel: transfer learning for e.g. InceptionV3 using common approach detailed in Tensorflow tutorial (https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0) and the retrain code here https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py
We cover how to do this, in this build guide: https://hackaday.io/project/20448-elephant-ai/log/68436-software-elephant-detector-transfer-learning-off-shelf-model-with-tensorflow
* in the above fine-tune and transfer learn approaches, the labels/classes correspond to directory structure for the training images e.g. /images/lone_elephants would be class "lone_elephants"
6. SSD. See SSD: Single Shot MultiBox Detector (Liu et al) https://www.cs.unc.edu/~wliu/papers/ssd.pdf which is commonly used for video. The following is code from lead author: https://github.com/weiliu89/caffe/tree/ssd . This approach is not likely to be used.
** we won't cover how to do this
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.