-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkpoint and possible fine-tuning on a custom dataset #23
Comments
Hello, try this checkpoint which was trained for 500,000 iterations on the MAESTRO dataset. I haven't tried fine-tuning on these models, but it should be theoretically possible. I expect that it'd require a careful hyperparameter search (epochs, learning rate and betas of Adam, etc.) Regarding velocity, I believe it's the same as the MIDI scale; just that most MIDI files in the dataset don't have too high velocity. AFAIK the original paper tried some heuristic for normalizing the velocity but I didn't reimplement that. You can check out MIDI preprocessing code here. |
Thank you very much. |
Hi Jongwook, My torch version is 1.7.1 Thanks |
I am running the codes with torch==1.3.0 |
Thanks. I think torch==1.3.0 is not available in python3.7. I got much more error with python3.6 with torch==1.3.0 |
You'd have to update error by error, but it should not be a lot since Pytorch has not changed much in the basic functions that are used here. One more complicate issue you may have is to load the pretrained model weights in the updated class .. I could install both 1.2.0 and 1.3.0 for python 3.7.9 ; I think pip still let installing older versions or you'd have to compile it yourself. |
noted. Thanks for the info! |
have you come across this error while loading the MAPS dataset during evaluation? RuntimeError: data/MAPS/flac/MAPS_MUS-bk_xmas1_ENSTDkAm.pt is a zip archive (did you mean to use torch.jit.load()?) |
no, I did not use either MAESTRO or MAPS I wanted to fine-tune on a custom dataset so I made a class similar to MAPS(PianoRollAudioDataset) which reads flac audio and tsv annotations put in the same format as the MAPS dataset. tsv annotations are in the column format 'onset,offset,note,velocity' so it's easy to convert any dataset you'd get to train with that dataset class if you cannot load the prepared MAPS data (which I did not use), you could download it from elsewhere, format it as flac/tsv and load it with the dataset class |
Thank @adrienchaton . |
@jongwook Could you provide the checkpoint after 1 million steps as well? |
the metrics of this model is not very good.
|
Hello Jong Wook,
I would like to experiment fine-tuning Onsets and Frames on a custom dataset with your PyTorch implementation.
For that I would ask, is there a pretrained model checkpoint available for your implementation please ?
Then I would format the custom dataset I would like to fine-tune on as the MAPS example:
_ one folder of .flac audio inputs at 16kHz mono
_ one folder of matched .tsv annotation targets (col 1. onset sec. / col 2. offset sec. / col 3. note / col 4. velocity)
So that it can be read with PianoRollAudioDataset and used for continuing training a previous checkpoint.
One more thing I would please ask for confirmation regarding the annotation files, the 3rd. note column should be midi pitch (in the range of the 88 piano keys) and the 4th. velocity column should be scaled in which range ? (it doesn't seem to go up to 127 like a midi velocity)
Thanks for sharing the model to Pytorch !
The text was updated successfully, but these errors were encountered: