- Ubuntu 20.04
- RTX 3060 Laptop / A 4000 / A 5000 / M 40 / V 100
- LibFewShot & Dynamic-Meta-filter
- CUDA == 12.1 / 11.8
- Python 3.9 / 3.11
- GCC/G++ 9.4
- PyTorch
- torch
- torchvision
- torchdiffeq
- tqdm
- numpy
- einops
- future
- matplotlib
- numpy
- pandas
- Pillow
- PyYAML
- rich
- scikit-learn
- scipy
- tensorboard
git clone https://github.com/RL-VIG/LibFewShot.git
-
下载 miniImageNet--ravi.tar.gz 并解压到 \your_path\LibFewShot\data\fewshot
-
修改
run_trainer.py
中config
设置的一行为config = Config("./config/test_install.yaml").get_config_dict()
-
修改
config/headers/data.yaml
中的data_root
为需要使用的数据集的路径/data/fewshot/miniImageNet--ravi --> ./data/fewshot/miniImageNet--ravi
-
执行
python run_trainer.py
-
若第一个epoch输出正常,则表明
LibFewShot
已成功安装。
git clone https://github.com/chmxu/Dynamic-Meta-filter.git
python setup.py develop build
python train.py --root {data root} --nExemplars {1/5} --resume {./weights/mini/[1/5]shot.pth.tar}
cd core
python setup.py develop build
cd /path/to/LibFewShot
python run_trainer.py
Frame | Embedding | miniImageNet (5,1) | miniImageNet (5,5) | |
---|---|---|---|---|
1 | Dynamic-Meta-filter | ResNet12 | 67.88 ± 0.49 | 82.11 ± 0.31 |
2 | LibFewShot | ResNet12 | 59.453 | —— |
以下为log_train/.txt
及.log
部分截图,具体训练过程可见压缩包
Dynamic-Meta-filter - miniImageNet (5,1)
Dynamic-Meta-filter - miniImageNet (5,5)
LibFewShot - miniImageNet (5,1)