yangbai123 commited on
Commit
32e28e8
Β·
verified Β·
1 Parent(s): 98e8e4c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +108 -0
README.md ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - action-segmentation
5
+ - temporal-action-segmentation
6
+ - video-understanding
7
+ - diffact
8
+ datasets:
9
+ - gtea
10
+ - 50salads
11
+ - breakfast
12
+ ---
13
+
14
+ # TST: Temporal Segment Transformer for Action Segmentation
15
+
16
+ Pre-trained DiffAct+TST checkpoints for temporal action segmentation on three benchmark datasets.
17
+
18
+ ## Model Description
19
+
20
+ TST (Temporal Segment Transformer) is a plug-in segment-level refinement module that improves frame-level action segmentation backbones. It uses DETR-style Hungarian matching to refine backbone predictions at the segment level via cross-attention and self-attention.
21
+
22
+ These checkpoints use **DiffAct** (ICCV'23) as the backbone with TST applied as a Stage 2 refinement head (frozen backbone).
23
+
24
+ ## Results
25
+
26
+ ### GTEA
27
+
28
+ | Method | F1@10 | F1@25 | F1@50 | Edit | Acc |
29
+ |--------|-------|-------|-------|------|-----|
30
+ | DiffAct | 92.5 | 91.5 | 84.7 | 89.6 | 80.3 |
31
+ | **DiffAct+TST** | **94.2** | **93.0** | **87.1** | **90.9** | **81.4** |
32
+
33
+ ### 50Salads
34
+
35
+ | Method | F1@10 | F1@25 | F1@50 | Edit | Acc |
36
+ |--------|-------|-------|-------|------|-----|
37
+ | DiffAct | 90.1 | 89.2 | 83.7 | 85.0 | 88.9 |
38
+ | **DiffAct+TST** | **92.3** | **91.8** | **87.4** | **87.4** | **89.7** |
39
+
40
+ ### Breakfast
41
+
42
+ | Method | F1@10 | F1@25 | F1@50 | Edit | Acc |
43
+ |--------|-------|-------|-------|------|-----|
44
+ | DiffAct | 80.3 | 75.9 | 64.6 | 78.4 | 76.4 |
45
+ | **DiffAct+TST** | **81.2** | **77.1** | **65.9** | **79.0** | **76.9** |
46
+
47
+ ## Checkpoints
48
+
49
+ ```
50
+ gtea/
51
+ β”œβ”€β”€ split_1_best.pth (21 MB)
52
+ β”œβ”€β”€ split_2_best.pth (21 MB)
53
+ β”œβ”€β”€ split_3_best.pth (21 MB)
54
+ └── split_4_best.pth (21 MB)
55
+
56
+ 50salads/
57
+ β”œβ”€β”€ split_1_best.pth (21 MB)
58
+ β”œβ”€β”€ split_2_best.pth (21 MB)
59
+ β”œβ”€β”€ split_3_best.pth (21 MB)
60
+ β”œβ”€β”€ split_4_best.pth (21 MB)
61
+ └── split_5_best.pth (21 MB)
62
+
63
+ breakfast/
64
+ β”œβ”€β”€ split_1_best.pth (65 MB)
65
+ β”œβ”€β”€ split_2_best.pth (65 MB)
66
+ β”œβ”€β”€ split_3_best.pth (65 MB)
67
+ └── split_4_best.pth (65 MB)
68
+ ```
69
+
70
+ Total: ~525 MB
71
+
72
+ ## Usage
73
+
74
+ ```python
75
+ import torch
76
+ from tst.wrapper import BackboneWithTST, DiffActAdapter
77
+ from tst.tst_refiner import TSTRefiner
78
+
79
+ # Load checkpoint
80
+ ckpt = torch.load("gtea/split_1_best.pth", map_location="cpu")
81
+
82
+ # Build model (see main repo for full setup)
83
+ refiner = TSTRefiner(n_classes=11, feat_dim=192, inner_dim=64)
84
+ model = BackboneWithTST(adapter, refiner, freeze_backbone=True)
85
+ model.load_state_dict(ckpt, strict=False)
86
+ ```
87
+
88
+ See the [GitHub repository](https://github.com/yangbai123/TST-action-segmentation) for full training and evaluation code.
89
+
90
+ ## Training Details
91
+
92
+ | Dataset | lr | lr_transformer | inner_dim | Epochs | Backbone |
93
+ |---------|-----|---------------|-----------|--------|----------|
94
+ | GTEA | 5e-4 | 5e-5 | 64 | 60 | DiffAct |
95
+ | 50Salads | 5e-4 | 5e-5 | 64 | 60 | DiffAct |
96
+ | Breakfast | 5e-5 | 5e-6 | 128 | 60 | DiffAct |
97
+
98
+ All trained with Adam optimizer, cosine annealing LR schedule, batch size 1.
99
+
100
+ ## Citation
101
+
102
+ ```bibtex
103
+ @article{tst2024,
104
+ title={Temporal Segment Transformer for Action Segmentation},
105
+ author={},
106
+ year={2024}
107
+ }
108
+ ```