-
Notifications
You must be signed in to change notification settings - Fork 563
/
mean_teacher.sh
128 lines (106 loc) · 8.65 KB
/
mean_teacher.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/bin/env bash
# ImageNet Supervised Pretrain (ResNet50)
# ======================================================================================================================
# Food 101
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/food101 -d Food101 --num-samples-per-class 4 -a resnet50 \
--lr 0.03 --finetune --seed 0 --log logs/mean_teacher/food101_4_labels_per_class
# ======================================================================================================================
# CIFAR 10
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cifar10 -d CIFAR10 --train-resizing 'cifar' --val-resizing 'cifar' \
--norm-mean 0.4912 0.4824 0.4467 --norm-std 0.2471 0.2435 0.2616 --num-samples-per-class 4 -a resnet50 \
--lr 0.05 --finetune --seed 0 --log logs/mean_teacher/cifar10_4_labels_per_class
# ======================================================================================================================
# CIFAR 100
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cifar100 -d CIFAR100 --train-resizing 'cifar' --val-resizing 'cifar' \
--norm-mean 0.5071 0.4867 0.4408 --norm-std 0.2675 0.2565 0.2761 --num-samples-per-class 4 -a resnet50 \
--lr 0.03 --finetune --seed 0 --log logs/mean_teacher/cifar100_4_labels_per_class
# ======================================================================================================================
# CUB 200
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cub200 -d CUB200 --num-samples-per-class 4 -a resnet50 \
--lr 0.03 --finetune --seed 0 --log logs/mean_teacher/cub200_4_labels_per_class
# ======================================================================================================================
# Aircraft
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/aircraft -d Aircraft --num-samples-per-class 4 -a resnet50 \
--lr 0.03 --finetune --seed 0 --log logs/mean_teacher/aircraft_4_labels_per_class
# ======================================================================================================================
# StanfordCars
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cars -d StanfordCars --num-samples-per-class 4 -a resnet50 \
--lr 0.05 --finetune --seed 0 --log logs/mean_teacher/car_4_labels_per_class
# ======================================================================================================================
# SUN397
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/sun397 -d SUN397 --num-samples-per-class 4 -a resnet50 \
--lr 0.003 --finetune --seed 0 --log logs/mean_teacher/sun_4_labels_per_class
# ======================================================================================================================
# DTD
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/dtd -d DTD --num-samples-per-class 4 -a resnet50 \
--lr 0.003 --finetune --seed 0 --log logs/mean_teacher/dtd_4_labels_per_class
# ======================================================================================================================
# Oxford Pets
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/pets -d OxfordIIITPets --num-samples-per-class 4 -a resnet50 \
--lr 0.003 --finetune --seed 0 --log logs/mean_teacher/pets_4_labels_per_class
# ======================================================================================================================
# Oxford Flowers
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/flowers -d OxfordFlowers102 --num-samples-per-class 4 -a resnet50 \
--lr 0.03 --finetune --seed 0 --log logs/mean_teacher/flowers_4_labels_per_class
# ======================================================================================================================
# Caltech 101
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/caltech101 -d Caltech101 --num-samples-per-class 4 -a resnet50 \
--lr 0.01 --finetune --seed 0 --log logs/mean_teacher/caltech_4_labels_per_class
# ImageNet Unsupervised Pretrain (MoCov2, ResNet50)
# ======================================================================================================================
# Food 101
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/food101 -d Food101 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.01 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/food101_4_labels_per_class
# ======================================================================================================================
# CIFAR 10
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cifar10 -d CIFAR10 --train-resizing 'cifar' --val-resizing 'cifar' \
--norm-mean 0.4912 0.4824 0.4467 --norm-std 0.2471 0.2435 0.2616 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.01 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/cifar10_4_labels_per_class
# ======================================================================================================================
# CIFAR 100
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cifar100 -d CIFAR100 --train-resizing 'cifar' --val-resizing 'cifar' \
--norm-mean 0.5071 0.4867 0.4408 --norm-std 0.2675 0.2565 0.2761 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.01 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/cifar100_4_labels_per_class
# ======================================================================================================================
# CUB 200
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cub200 -d CUB200 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.03 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/cub200_4_labels_per_class
# ======================================================================================================================
# Aircraft
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/aircraft -d Aircraft --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.03 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/aircraft_4_labels_per_class
# ======================================================================================================================
# StanfordCars
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/cars -d StanfordCars --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.03 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/car_4_labels_per_class
# ======================================================================================================================
# SUN397
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/sun397 -d SUN397 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.003 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/sun_4_labels_per_class
# ======================================================================================================================
# DTD
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/dtd -d DTD --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.003 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/dtd_4_labels_per_class
# ======================================================================================================================
# Oxford Pets
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/pets -d OxfordIIITPets --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.003 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/pets_4_labels_per_class
# ======================================================================================================================
# Oxford Flowers
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/flowers -d OxfordFlowers102 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.03 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/flowers_4_labels_per_class
# ======================================================================================================================
# Caltech 101
CUDA_VISIBLE_DEVICES=0 python mean_teacher.py data/caltech101 -d Caltech101 --num-samples-per-class 4 -a resnet50 \
--pretrained-backbone checkpoints/moco_v2_800ep_backbone.pth \
--lr 0.003 --finetune --lr-scheduler cos --seed 0 --log logs/mean_teacher_moco_pretrain/caltech_4_labels_per_class