English
music
music-captioning
Inference Endpoints
ivillar seungheondoh commited on
Commit
d771499
0 Parent(s):

Duplicate from seungheondoh/lp-music-caps

Browse files

Co-authored-by: seungheon.doh <seungheondoh@users.noreply.huggingface.co>

Files changed (11) hide show
  1. .gitattributes +37 -0
  2. README.md +47 -0
  3. electronic.mp3 +0 -0
  4. folk.wav +3 -0
  5. orchestra.wav +3 -0
  6. pretrain.pth +3 -0
  7. pretrain.yaml +27 -0
  8. supervised.pth +3 -0
  9. supervised.yaml +26 -0
  10. transfer.pth +3 -0
  11. transfer.yaml +26 -0
.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ orchestra.wav filter=lfs diff=lfs merge=lfs -text
37
+ folk.wav filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - seungheondoh/LP-MusicCaps-MSD
5
+ - seungheondoh/LP-MusicCaps-MC
6
+ language:
7
+ - en
8
+ metrics:
9
+ - bleu
10
+ - bertscore
11
+ tags:
12
+ - music
13
+ - music-captioning
14
+ ---
15
+
16
+ - **Repository:** [LP-MusicCaps repository](https://github.com/seungheondoh/lp-music-caps)
17
+ - **Paper:** [ArXiv](https://arxiv.org/abs/2307.16372)
18
+
19
+ # :sound: LP-MusicCaps: LLM-Based Pseudo Music Captioning
20
+
21
+ [![Demo Video](https://i.imgur.com/cgi8NsD.jpg)](https://youtu.be/ezwYVaiC-AM)
22
+
23
+ This is a implementation of [LP-MusicCaps: LLM-Based Pseudo Music Captioning](#). This project aims to generate captions for music. 1) Tag-to-Caption: Using existing tags, We leverage the power of OpenAI's GPT-3.5 Turbo API to generate high-quality and contextually relevant captions based on music tag. 2) Audio-to-Caption: Using music-audio and pseudo caption pairs, we train a cross-model encoder-decoder model for end-to-end music captioning
24
+
25
+ > [**LP-MusicCaps: LLM-Based Pseudo Music Captioning**](#)
26
+ > SeungHeon Doh, Keunwoo Choi, Jongpil Lee, Juhan Nam
27
+ > To appear ISMIR 2023
28
+
29
+
30
+ ## TL;DR
31
+
32
+
33
+ <p align = "center">
34
+ <img src = "https://i.imgur.com/2LC0nT1.png">
35
+ </p>
36
+
37
+ - **[1.Tag-to-Caption: LLM Captioning](https://github.com/seungheondoh/lp-music-caps/tree/main/lpmc/llm_captioning)**: Generate caption from given tag input.
38
+ - **[2.Pretrain Music Captioning Model](https://github.com/seungheondoh/lp-music-caps/tree/main/lpmc/music_captioning)**: Generate pseudo caption from given audio.
39
+ - **[3.Transfer Music Captioning Model](https://github.com/seungheondoh/lp-music-caps/tree/main/lpmc/music_captioning/transfer.py)**: Generate human level caption from given audio.
40
+
41
+ ## Open Source Material
42
+
43
+ - [pre-trained models](https://huggingface.co/seungheondoh/lp-music-caps)
44
+ - [music-pseudo caption dataset](https://huggingface.co/datasets/seungheondoh/LP-MusicCaps-MSD)
45
+ - [demo](https://huggingface.co/spaces/seungheondoh/LP-Music-Caps-demo)
46
+
47
+ are available online for future research. example of dataset in [notebook](https://github.com/seungheondoh/lp-music-caps/blob/main/notebook/Dataset.ipynb)
electronic.mp3 ADDED
Binary file (480 kB). View file
 
folk.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed9c5e4e03b706c464993ab770388fd3a52b240e4c054ec279322dd48c0cb7a8
3
+ size 1918830
orchestra.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97135f273616d39b11db37a1ec61e0bd729b82c085f7dcdc472b26a37affca8a
3
+ size 1323632
pretrain.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15df9119df8957b29ef18a891c3a1e295804733e07d991177e5a77e4fb121b8d
3
+ size 1783710751
pretrain.yaml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ framework: bart
2
+ data_dir: ../../dataset
3
+ train_data: msd_balence
4
+ text_type: all
5
+ arch: transformer
6
+ workers: 12
7
+ epochs: 4096
8
+ warmup_epochs: 125
9
+ start_epoch: 0
10
+ batch_size: 256
11
+ world_size: 1
12
+ lr: 0.0001
13
+ min_lr: 1.0e-09
14
+ rank: 0
15
+ dist_url: tcp://localhost:12312
16
+ dist_backend: nccl
17
+ seed: null
18
+ gpu: 0
19
+ print_freq: 100
20
+ multiprocessing_distributed: false
21
+ cos: true
22
+ bart_pretrain: false
23
+ label_smoothing: 0.1
24
+ use_early_stopping: false
25
+ eval_sample: 0
26
+ max_length: 110
27
+ distributed: false
supervised.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3adca350245b333729748e9c955855c6d373c5831d8d8feca4e199d48e3e01ee
3
+ size 1783651987
supervised.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ framework: bart
2
+ data_dir: ../../dataset
3
+ train_data: music_caps
4
+ text_type: gt
5
+ arch: transformer
6
+ workers: 8
7
+ epochs: 100
8
+ warmup_epochs: 1
9
+ start_epoch: 0
10
+ batch_size: 64
11
+ world_size: 1
12
+ lr: 0.0001
13
+ min_lr: 1.0e-09
14
+ rank: 0
15
+ dist_url: tcp://localhost:12312
16
+ dist_backend: nccl
17
+ seed: null
18
+ gpu: 0
19
+ print_freq: 100
20
+ multiprocessing_distributed: false
21
+ cos: true
22
+ bart_pretrain: false
23
+ label_smoothing: 0.1
24
+ use_early_stopping: false
25
+ eval_sample: 64
26
+ max_length: 128
transfer.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d04e457e045a09c7c5037222eaed3ffe35f8689b3753a2ce6094c5d5792f9bc
3
+ size 1783650705
transfer.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ framework: bart
2
+ data_dir: ../../dataset
3
+ train_data: msd_balence
4
+ text_type: all
5
+ arch: transformer
6
+ workers: 8
7
+ epochs: 100
8
+ warmup_epochs: 20
9
+ start_epoch: 0
10
+ batch_size: 64
11
+ world_size: 1
12
+ lr: 0.0001
13
+ min_lr: 1.0e-09
14
+ rank: 0
15
+ dist_url: tcp://localhost:12312
16
+ dist_backend: nccl
17
+ seed: null
18
+ gpu: 1
19
+ print_freq: 10
20
+ multiprocessing_distributed: false
21
+ cos: true
22
+ bart_pretrain: false
23
+ label_smoothing: 0.1
24
+ use_early_stopping: false
25
+ eval_sample: 64
26
+ max_length: 128