Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nimavahdat/few-shot-learning
This is the implementation of the approach described in the paper "Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions" by Ye, Han-Jia et al. The proposed approach adapts instance embeddings to the target classification task with a set-to-set function and achieves state-of-the-art results on multiple few-shot learning benchmarks.
https://github.com/nimavahdat/few-shot-learning
Last synced: about 11 hours ago
JSON representation
This is the implementation of the approach described in the paper "Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions" by Ye, Han-Jia et al. The proposed approach adapts instance embeddings to the target classification task with a set-to-set function and achieves state-of-the-art results on multiple few-shot learning benchmarks.
- Host: GitHub
- URL: https://github.com/nimavahdat/few-shot-learning
- Owner: NimaVahdat
- License: mit
- Created: 2023-04-07T17:51:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-14T01:25:58.000Z (about 2 months ago)
- Last Synced: 2024-09-14T14:59:34.875Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 467 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FEAT: Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions
This is the implementation of the approach described in the paper "Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions" by Ye, Han-Jia et al. The proposed approach adapts instance embeddings to the target classification task with a set-to-set function and achieves state-of-the-art results on multiple few-shot learning benchmarks.## Installation
Required packages:
* Pytorch
* tensorboardX
* Numpy
## Dataset
Once you have downloaded the dataset, you will need to create a new folder named "images" within the "minimagenet" or "retail" folder, and place all of the images into this folder. The data loader that we have provided will automatically read the images from the "images" folder.## Training
Example for traing the model
```bash
python train.py --lr 0.0001 --temperature 64 \
--max_epoch 100 --model_type AmdimNet --dataset MiniImageNet \
--init_weights ./miniimagenet.pth \
--save_path ./MINI_1shot_5way/ \
--shot 1 --way 5 --step_size 10 --gamma 0.5 \
```The results on the MiniImageNet and TieredImageNet datasets are shown below:
## MiniImageNet
| Model | 1-Shot 5-Way | 5-Shot 5-Way |
|:------:|:-------------:|:------------:|
| ProtoNet | 62.21 | 80.64 |
| BILSTM | 63.04 | 80.63 |
| DEEPSETS | 64.24 | 80.51 |
| GCN | 63.93 | 81.65 |
| FEAT | **66.08** | **81.95** |## TieredImageNet
| Model | 1-Shot 5-Way | 5-Shot 5-Way |
|:------:|:-------------:|:------------:|
| ProtoNet | 67.93 | 84.23 |
| BILSTM | 67.84 | 83.53 |
| DEEPSETS | 68.89 | 84.86 |
| GCN | 66.20 | 84.64 |
| FEAT | **70.23** | **84.37** |### References
Ye, Han-Jia, et al. "Few-shot learning via embedding adaptation with set-to-set functions." Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2020.