Can anyone suggest a good example for one shot learning model ?
1 Like
Bhack
July 13, 2021, 4:05pm
3
This will give you a good overview of the topic in different domains:
Machine learning has been highly successful in data-intensive applications but is often hampered when the data set is small. Recently, Few-Shot Learning (FSL) is proposed to tackle this problem. Using prior knowledge, FSL can rapidly generalize to...
Then probably you could find something more specific for your application target.
Given that Siamese networks can work for one-shot learning (such as image recognition (Koch, Zemel & Salakhutdinov (2015) , Jadon (2020) ), maybe you could try adapting these Siamese net examples from the Keras community @fchollet :
Perhaps, @Sayak_Paul knows more about this.
In case you’re interested in few-shot learning examples, which are somewhat related:
MAML (model-agnostic meta-learning): tensorflow-maml/maml.ipynb at master · hereismari/tensorflow-maml · GitHub
(from the MAML paper by Finn, Abbeel & Levine (2017) )
The Keras community created an implementation of a MAML-inspired method called Reptile here: Few-Shot learning with Reptile (cc @fchollet )
(from the Reptile paper by Nichol, Achiam & Schulman (2018) ).
Bhack
July 13, 2021, 7:33pm
6
I don’t know your domain but e.g. if you want an high level API example for the object detection API in model garden we have:
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "rOvvWAVTkMR7"
},
"source": [
"# Eager Few Shot Object Detection Colab\n",
"\n",
"Welcome to the Eager Few Shot Object Detection Colab --- in this colab we demonstrate fine tuning of a (TF2 friendly) RetinaNet architecture on very few examples of a novel class after initializing from a pre-trained COCO checkpoint.\n",
"Training runs in eager mode.\n",
"\n",
"Estimated time to run through this colab (with GPU): \u003c 5 minutes."
]
},
{
"cell_type": "markdown",
"metadata": {
This file has been truncated. show original
For TFLite
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "rOvvWAVTkMR7"
},
"source": [
"# Introduction\n",
"\n",
"Welcome to the **Few Shot Object Detection for TensorFlow Lite** Colab. Here, we demonstrate fine tuning of a SSD architecture (pre-trained on COCO) on very few examples of a *novel* class. We will then generate a (downloadable) TensorFlow Lite model for on-device inference.\n",
"\n",
"**NOTE:** This Colab is meant for the few-shot detection use-case. To train a model on a large dataset, please follow the [TF2 training](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_training_and_evaluation.md#training) documentation and then [convert](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_mobile_tf2.md) the model to TensorFlow Lite."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "3U2sv0upw04O"
},
This file has been truncated. show original
1 Like