Skip to content

Commit

Permalink
Initial Push
Browse files Browse the repository at this point in the history
  • Loading branch information
whwu95 committed Apr 22, 2023
1 parent 2b20cd2 commit 6ae882c
Show file tree
Hide file tree
Showing 10 changed files with 797 additions and 9 deletions.
274 changes: 265 additions & 9 deletions README.md

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions configs/k400/k400_train_rgb_vitb-16-f8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resume:
pretrain:
seed: 1024
data:
dataset: k400
modality: RGB
num_segments: 8
seg_length: 1
batch_size: 32
workers: 4
num_classes: 400
image_tmpl: 'img_{:05d}.jpg'
train_root: '/bpfs/v2_mnt/VIS/test/k400/train_320_frames'
train_list: 'lists/k400/kinetics_rgb_train_se320.txt'
val_root: /bpfs/v2_mnt/VIS/test/k400/kinetics_400_val_320_opencv
val_list: lists/k400/kinetics_rgb_val_se320.txt
label_list: 'lists/k400/kinetics_400_labels.csv'
input_size: 224
random_shift: True
output_path: exps
network:
arch: ViT-B/16 #ViT-B/32 ViT-B/16
init: True
tm: False
drop_out: 0.0
emb_dropout: 0.0
type: clip_k400
sim_header: Transf # Transf None
interaction: VCS # DP VCS
joint_st: False
drop: 0
fix_text: True
fix_video: False
solver:
type: cosine
epochs: 30
start_epoch: 0
epoch_offset: 0
optim: adamw
lr: 5.e-5
lr_warmup_step: 5
weight_decay: 0.2
loss_type: NCE
evaluate: False
clip_ratio: 0.1
grad_accumulation_steps: 1
logging:
print_freq: 10
eval_freq: 1
49 changes: 49 additions & 0 deletions configs/k400/k400_train_rgb_vitl-14-336-f16.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resume:
pretrain:
seed: 1024
data:
dataset: k400
modality: RGB
num_segments: 16
seg_length: 1
batch_size: 8 # mem: 26G
workers: 4
num_classes: 400
image_tmpl: 'img_{:05d}.jpg'
train_root: '/bpfs/v2_mnt/VIS/test/k400/train_320_frames'
train_list: 'lists/k400/kinetics_rgb_train_se320.txt'
val_root: /bpfs/v2_mnt/VIS/test/k400/kinetics_400_val_320_opencv
val_list: lists/k400/kinetics_rgb_val_se320.txt
label_list: 'lists/k400/kinetics_400_labels.csv'
input_size: 336
random_shift: True
output_path: exps
network:
arch: ViT-L/14-336px #ViT-B/32 ViT-B/16
init: True
tm: False
drop_out: 0.0
emb_dropout: 0.0
type: clip_k400
sim_header: Transf # Transf None
interaction: VCS # DP VCS
joint_st: False
drop: 0
fix_text: True
fix_video: False
solver:
type: cosine
epochs: 20
start_epoch: 0
epoch_offset: 0
optim: adamw
lr: 5.e-5
lr_warmup_step: 5
weight_decay: 0.2
loss_type: NCE
evaluate: False
clip_ratio: 0.1
grad_accumulation_steps: 1
logging:
print_freq: 10
eval_freq: 1
49 changes: 49 additions & 0 deletions configs/k400/k400_train_rgb_vitl-14-336-f32.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resume:
pretrain:
seed: 1024
data:
dataset: k400
modality: RGB
num_segments: 32
seg_length: 1
batch_size: 5 # mem: 31G
workers: 4
num_classes: 400
image_tmpl: 'img_{:05d}.jpg'
train_root: '/bpfs/v2_mnt/VIS/test/k400/train_320_frames'
train_list: 'lists/k400/kinetics_rgb_train_se320.txt'
val_root: /bpfs/v2_mnt/VIS/test/k400/kinetics_400_val_320_opencv
val_list: lists/k400/kinetics_rgb_val_se320.txt
label_list: 'lists/k400/kinetics_400_labels.csv'
input_size: 336
random_shift: True
output_path: exps
network:
arch: ViT-L/14-336px #ViT-B/32 ViT-B/16
init: True
tm: False # False tsm tokent1d tokenshift
drop_out: 0.0
emb_dropout: 0.0
type: clip_k400
sim_header: Transf # Transf None
interaction: VCS # DP VCS
joint_st: False
drop: 0
fix_text: True
fix_video: False
solver:
type: cosine
epochs: 20
start_epoch: 0
epoch_offset: 0
optim: adamw
lr: 5.e-5
lr_warmup_step: 5
weight_decay: 0.2
loss_type: NCE
evaluate: False
clip_ratio: 0.1
grad_accumulation_steps: 1
logging:
print_freq: 10
eval_freq: 1
49 changes: 49 additions & 0 deletions configs/k400/k400_train_rgb_vitl-14-336-f8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resume:
pretrain:
seed: 1024
data:
dataset: k400
modality: RGB
num_segments: 8
seg_length: 1
batch_size: 16
workers: 4
num_classes: 400
image_tmpl: 'img_{:05d}.jpg'
train_root: '/bpfs/v2_mnt/VIS/test/k400/train_320_frames'
train_list: 'lists/k400/kinetics_rgb_train_se320.txt'
val_root: /bpfs/v2_mnt/VIS/test/k400/kinetics_400_val_320_opencv
val_list: lists/k400/kinetics_rgb_val_se320.txt
label_list: 'lists/k400/kinetics_400_labels.csv'
input_size: 336
random_shift: True
output_path: exps
network:
arch: ViT-L/14-336px #ViT-B/32 ViT-B/16
init: True
tm: False
drop_out: 0.0
emb_dropout: 0.0
type: clip_k400
sim_header: Transf # Transf None
interaction: VCS # DP VCS
joint_st: False
drop: 0
fix_text: True
fix_video: False
solver:
type: cosine
epochs: 20
start_epoch: 0
epoch_offset: 0
optim: adamw
lr: 5.e-5
lr_warmup_step: 5
weight_decay: 0.2
loss_type: NCE
evaluate: False
clip_ratio: 0.1
grad_accumulation_steps: 1
logging:
print_freq: 10
eval_freq: 1
49 changes: 49 additions & 0 deletions configs/k400/k400_train_rgb_vitl-14-f16.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resume:
pretrain:
seed: 1024
data:
dataset: k400
modality: RGB
num_segments: 16
seg_length: 1
batch_size: 32
workers: 4
num_classes: 400
image_tmpl: 'img_{:05d}.jpg'
train_root: '/bpfs/v2_mnt/VIS/test/k400/train_320_frames'
train_list: 'lists/k400/kinetics_rgb_train_se320.txt'
val_root: /bpfs/v2_mnt/VIS/test/k400/kinetics_400_val_320_opencv
val_list: lists/k400/kinetics_rgb_val_se320.txt
label_list: 'lists/k400/kinetics_400_labels.csv'
input_size: 224
random_shift: True
output_path: exps
network:
arch: ViT-L/14 #ViT-B/32 ViT-B/16
init: True
tm: False
drop_out: 0.0
emb_dropout: 0.0
type: clip_k400
sim_header: Transf # Transf None
interaction: VCS # DP VCS
joint_st: False
drop: 0
fix_text: True
fix_video: False
solver:
type: cosine
epochs: 20
start_epoch: 0
epoch_offset: 0
optim: adamw
lr: 5.e-5
lr_warmup_step: 5
weight_decay: 0.2
loss_type: NCE
evaluate: False
clip_ratio: 0.1
grad_accumulation_steps: 1
logging:
print_freq: 10
eval_freq: 1
49 changes: 49 additions & 0 deletions configs/k400/k400_train_rgb_vitl-14-f8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
resume:
pretrain:
seed: 1024
data:
dataset: k400
modality: RGB
num_segments: 8
seg_length: 1
batch_size: 32
workers: 4
num_classes: 400
image_tmpl: 'img_{:05d}.jpg'
train_root: '/bpfs/v2_mnt/VIS/test/k400/train_320_frames'
train_list: 'lists/k400/kinetics_rgb_train_se320.txt'
val_root: /bpfs/v2_mnt/VIS/test/k400/kinetics_400_val_320_opencv
val_list: lists/k400/kinetics_rgb_val_se320.txt
label_list: 'lists/k400/kinetics_400_labels.csv'
input_size: 224
random_shift: True
output_path: exps
network:
arch: ViT-L/14 #ViT-B/32 ViT-B/16
init: True
tm: False
drop_out: 0.0
emb_dropout: 0.0
type: clip_k400
sim_header: Transf # Transf None
interaction: VCS # DP VCS
joint_st: False
drop: 0
fix_text: True
fix_video: False
solver:
type: cosine
epochs: 20
start_epoch: 0
epoch_offset: 0
optim: adamw
lr: 5.e-5
lr_warmup_step: 5
weight_decay: 0.2
loss_type: NCE
evaluate: False
clip_ratio: 0.1
grad_accumulation_steps: 1
logging:
print_freq: 10
eval_freq: 1
Binary file added docs/bike.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions scripts/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
if [ -f $1 ]; then
config=$1
else
echo "need a config file"
exit
fi

weight=$2

python -m torch.distributed.launch --master_port 1239 --nproc_per_node=8 \
test.py --config ${config} --weights ${weight} ${@:3}
Loading

0 comments on commit 6ae882c

Please sign in to comment.