mnne commited on
Commit
6456abe
1 Parent(s): 5b2dd19

Create ReadMe.md

Browse files
Files changed (1) hide show
  1. README.md +22 -0
README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Duck and Cover - Genre Autoencoder
2
+
3
+ This model is part of the [duck_and_cover](https://github.com/mcschmitz/duck_and_cover) repository. Scope of this repository is to generate album covers based on several conditions like release year, artist & album name, and genre(s) using different types of GANs. The possible list of genres that this encoder covers can be found [here](https://github.com/mcschmitz/duck_and_cover/blob/master/data/genres.txt).
4
+
5
+ For training [prajjwal1/bert-mini](https://huggingface.co/prajjwal1/bert-mini) has been finetuned on a list of 466.045 albums with different genre combinations taken from the aforementioned list to embed genre information, while a simple Linear Layer was trained to decode and predict the given genre from the embeddings. The albums are real-world albums retrieved using the Spotify API. The intention behind this model is that Hard Rock is somehow related to Rock, while Pop Rock is related to Rock as well and a BERT Tokenizer can capture this information as a lot of music genres are described by using pre- and suffixes.
6
+ The model was validated on 133.155 during training and tested on 66.578. It yields a 98.29% Exact Match ratio on the testset and a 98.24% Exact Match Ratio on the validation set, which is extremely high given that the model can embed up to 3452 labels and most of the albums only had up to 5 labels.
7
+
8
+ ## Usage
9
+ The model can be used to embed genres to a 256 dimensional space using the following input.
10
+
11
+ ```python
12
+ from transformers import AutoModel, AutoTokenizer
13
+
14
+ model = AutoModel.from_pretrained("mnne/duck-and-cover-genre-encoder")
15
+ tokenizer = AutoTokenizer.from_pretrained("mnne/duck-and-cover-genre-encoder")
16
+
17
+ genres = " , ".join(["classic soul", "memphis soul", "soul", "soul blues", "southern soul"])
18
+
19
+ x = tokenizer([genres], return_tensors="pt")
20
+
21
+ output = model(**x)
22
+ ```