Update README.md
Browse files
README.md
CHANGED
|
@@ -1,174 +1,173 @@
|
|
| 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 |
-
import
|
| 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 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
<sup
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
- [
|
| 170 |
-
- [
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
We thank the authors for making their code publicly available.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: 'Trokens: Semantic-Aware Relational Trajectory Tokens Dataset'
|
| 3 |
+
tags:
|
| 4 |
+
- computer-vision
|
| 5 |
+
- action-recognition
|
| 6 |
+
- few-shot-learning
|
| 7 |
+
- video-understanding
|
| 8 |
+
- point-tracking
|
| 9 |
+
size_categories:
|
| 10 |
+
- 100K<n<1M
|
| 11 |
+
task_categories:
|
| 12 |
+
- video-classification
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Trokens Dataset: Semantic-Aware Relational Trajectory Tokens for Few-shot Action Recognition
|
| 16 |
+
|
| 17 |
+
This dataset contains the preprocessed data for "Trokens: Semantic-Aware Relational Trajectory Tokens for Few-Shot Action Recognition" (ICCV 2025).
|
| 18 |
+
|
| 19 |
+
[**Paper**]() | [**Project Page**](https://www.cs.umd.edu/~pulkit/trokens/) | [**Code**](https://github.com/pulkitkumar95/trokens)
|
| 20 |
+
|
| 21 |
+
## Dataset Overview
|
| 22 |
+
|
| 23 |
+
This dataset provides semantic-aware relational trajectory tokens (Trokens) extracted from multiple action recognition datasets, designed specifically for few-shot action recognition tasks. The dataset includes semantically meaningful point trajectories extracted using CoTracker3 and DINOv2 features, along with few-shot episode split information.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
The dataset contains two main components:
|
| 28 |
+
|
| 29 |
+
### 1. Point Tracking Data (`cotracker3_bip_fr_32/`)
|
| 30 |
+
|
| 31 |
+
Semantic point trajectories extracted using CoTracker3 with bipartite clustering on DINOv2 features:
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
cotracker3_bip_fr_32/
|
| 35 |
+
└── {dataset_name}/
|
| 36 |
+
└── feat_dump/
|
| 37 |
+
└── {video_name}.pkl
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
Each pickle file contains:
|
| 41 |
+
- **`pred_tracks`**: Tracked point coordinates across frames [T, N, 2]
|
| 42 |
+
- **`pred_visibility`**: Visibility mask for each point [T, N]
|
| 43 |
+
- **`obj_ids`**: Object/cluster IDs for each point [N]
|
| 44 |
+
- **`point_queries`**: Original query point indices [N]
|
| 45 |
+
|
| 46 |
+
### 2. Few-shot Split Information (`few_shot_info/`)
|
| 47 |
+
|
| 48 |
+
Data splits for few-shot learning evaluation across multiple datasets.
|
| 49 |
+
|
| 50 |
+
## Point Extraction Details
|
| 51 |
+
|
| 52 |
+
### Semantic Point Tracking
|
| 53 |
+
- **Method**: CoTracker3 with semantic clustering on DINOv2 features
|
| 54 |
+
- **Clustering**: Bipartite clustering for semantic entity detection
|
| 55 |
+
- **Parameters**:
|
| 56 |
+
- Clustering method: `bipartite`
|
| 57 |
+
- Number of frames for clustering: 32
|
| 58 |
+
- Points filtered based on spatial proximity to remove redundancy
|
| 59 |
+
|
| 60 |
+
### Video Processing
|
| 61 |
+
- **Frame Rate**:
|
| 62 |
+
- Most datasets: 10 fps
|
| 63 |
+
- Something Something V2 (SSV2): 12 fps (original video fps)
|
| 64 |
+
- **Point Filtering**: Redundant points removed based on spatial proximity
|
| 65 |
+
- **GPU Acceleration**: CUDA support for efficient processing
|
| 66 |
+
|
| 67 |
+
### Key Features
|
| 68 |
+
- Robust point tracking across video frames using CoTracker3
|
| 69 |
+
- Semantic point extraction through clustering on DINOv2 features
|
| 70 |
+
- Point filtering to remove redundant tracks
|
| 71 |
+
- Support for different clustering strategies and parameters
|
| 72 |
+
|
| 73 |
+
## Supported Datasets
|
| 74 |
+
|
| 75 |
+
The point tracking data is available for multiple action recognition datasets:
|
| 76 |
+
- **Something Something V2 (SSV2)**
|
| 77 |
+
- **Kinetics**
|
| 78 |
+
- **UCF-101**
|
| 79 |
+
- **HMDB-51**
|
| 80 |
+
- And others
|
| 81 |
+
|
| 82 |
+
## Usage
|
| 83 |
+
|
| 84 |
+
### Loading Point Tracking Data
|
| 85 |
+
|
| 86 |
+
```python
|
| 87 |
+
import pickle
|
| 88 |
+
import numpy as np
|
| 89 |
+
|
| 90 |
+
# Load point tracking data for a video
|
| 91 |
+
with open('cotracker3_bip_fr_32/{dataset}/{video_name}.pkl', 'rb') as f:
|
| 92 |
+
data = pickle.load(f)
|
| 93 |
+
|
| 94 |
+
pred_tracks = data['pred_tracks'] # [T, N, 2] - point coordinates
|
| 95 |
+
pred_visibility = data['pred_visibility'] # [T, N] - visibility mask
|
| 96 |
+
obj_ids = data['obj_ids'] # [N] - cluster/object IDs
|
| 97 |
+
point_queries = data['point_queries'] # [N] - query point indices
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
### Loading Few-shot Splits
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
# Load few-shot episode information
|
| 104 |
+
# (Structure depends on specific dataset format)
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## Applications
|
| 108 |
+
|
| 109 |
+
This dataset is designed for:
|
| 110 |
+
- **Few-shot Action Recognition**: Training models with limited labeled examples
|
| 111 |
+
- **Video Understanding**: Learning from semantic-aware relational trajectory tokens (Trokens)
|
| 112 |
+
- **Point Tracking Research**: Semantic point trajectory analysis
|
| 113 |
+
- **Action Recognition**: General video classification tasks
|
| 114 |
+
|
| 115 |
+
## Technical Details
|
| 116 |
+
|
| 117 |
+
### Dependencies
|
| 118 |
+
- PyTorch
|
| 119 |
+
- NumPy
|
| 120 |
+
- Pandas
|
| 121 |
+
- Einops
|
| 122 |
+
- CoTracker3 (for point tracking)
|
| 123 |
+
- DINOv2 (for feature extraction)
|
| 124 |
+
|
| 125 |
+
### Point Extraction Pipeline
|
| 126 |
+
1. **Feature Extraction**: DINOv2 features computed for video frames
|
| 127 |
+
2. **Semantic Clustering**: Bipartite clustering to identify semantic entities
|
| 128 |
+
3. **Point Sampling**: Points sampled from cluster centers
|
| 129 |
+
4. **Trajectory Tracking**: CoTracker3 used to track points across frames
|
| 130 |
+
5. **Post-processing**: Redundant points filtered based on spatial proximity
|
| 131 |
+
|
| 132 |
+
## Citation
|
| 133 |
+
|
| 134 |
+
If you use this dataset in your research, please cite our papers:
|
| 135 |
+
|
| 136 |
+
```bibtex
|
| 137 |
+
@inproceedings{kumar2025trokens,
|
| 138 |
+
title={Trokens: Semantic-Aware Relational Trajectory Tokens for Few-Shot Action Recognition},
|
| 139 |
+
author={Kumar, Pulkit and Huang, Shuaiyi and Walmer, Matthew and Rambhatla, Sai Saketh and Shrivastava, Abhinav},
|
| 140 |
+
booktitle={International Conference on Computer Vision},
|
| 141 |
+
year={2025}
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
@inproceedings{kumar2024trajectory,
|
| 145 |
+
title={Trajectory-aligned Space-time Tokens for Few-shot Action Recognition},
|
| 146 |
+
author={Kumar, Pulkit and Padmanabhan, Namitha and Luo, Luke and Rambhatla, Sai Saketh and Shrivastava, Abhinav},
|
| 147 |
+
booktitle={European Conference on Computer Vision},
|
| 148 |
+
pages={474--493},
|
| 149 |
+
year={2024},
|
| 150 |
+
organization={Springer}
|
| 151 |
+
}
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
## Authors
|
| 155 |
+
|
| 156 |
+
[**Pulkit Kumar***](https://www.cs.umd.edu/~pulkit/)<sup>1</sup> · [**Shuaiyi Huang***](https://shuaiyihuang.github.io/)<sup>1</sup> · [**Matthew Walmer**](https://www.cs.umd.edu/~mwalmer/)<sup>1</sup> · [**Sai Saketh Rambhatla**](https://rssaketh.github.io)<sup>1,2</sup> · [**Abhinav Shrivastava**](http://www.cs.umd.edu/~abhinav/)<sup>1</sup>
|
| 157 |
+
|
| 158 |
+
<sup>1</sup>University of Maryland, College Park    <sup>2</sup>GenAI, Meta<br>
|
| 159 |
+
<sup>*Equal contribution</sup>
|
| 160 |
+
|
| 161 |
+
## License
|
| 162 |
+
|
| 163 |
+
This dataset is released under the MIT License.
|
| 164 |
+
|
| 165 |
+
## Acknowledgments
|
| 166 |
+
|
| 167 |
+
This dataset is built upon:
|
| 168 |
+
- [CoTracker](https://github.com/facebookresearch/co-tracker): For robust point tracking
|
| 169 |
+
- [TATs](https://github.com/pulkitkumar95/tats): Trajectory-aligned Space-time Tokens for Few-shot Action Recognition
|
| 170 |
+
- [DINOv2](https://github.com/facebookresearch/dinov2): For semantic feature extraction
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
We thank the authors for making their code publicly available.
|
|
|