How to perform keypoint regression on a custom dataset in Tensorflow? - tensorflow

Is it possible to use CenterNet with MobilenetV2 backbone (TF Lite compatible) to perform keypoints detection on a custom dataset? Is there a tutorial somewhere?

I have something for training keypoint detection model for custom dataset on Centernet model with hourglass backbone.
This github repo Custom Keypoint Detection for dataset preparation, model training and inference on Centernet-hourglass104 keypoint detection model based on Tensorflow Object detection API with examples.
This could help you in training your keypoint detection model on custom dataset.
Any issues related to the project can be raised in the github itself and doubts can be cleared here.

Related

How do I perform a confusion matrix calculation on my already custom trained YOLOv3 Tiny model?

I just finished training a yolov3 tiny model via google colab. I need the information regarding its accuracy in detection. How do I perform the evaluation for this model in terms of confusion matrix?

Is there a tutorial for using tensorflow object detection API for training object and key point detection?

This link provides a Google Colab notebook for inference of CenterNet HourGlass104 Keypoints 512x512 for object detection and pose key point detection. Is there a similar notebook or tutorial to train object detection and key point detection on custom datasets?
I have created a detailed github repo Custom Keypoint Detection for dataset preparation, model training and inference on Centernet-hourglass104 keypoint detection model based on Tensorflow Object detection API with examples.
This could help you in training your keypoint detection model on custom dataset.
Any issues related to the project can be raised in the github itself and doubts can be cleared here.

Can we use TF-lite to do retrain?

I converted a pretrained model to TF-lite and would like to deploy to the edge device.
If we got new training data and would like to improve the pretrained model, is it possible to do on the edge device?
Ex. Is there any method to train the model and save to TF-lite(FlatBuffer) again on edge device?
Thanks for any inputs!
On-device training is not fully supported yet on TF Lite but you can refer to this blog post to see how it can be done.
https://blog.tensorflow.org/2019/12/example-on-device-model-personalization.html
The basic idea is:
Split your model to a base subgraph (e.g. feature extractor in an image classification model) and a trainable head.
Convert the base subgraph to TF Lite as normal. Convert the trainable head to TF Lite using the experimental tflite-transfer-convert tool.
Retrain the trainable head on-device as you wish.

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.

How to use a pre trained model on Image net in tensorflow object detection api

I am trying to use the Inception SSD model in tensorflow object detection API. To initialize the weights i want to use pretrained Inception V2 On image net as the feature extractor. I see the model config file lets you use a pretrained model on COCO but if I want to use an Image net model how should I go about it?
To train on Imagenet classification models, do the following:
1) Download a pre-trained model from the "Pre-trained models" section on the Slim page
2) Point the fine_tune_checkpoint at that directory
3) Set from_detection_checkpoint to be false (as you will now be fine-tuning from a classification checkpoint)
Note that training from an Imagenet classification checkpoint will require significantly more time.