-
Notifications
You must be signed in to change notification settings - Fork 13
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
Adapt Miyao Staff Finding for Aquitanian notation #1254
Comments
Here's some documentation of running Miyao Staff Finding with the The image used was staff lines from Einsiedeln Codex 366 009v classified with Pixel The following Rodan workflow was used
'Number of Lines = 5, 6, 7, 8':
|
Here's the results of testing
|
You should be using "Number of Lines = 1" at all times, because it refers to the number of staff lines per stave. In Aquitanian, you only have one staff line per stave. It may be quicker to solve this problem, if you use an independent (i.e., non-Gamera) algorithm to find line segments on a page. Use miyao.py but do a special case when "Number of Lines == 1" Ask ChatGPT for help finding algorithms then use Code Pilot to write and debug your code. You need to worry about the case when a staff lines may be broken up into shorter line segments. This may happen when we try to detect the staff lines in red automatically later. |
Got it. I wanted to just test first to see how Miyao Staff Finding would work for different numbers of staff lines, but will keep it at 1 from now on.
I could do a similar method to when I was working on finding the reference line, which used cv2 HoughLines or bounding boxes. I'm still figuring out exactly what the JSOMR is outputting so I know what information I need to put into it. This is the output I can get by running cv2.HoughLines after some filtering. I used lines classified from 029v Seq 001. Let me know what you think or if there's a different approach you were thinking of. |
Thanks for the feedback @fujinaga! @DeannaLC, for this is very important to follow the actual path of the staff line. So, if the page curves and, because of that, the music reference line curves, we need to be able to follow this curvature as best as possible; otherwise, the prediction of the pitches will be all wrong. So, rather than using a straight line (like in this example of |
Got it, I think for the time being I'm leaning towards using line detection algorithms that aren't Miyao since I was struggling a bit to understand what's already implemented. One approach I'm experimenting with is using These are some results after preprocessing with one-bit, despeckle, and dilate. |
The current solution I've come up with uses bounding boxes around each reference line, then divides it into a certain number of slices (default I'm using is 8). Then I draw a box around each segment and connect the segments together. Sample result using 015v Seq 001: Results as a JSON file: Lines.json For now I'm going to make a separate branch and have it as its own job.
Did you mean for this to be a part of Miyao Staff Finding (job with JSON output that's part of full workflow) or Miyao Staff Finder (job with PNG output)? As well, are we hoping for it to just be a separate case of the existing job as opposed to a new job? |
@DeannaLC, could you please clarify which is the original staff line in the manuscript (which you draw with Pixel given that it was a nearly invisible line) and which is the line predicted based on the 8 divisions you made? I guess what is in black is the line you draw in pixel (the ground truth), and the red lines are the prediction of the line after dividing it into 8 segments and try to predict the individual parts, right? And summarising your process here:
If there are any inaccuracies here, please let us know :) |
Sorry yes, the ground truth line that I classified from Pixel is the black line, and the red line is the one that's being drawn in. I would describe the steps as the following:
I've also added a branch called one-staff-finding which contains a One Staff Finding job. It takes in a png of the classified reference line and returns a JSOMR and optionally a png that has the image with the lines drawn over it. |
Adapt Miyao Staff Finding to work with just one staff line: the music reference line for Aquitanian music sources (see the red line between the neumes for each music system).
The text was updated successfully, but these errors were encountered: