Skip to content

Commit

Permalink
updated description of tools.identify
Browse files Browse the repository at this point in the history
  • Loading branch information
alanngnet committed Jul 27, 2024
1 parent 897cd78 commit 04ad689
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ The default value for the optional `marks` argument is 'markers', which makes th

## Inference (work identification)

After you have trained a model and run the evaluation script, you can use the model to identify any music you give it. Provide the music input to the tools.identify.py script by creating a one-line text file that has the metadata about the music, following the format of the text files generated by tools.extract_csi_features.py. For example, you could select any of the entries in the data/covers80/full.txt file, like a speed-augmented version of one of the 80 works
After you have trained a model and run the evaluation script, you can use the model to identify any music you give it. See comments at the top of tools.identify for documentation of the parameters.

Example for covers80:
`python -m tools.identify training/covers80 target.txt -top=10`
`python -m tools.identify data/covers80 training/covers80 youraudio.wav -top=10`

To interpret the output, use the data/covers80/work_id.map text file to see which `work_id` goes with which `work`. Good news: even the bare-bones demo of training from scratch on covers80 shows that CoverHunter does a very good job of identifying versions (covers) of those 80 pop songs.
To interpret the output, use the data/covers80/work_id.map text file to see which `work_id` goes with which `work`. Good news: even the bare-bones demo of training from scratch on covers80 shows that CoverHunter does a good job of identifying versions (covers) of those 80 pop songs.

## Coarse-to-Fine Alignment Training

Expand Down
30 changes: 30 additions & 0 deletions tools/make_embeds.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Utility to generate reference embeddings for all production-use audio data
available, using the production-ready model you trained using, for example,
tools.train_prod.py. Intended for use by tools.identify.py or other
applications you might create that use your fully trained model.
Parameters
----------
data_path : string
Relative path to the project folder containing the same dataset.txt file that you
generated using tools.extract_csi_features.py and used to train your model.
Example: "data/covers80"
model_path : string
Relative path to the project folder containing your trained model.
Example: "training/covers80"
Output
------
Pickle file of reference embeddings.
Created on Sat Jul 27 10:54:22 2024
@author: alan
"""

0 comments on commit 04ad689

Please sign in to comment.