File size: 5,916 Bytes
5703584
e2a33ed
822338e
 
 
 
 
 
5703584
5a95591
5703584
 
 
 
5a95591
5703584
 
 
 
 
 
 
 
 
5a95591
5703584
 
 
 
 
 
 
 
5a95591
5703584
 
 
 
 
 
 
 
 
 
 
5a95591
5703584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0cb5c97
5703584
 
5a95591
5703584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5a95591
5703584
 
 
 
 
 
 
 
 
 
 
 
5a95591
5703584
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nc-4.0
language:
- en
tags:
- music
size_categories:
- 10K<n<100K
---
# Music Grounding by Short Video E-commerce (MGSV-EC) Dataset

πŸ“„ [[Paper]](https://arxiv.org/abs/2408.16990v2)


## πŸ“ Dataset Summary

**MGSV-EC** is a large-scale dataset for the new task of **Music Grounding by Short Video (MGSV)**, which aims to localize a specific music segment that best serves as the background music (BGM) for a given query short video.  
Unlike traditional video-to-music retrieval (V2MR), MGSV requires both identifying the relevant music track and pinpointing a precise moment from the track.

The dataset contains **53,194 short e-commerce videos** paired with **35,393 music moments**, all derived from **4,050 unique music tracks**. It supports evaluation in two modes:

- **Single-music Grounding (SmG)**: the relevant music track is known, and the task is to detect the correct segment.
- **Music-set Grounding (MsG)**: the model must retrieve the correct music track and its corresponding segment.

## πŸ“ Evaluation Protocol

| Mode           | Sub-task               | Metric                                              |
|:--------------|:----------------------|:-------------------------------------------------|
| *Single-music* | Grounding (SmG)   | mIoU                                                |
| *Music-set*    | Video-to-Music Retrieval (V2MR)     | R$k$   |
| *Music-set*    | Grounding (MsG)     | MoR$k$ |

---
## πŸ“Š Dataset Statistics

| **Split**   | **#Music Tracks** | *Avg. Music Duration(sec)* | #Query Videos | *Avg. Video Duration(sec)* | **#Moments** |
|---------|----------------|----------------------|---------|----------------------|-----------|
| Total | 4,050      | 138.9 Β± 69.6 | 53,194 | 23.9 Β± 10.7 | 35,393 |
| *Train*   | 3,496          | 138.3 Β± 69.4     | 49,194  | 24.0 Β± 10.7     | 31,660    |
| *Val*     | 2,000          | 139.6 Β± 70.0     | 2,000   | 22.8 Β± 10.8     | 2,000     |
| *Test*    | 2,000          | 139.9 Β± 70.1     | 2,000   | 22.6 Β± 10.7     | 2,000     |

- 🎡 Music type ratio: **~60% songs**, **~40% instrumental**
- πŸ“Ή Frame rate: 34 FPS; resolution: 1080Γ—1920

## πŸ“ Data Format

Each row in the CSV file represents a query video paired with a music track and a localized music moment. The meaning of each column is as follows:

| Column Name |	Description |
|:-------------|--------------|
| video_id	| Unique identifier for the short query video. |
| music_id	| Unique identifier for the associated music track. |
| video_start	| Start time of the video segment in full video. |
| video_end	| End time of the video segment in full video. |
| music_start	| Start time of the music segment in full track. |
| music_end	| End time of the music segment in full track. |
| music_total_duration	| Total duration of the music track. |
| video_segment_duration	| Duration of the video segment. |
| music_segment_duration	| Duration of the music segment. |
| music_path	| Relative path to the music track file. |
| video_total_duration	| Total duration of the video. |
| video_width	| Width of the video frame. |
| video_height	| Height of the video frame. |
| video_total_frames	| Total number of frames in the video. |
| video_frame_rate	| Frame rate of the video. |
| video_category	| Category label of the video content (e.g., "Beauty", "Food"). |


## 🧩 Feature Directory Structure

For each video-music pair, we provide pre-extracted visual and audio features for efficient training in [MGSV_feature.zip](./MGSV_feature.zip). The features are stored in the following directory structure:

```shell
[Your data feature path]
.
β”œβ”€β”€ ast_feature2p5
β”‚   β”œβ”€β”€ ast_feature/      # Audio segment features extracted by AST (Audio Spectrogram Transformer)
β”‚   └── ast_mask/         # Segment-level masks indicating valid audio positions
└── vit_feature1
    β”œβ”€β”€ vit_feature/      # Frame-level visual features extracted by CLIP-ViT (ViT-B/32)
    └── vit_mask/         # Frame-level masks indicating valid visual positions
```
Each .pt file corresponds to a single sample and includes:
- frame_feats: shape `[B, max_v_frames, 512]`
- frame_masks: shape `[B, max_v_frames]`, where 1 indicates valid frames, 0 for padding, used for padding control during batching
- segment_feats: shape `[B, max_snippet_num, 768]`
- segment_masks: shape `[B, max_snippet_num]`, indicating valid audio segments

Note:
- These pre-extracted features are compatible with our released PyTorch dataloader [dataloader_MGSV_EC_feature.py](./dataloader/dataloader_MGSV_EC_feature.py).
- Feature file paths are not stored in the CSV. Instead, users should specify the base directories via the following arguments:
  - frame_frozen_feature_path: `[Your data feature path]/vit_feature1`
  - music_frozen_feature_path: `[Your data feature path]/ast_feature2p5`

---
## πŸ“– Citation

If you use this dataset in your research, please cite:

```bibtex
@article{xin2024mgsv,
  title={Music Grounding by Short Video},
  author={Xin, Zijie and Wang, Minquan and Liu, Jingyu and Chen, Quan and Ma, Ye and Jiang, Peng and Li, Xirong},
  journal={arXiv preprint arXiv:2408.16990},
  year={2024}
}
```

## πŸ“œ License

License: **CC BY-NC 4.0**
It is intended **for non-commercial academic research and educational purposes only**.  
For commercial licensing or any use beyond research, please contact the authors.

πŸ“₯ **Raw Vidoes/Music-tracks Access**  
The raw video and music files are not publicly available due to copyright and privacy constraints.  
Researchers interested in obtaining the full media content can contact **Kuaishou Technology** at: [[email protected]](mailto:[email protected]).

πŸ“¬ **Contact for Issues**
For any dataset-related questions or problems (e.g., corrupted files or loading errors), please reach out to: [[email protected]](mailto:[email protected])