Mozart
An optical music recognition (OMR) system. Converts sheet music to a machine-readable version.
Install / Use
/learn @aashrafh/MozartREADME
<p align="center">
<a href="" rel="noopener">
<img width=400px height=210px src="https://github.com/aashrafh/mozart/blob/main/logo.svg" alt="Mozart logo"></a>
</p>
<p align="center"> :notes: Convert sheet music to a machine-readable version.
<br>
</p>
<p align="center">
<a href="https://github.com/aashrafh/mozart/graphs/contributors" alt="Contributors">
<img src="https://img.shields.io/github/contributors/aashrafh/mozart" /></a>
<a href="https://github.com/aashrafh/mozart/issues" alt="Issues">
<img src="https://img.shields.io/github/issues/aashrafh/mozart" /></a>
<a href="https://github.com/aashrafh/mozart/network" alt="Forks">
<img src="https://img.shields.io/github/forks/aashrafh/mozart" /></a>
<a href="https://github.com/aashrafh/mozart/stargazers" alt="Stars">
<img src="https://img.shields.io/github/stars/aashrafh/mozart" /></a>
<a href="https://github.com/aashrafh/mozart/blob/master/LICENSE" alt="License">
<img src="https://img.shields.io/github/license/aashrafh/mozart" /></a>
</p>
📝 Table of Contents
🧐 About <a name = "about"></a>
The aim of this project is to develop a sheet music reader. This is called Optical Music Recognition (OMR). Its objective is to convert sheet music to a machine-readable version. We take a simplified version where we convert an image of sheet music to a textual representation that can be further processed to produce midi files or audio files like wav or mp3.
<p align="center"> <a href="" rel="noopener"> <img src="https://github.com/aashrafh/Mozart/blob/main/about.png" alt="About"></a> </p>:computer: Methodology <a name = "methodology"></a>
1. Noise Filtering and Binarization
<p align="center"> <a href="" rel="noopener"> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_binary.png" alt="Binary Image"></a> </p>2. Segmentation
<p align="center"> <a href="" rel="noopener"> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_seg_0.png" alt="Segment 1"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_seg_1.png" alt="Segment 2"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_seg_2.png" alt="Segment 3"></a> </p>3. Staff Line Detection and Removal
<p align="center"> <a href="" rel="noopener"> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_without_staff_0.png" alt="No Staff Image 1"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_without_staff_1.png" alt="No Staff Image 2"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_without_staff_2.png" alt="No Staff Image 3"></a> </p>4. Construct The New Staff Lines
<p align="center"> <a href="" rel="noopener"> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_with_new_staff_0.png" alt="New Staff Image 1"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_with_new_staff_1.png" alt="New Staff Image 2"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_with_new_staff_2.png" alt="New Staff Image 3"></a> </p>5. Symbol Detection and Recognition
<p align="center"> <a href="" rel="noopener"> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_detected_0.png" alt="Result 1"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_detected_1.png" alt="Result 2"></a><br> <br> <img src="https://github.com/aashrafh/Mozart/blob/main/output/imgs/02/02_detected_2.png" alt="Result 3"></a> </p>🏁 Install <a name = "Install"></a>
- You can use the attached notebook for quick testing and visualization.
- You can setup an environment on your local machine to run the project:
- Install Conda
conda env create -f requirements.ymlconda activate mozartpython3 main.py <input directory path> <output directory path>
You can find the dataset on Google Drive.
Please check the following issue for another
requirements.ymlfile.
