Repository navigation
Conversation
The transformer gives a time signature only its beat type and a multirest no measure count. A small CNN, trained on synthetic SMuFL and font digits, now reads the numerator of time signatures and the number above full-measure rests. A number above such a rest turns it into a multirest of that many measures. - Numerators are used only if the read denominator matches the token. - Rests are placed by barlines when their count matches the measures, else by attention. Rests sharing a measure by attention get no number. - All multirests share one token (rest_2m); rest_3m..rest_10m are marked for removal at the next vocabulary change. - The reader takes staff lines and bar lines from staff detection. Bar lines which reach from the top to the bottom line of a staff are added to it, and the staff is mapped into the coordinates of the transformer image. - remove_tuplet no longer rewrites multirest counts, e.g. 5 to 4. - The MusicXML generator writes time signatures that fit the measure length, e.g. 3/8 instead of 1/4, and takes the opening time from the first measures. The model must be uploaded to the release as digits_v2.zip. Claude-Session: https://claude.ai/code/session_01SGrseKTezufqJfnVwDzaYW Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I tested #240 on the 112 Polish scores samples with the default model (566):
The overall scores barely move, but measures fit the exported meter much more often. The notes don't change, only the meter label does, so one corrected time signature fixes every measure after it. Sample 47: main exported 1/2, #240 the correct 3/4. Sample 61 goes the other way: main opened in the correct 3/4, #240 opens in 5/8 and then switches to 3/4. Not tested: multirest counts (Polish has none) and camera photos. AI usage: Claude and GPT agents ran and analyzed the tests; a second agent checked the figures against the saved results. Generated by Claude Code |
|
Thanks. https://github.com/liebharc/homr/actions/runs/45241027533 already had the same results I believe.
I don't think it "fixes every measure", it just changes the time signature. But yes if the time signature was wrong before then they now align better and reduces the length mismatches you list. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One model reads a fixed crop at the attention position and outputs the numerator, denominator and multirest count. It's trained on rendered Lieder and quartet staves with random time signatures and multirests, plus DeepScores time signatures. A measure with only rests is now a multirest candidate, as the transformer often reads a multirest bar as several rests. The other rests of a measure with a number are dropped. Polish: 13.80% -> 13.81%. Sheet music photos: 4.92% -> 4.90%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #245: full-bar rests in 9/8 and 12/8 were exported four quarters long. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is an experiment for #215 : Possibly it's enough to add a simple second step which runs a digit detector (OCR, just for digits) to improve on time signatures and multi rests.
@birchb the branch is mostly auto generated and has received little testing. If you have time then it would still be interesting to hear if it improves your oboe pieces.