Back to Technical Projects
Python · Computer Vision · Optical Music Recognition

Improved cadenCV

From written notes to audible playback.

CSC370 · Course project

I extended Afika Nyati’s cadenCV, an optical music recognition system that reads sheet-music images and produces MIDI for playback. My project focused on making single-staff inputs work reliably and improving pitch recognition.

What I improved

Teaching the pipeline to handle one staff

The original system worked on its supplied example, but my single-staff scores triggered errors. Debugging revealed assumptions that a second staff would always exist.

01

Fix single-staff failures

I added checks before accessing a second staff and skipped unnecessary cropping for single-staff images, resolving index and image-processing errors.

02

Improve symbol recognition

I expanded the reference images used to match clefs and time signatures, helping the system recognize my test scores.

03

Correct pitch calculation

I revised the formula that maps a notehead’s position relative to the staff to its pitch.

Single-staff test score containing eleven notes
Input: the single-staff test score from my report.
Detected musical symbols marked with red bounding boxes and labels
Output: detected symbols, including notes, bar lines, a clef, and a time signature.

Results on this example

The revised system recognized the staff, bar lines, and time signature. It correctly identified 9 of the 11 note pitches, compared with none before the changes. The two remaining errors confused B4 with A4.

This is a result on one small test score, rather than a general accuracy benchmark. A separate multi-staff example still produced incorrect pitches, while its first staff alone was recognized correctly.

Next steps: Extend the single-staff improvements to multi-staff scores, or process each staff separately. The report also proposes learning-based symbol recognition as future work.

Based on Chenhui Jia’s CSC370 final report, Improved cadenCV: An Optical Music Recognition System with Audible Playback. Original cadenCV by Afika Nyati.