Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -76,102 +76,6 @@ Pre-trained reranker models for dense reranking stage:
|
|
| 76 |
- Purpose: Fine-grained reranking of recalled candidates
|
| 77 |
- Format: PyTorch checkpoint files (`.pth`)
|
| 78 |
|
| 79 |
-
## 🚀 Quick Start
|
| 80 |
-
|
| 81 |
-
### Download Specific Components
|
| 82 |
-
|
| 83 |
-
#### Using Python Script
|
| 84 |
-
|
| 85 |
-
```bash
|
| 86 |
-
# Download everything
|
| 87 |
-
python download_features.py --all
|
| 88 |
-
|
| 89 |
-
# Download only InternVideo2 features for specific datasets
|
| 90 |
-
python download_features.py --features --datasets msrvtt actnet
|
| 91 |
-
|
| 92 |
-
# Download GRDR checkpoints only
|
| 93 |
-
python download_features.py --grdr
|
| 94 |
-
|
| 95 |
-
# Download Xpool reranker only
|
| 96 |
-
python download_features.py --xpool --datasets msrvtt
|
| 97 |
-
```
|
| 98 |
-
|
| 99 |
-
#### Using Hugging Face CLI
|
| 100 |
-
|
| 101 |
-
```bash
|
| 102 |
-
# Download entire dataset
|
| 103 |
-
huggingface-cli download JasonCoderMaker/GRDR-TVR --repo-type dataset --local-dir ./GRDR-TVR
|
| 104 |
-
|
| 105 |
-
# Download specific component
|
| 106 |
-
huggingface-cli download JasonCoderMaker/GRDR-TVR InternVideo2/msrvtt --repo-type dataset --local-dir ./features
|
| 107 |
-
|
| 108 |
-
# Download GRDR checkpoint for MSR-VTT
|
| 109 |
-
huggingface-cli download JasonCoderMaker/GRDR-TVR GRDR/msrvtt --repo-type dataset --local-dir ./checkpoints
|
| 110 |
-
```
|
| 111 |
-
|
| 112 |
-
### Load Features in Python
|
| 113 |
-
|
| 114 |
-
```python
|
| 115 |
-
import pickle
|
| 116 |
-
from huggingface_hub import hf_hub_download
|
| 117 |
-
|
| 118 |
-
# Download and load InternVideo2 features
|
| 119 |
-
feature_file = hf_hub_download(
|
| 120 |
-
repo_id="JasonCoderMaker/GRDR-TVR",
|
| 121 |
-
filename="InternVideo2/msrvtt/msrvtt_internvideo2.pkl",
|
| 122 |
-
repo_type="dataset"
|
| 123 |
-
)
|
| 124 |
-
|
| 125 |
-
with open(feature_file, 'rb') as f:
|
| 126 |
-
video_features = pickle.load(f)
|
| 127 |
-
|
| 128 |
-
# Access features
|
| 129 |
-
video_id = "video7015"
|
| 130 |
-
embedding = video_features[video_id] # Shape: (512,)
|
| 131 |
-
print(f"Feature shape: {embedding.shape}")
|
| 132 |
-
```
|
| 133 |
-
|
| 134 |
-
### Load GRDR Model
|
| 135 |
-
|
| 136 |
-
```python
|
| 137 |
-
import torch
|
| 138 |
-
from huggingface_hub import hf_hub_download
|
| 139 |
-
|
| 140 |
-
# Download checkpoint
|
| 141 |
-
checkpoint_path = hf_hub_download(
|
| 142 |
-
repo_id="JasonCoderMaker/GRDR-TVR",
|
| 143 |
-
filename="GRDR/msrvtt/best_model/best_model.pt",
|
| 144 |
-
repo_type="dataset"
|
| 145 |
-
)
|
| 146 |
-
|
| 147 |
-
# Load model
|
| 148 |
-
checkpoint = torch.load(checkpoint_path, map_location='cpu')
|
| 149 |
-
print(f"Available keys: {checkpoint.keys()}")
|
| 150 |
-
|
| 151 |
-
# Use with your GRDR model
|
| 152 |
-
from models.grdr import GRDR
|
| 153 |
-
model = GRDR(...)
|
| 154 |
-
model.load_state_dict(checkpoint['model'], strict=False)
|
| 155 |
-
```
|
| 156 |
-
|
| 157 |
-
### Load Xpool Reranker
|
| 158 |
-
|
| 159 |
-
```python
|
| 160 |
-
import torch
|
| 161 |
-
from huggingface_hub import hf_hub_download
|
| 162 |
-
|
| 163 |
-
# Download reranker checkpoint
|
| 164 |
-
reranker_path = hf_hub_download(
|
| 165 |
-
repo_id="JasonCoderMaker/GRDR-TVR",
|
| 166 |
-
filename="Xpool/msrvtt9k_model_best.pth",
|
| 167 |
-
repo_type="dataset"
|
| 168 |
-
)
|
| 169 |
-
|
| 170 |
-
# Load reranker
|
| 171 |
-
checkpoint = torch.load(reranker_path, map_location='cpu')
|
| 172 |
-
# Use with your Xpool model
|
| 173 |
-
```
|
| 174 |
-
|
| 175 |
## 📂 Repository Structure
|
| 176 |
|
| 177 |
```
|
|
@@ -203,79 +107,6 @@ GRDR-TVR/
|
|
| 203 |
└── msrvtt9k_model_best.pth
|
| 204 |
```
|
| 205 |
|
| 206 |
-
## 🔬 Dataset Statistics
|
| 207 |
-
|
| 208 |
-
| Dataset | Videos | Train Queries | Test Queries | Feature Size | GRDR Size | Xpool Size |
|
| 209 |
-
|---------|--------|---------------|--------------|--------------|-----------|------------|
|
| 210 |
-
| MSR-VTT | 10,000 | 9,000 | 1,000 | 932 MB | 494 MB | 1.8 GB |
|
| 211 |
-
| ActivityNet | 20,000 | 10,009 | 4,917 | 1.1 GB | 498 MB | 1.8 GB |
|
| 212 |
-
| DiDeMo | 10,464 | 8,395 | 1,065 | 916 MB | 504 MB | 1.8 GB |
|
| 213 |
-
| LSMDC | 118,081 | 118,081 | 1,000 | 424 MB | 478 MB | 1.8 GB |
|
| 214 |
-
| **Total** | - | - | - | **3.4 GB** | **2.0 GB** | **7.2 GB** |
|
| 215 |
-
|
| 216 |
-
## 🎯 Performance
|
| 217 |
-
|
| 218 |
-
GRDR achieves competitive accuracy with dense retrievers while being significantly more efficient:
|
| 219 |
-
|
| 220 |
-
| Dataset | R@1 | R@5 | R@10 | Storage Reduction | Speed-up |
|
| 221 |
-
|---------|-----|-----|------|-------------------|----------|
|
| 222 |
-
| MSR-VTT | 45.2 | 72.1 | 81.3 | 15.6× | 287× |
|
| 223 |
-
| ActivityNet | 41.8 | 76.2 | 86.4 | 12.3× | 310× |
|
| 224 |
-
| DiDeMo | 43.1 | 71.8 | 81.7 | 18.2× | 265× |
|
| 225 |
-
| LSMDC | 24.3 | 48.9 | 59.2 | 22.1× | 298× |
|
| 226 |
-
|
| 227 |
-
*Compared to CLIP4Clip baseline with exhaustive search*
|
| 228 |
-
|
| 229 |
-
## 💻 Usage in GRDR Pipeline
|
| 230 |
-
|
| 231 |
-
### Complete Retrieval Pipeline
|
| 232 |
-
|
| 233 |
-
```python
|
| 234 |
-
from models.grdr import GRDR
|
| 235 |
-
from reranker.xpool import XpoolReranker
|
| 236 |
-
import torch
|
| 237 |
-
|
| 238 |
-
# 1. Load video features
|
| 239 |
-
video_features = load_internvideo2_features("msrvtt")
|
| 240 |
-
|
| 241 |
-
# 2. Load GRDR model for recall
|
| 242 |
-
grdr_model = GRDR.from_pretrained("JasonCoderMaker/GRDR-TVR", dataset="msrvtt")
|
| 243 |
-
|
| 244 |
-
# 3. Generate candidates (fast generative recall)
|
| 245 |
-
query = "A person playing guitar"
|
| 246 |
-
candidates = grdr_model.generate_candidates(query, top_k=100)
|
| 247 |
-
|
| 248 |
-
# 4. Load Xpool reranker
|
| 249 |
-
reranker = XpoolReranker.from_pretrained("JasonCoderMaker/GRDR-TVR", dataset="msrvtt")
|
| 250 |
-
|
| 251 |
-
# 5. Rerank candidates (dense reranking)
|
| 252 |
-
final_results = reranker.rerank(query, candidates, top_k=10)
|
| 253 |
-
```
|
| 254 |
-
|
| 255 |
-
## 🛠️ Requirements
|
| 256 |
-
|
| 257 |
-
```bash
|
| 258 |
-
pip install torch torchvision
|
| 259 |
-
pip install transformers>=4.30.0
|
| 260 |
-
pip install huggingface_hub
|
| 261 |
-
pip install sentencepiece
|
| 262 |
-
```
|
| 263 |
-
|
| 264 |
-
For the full GRDR codebase, see: [GitHub Repository](https://github.com/JasonCoderMaker/GRDR)
|
| 265 |
-
|
| 266 |
-
## 📜 Citation
|
| 267 |
-
|
| 268 |
-
If you use this dataset or models in your research, please cite:
|
| 269 |
-
|
| 270 |
-
```bibtex
|
| 271 |
-
@inproceedings{grdr2026,
|
| 272 |
-
title={Generative Recall, Dense Reranking: Learning Multi-View Semantic IDs for Efficient Text-to-Video Retrieval},
|
| 273 |
-
author={Anonymous},
|
| 274 |
-
booktitle={Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},
|
| 275 |
-
year={2026}
|
| 276 |
-
}
|
| 277 |
-
```
|
| 278 |
-
|
| 279 |
## 📝 License
|
| 280 |
|
| 281 |
This dataset is released under the MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -288,11 +119,6 @@ The video datasets (MSR-VTT, ActivityNet, DiDeMo, LSMDC) are subject to their or
|
|
| 288 |
- **Xpool**: The reranker architecture is based on X-POOL
|
| 289 |
- **Datasets**: MSR-VTT, ActivityNet Captions, DiDeMo, and LSMDC benchmark creators
|
| 290 |
|
| 291 |
-
## 📧 Contact
|
| 292 |
-
|
| 293 |
-
For questions or issues, please open an issue on the [GitHub repository](https://github.com/JasonCoderMaker/GRDR) or contact the authors.
|
| 294 |
-
|
| 295 |
-
---
|
| 296 |
|
| 297 |
**Dataset Version**: 1.0
|
| 298 |
**Last Updated**: January 2026
|
|
|
|
| 76 |
- Purpose: Fine-grained reranking of recalled candidates
|
| 77 |
- Format: PyTorch checkpoint files (`.pth`)
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
## 📂 Repository Structure
|
| 80 |
|
| 81 |
```
|
|
|
|
| 107 |
└── msrvtt9k_model_best.pth
|
| 108 |
```
|
| 109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
## 📝 License
|
| 111 |
|
| 112 |
This dataset is released under the MIT License. See [LICENSE](LICENSE) for details.
|
|
|
|
| 119 |
- **Xpool**: The reranker architecture is based on X-POOL
|
| 120 |
- **Datasets**: MSR-VTT, ActivityNet Captions, DiDeMo, and LSMDC benchmark creators
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
**Dataset Version**: 1.0
|
| 124 |
**Last Updated**: January 2026
|