Questions tagged [few-shot-learning]

Few-shot learning is a machine learning problem for object categorization using only a "few" samples, as opposed to the several thousand that may be required in more conventional ML problems. Use with [tensorflow] or other related technologies as well as any languages used.

18 questions
3
votes
1 answer

What are the differences between fine tuning and few shot learning?

I am trying to understand the concept of fine-tuning and few-shot learning. I understand the need for fine-tuning. It is essentially tuning a pre-trained model to a specific downstream task. However, recently I have seen a plethora of blog posts…
2
votes
2 answers

setfit training with a pandas dataframe

I would like to train a zero shot classifier on an annotated sample dataset. I am following some tutorials but as all use their own data and the same pretarined model, I am trying to confirm: Is this the best approach? Data example: import pandas…
PeCaDe
  • 277
  • 1
  • 8
  • 33
2
votes
1 answer

YoloV8 Label file when there is no bounding box?

I wanted to train my yolo model and see if I can detect pneumonia in images So the images I have of X ray and the one which has pneumonia , its labels look like the following 1 0.2 0.23 0.32 0.23 Where first value is lable and rest four are the…
Sadaf Shafi
  • 1,016
  • 11
  • 27
2
votes
2 answers

What are the differences between adapter tuning and prefix tuning?

I am trying to understand the concept of adapter-tuning, prompt-tuning, and prefix-tuning in the context of few-shot learning. It appears to me that I can apply prompt tuning to a black box language model. I read for prompt tuning the entire…
0
votes
0 answers

convert few shot learning example to API

I have made a little example of few shot sentiment analysis using the GUI of OPENAI and it seems to work reasonably well. I would now like to convert this into API code, but I am struggling to see a minimal example of how to do this. On the GUI, I…
AJW
  • 5,569
  • 10
  • 44
  • 57
0
votes
0 answers

Using locally saved SetFit model

I saved SetFit model locally, now I want to use it in order to make predictions (for model deployment), I tried the following code: from setfit import SetFitModel model =…
0
votes
2 answers

AttributeError: module 'os' has no attribute 'killpg'

This is my code: if __name__ == "__main__": try: main() except Exception: exc_info = sys.exc_info() traceback.print_exception(*exc_info) os.killpg(0, signal.SIGKILL) exit(0) When an exception occurs in…
0
votes
0 answers

Encountering zero division error while trying run this code, the nsamples read zero values

I am trying to run a GitHub repository about few shot detection but I encountered an error here while trying to train my code using this train_meta.py import sys, os, time, math from tqdm import tqdm import torch import torch.optim as optim from…
0
votes
0 answers

How can I get a good ML code with good documentation to compare my model with

I finish training my model, and I get a good result. My problem is medical image segmentation using 3D images and few-shot learning. Now I want to compare my result with state-of-the-art methods for research purposes. I need help finding a clean…
0
votes
0 answers

Training Flair Few Shot Learning Model Results in an OSError Related to Model Loading

When I am creating a few shot learning model by finetuning tars-base, the model crashes after training without saving to my local drive like it's supposed to. The training completed all epochs before crashing. The same code has worked in the…
0
votes
0 answers

Image Segmentation using MAML algorithm (same objects exist in all tasks)

I have an n-takes k-shots medical image segmentation problem. -Tasks: Different human organs ex: liver, spleen, kindness etc... -Shots: 10 CT scans NIFTI images, where all tasks(human organs) exist in all shots, but one of them is labelled to match…
0
votes
0 answers

Problem related to tensor. At the end of the code, error comes only

Following code produces error in the last few lines only. Please see the last lines of code and tell the solution of the error which is related to some tensor issure from datasets import load_dataset from sentence_transformers.losses import…
0
votes
0 answers

Few shot image clasification with Reptile Keras

I am trying to use the few shot learning example provided by Keras using the Reptile algorithm (https://keras.io/examples/vision/reptile/) with my own database. But after loading the database I get an error when i want to visualize some examples…
0
votes
1 answer

Too much fluctuation in F1 Score curve during meta training with MAML

I am training VGG11 on a custom image dataset for 3-way 5-shot image classification using MAML from learn2learn. I am encapsulating the whole VGG11 model with MAML, i.e., not just the classification head. My hyperparameters are as follows: Meta LR:…
0
votes
0 answers

How to combine multiple dataset efficiently to solve using meta learning?

I am solving a meta-learning problem using Reptile Algorithm as used here. I have two datasets. One contains the following classes: iris, pupil, and sclera along with their annotations. Another contains classes as follows: iris, pupil, sclera, and…
1
2