OMR-Research / mung

Music Notation Graph: a data model for optical music recognition.
MIT License
20 stars 6 forks source link

Command to generate the precedence_inlinks edge in <Data> tag #9

Open linqiu0-0 opened 6 months ago

linqiu0-0 commented 6 months ago

Hi,

We are trying to construct the precedence_inlinks edge and precedence_outlinks to build a midi file for arbitrary MUNG in the MUSCIMA++ dataset. Since the tag (precedence link info) is not included in the MUSCIMA++ dataset, how did you create them in the /test/temp_data_test/CVC-MUSCIMA_W-01_N-10_D-ideal.pdo.xml?

By reading through your code, we found that the baseline_process_symbols.py seems to be able to provide the primary function to create such tags. However, there are several required arguments, such as mlclasses, grammar, parser, and vectorizer, which I don't know what to pass. _Could you provide a sample command for how to generate the Data Items via baseline_processsymbols.py? Or is there any other way for me to create the precedence edge?

Thanks in advance.

apacha commented 6 months ago

I'm afraid that @hajicj knows way more than me about that, as he created them initially. What might help you is this repo, which offers:

linqiu0-0 commented 6 months ago

Hi Alexander,

Thanks for your answer. I really appreciate your help. I have browsed those two links to create a midi file; both of them required a correct precedence_inlinks and precedence_outlinks relationship, but I don't know how to generate such a relationship correctly.

According to the baseline_process_symbols.py's help comment, both the parser and vectorizer seem to be a pickle file, not a Python file. Do you have any idea how to create them?

parser.add_argument('--parser', action='store', required=True,
                        help='Read the pickled feature extractor for parser classifier.')
    parser.add_argument('--vectorizer', action='store', required=True,
                        help='Read the pickled parser classifier.')

I tried to comment out the lines related to these two and generate the precedence graph, but my generated result for the CVC-MUSCIMA_W-01_N-10_D-ideal is different from the one stored in the test/temp_data_test/CVC-MUSCIMA_W-01_N-10_D-ideal.pdo.xml for precedence_inlinks, precedence_outlinks, duration_beats, onset_beats, etc. Do you have any idea on how to generate such a .pdo file that contains the correct information for midi generation?

linqiu0-0 commented 6 months ago

I have one more question to ask. How did you create this CVC-MUSCIMA_W-01_N-10_D-ideal.pdo.xml ? How did you generate precedence_inlinks, precedence_outlinks based on the CVC-MUSCIMA_W-01_N-10_D-ideal.xml?

Thanks in advance~

apacha commented 3 months ago

Unfortunately, I don't know how the .pdo file was generated. I believe it might have been annotated manually with the MUSCIMarker tool, but again, I believe @hajicj is the right point of contact for this.