{"id":16324110,"url":"https://github.com/apacha/musicsymbolclassifier","last_synced_at":"2025-07-09T16:35:59.701Z","repository":{"id":20973594,"uuid":"91452173","full_name":"apacha/MusicSymbolClassifier","owner":"apacha","description":"A Python project that trains a Deep Neural Network to distinguish between Music Symbols","archived":false,"fork":false,"pushed_at":"2025-03-11T16:49:35.000Z","size":6246,"stargazers_count":36,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-01T13:12:57.463Z","etag":null,"topics":["classification","deep-learning","music-symbols","optical-music-recognition"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apacha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-16T11:47:30.000Z","updated_at":"2025-06-06T12:26:04.000Z","dependencies_parsed_at":"2024-05-03T21:45:07.850Z","dependency_job_id":"a60f74f0-939f-4edc-a2ae-e62e4db51327","html_url":"https://github.com/apacha/MusicSymbolClassifier","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/apacha/MusicSymbolClassifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apacha%2FMusicSymbolClassifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apacha%2FMusicSymbolClassifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apacha%2FMusicSymbolClassifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apacha%2FMusicSymbolClassifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apacha","download_url":"https://codeload.github.com/apacha/MusicSymbolClassifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apacha%2FMusicSymbolClassifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264494973,"owners_count":23617474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","deep-learning","music-symbols","optical-music-recognition"],"created_at":"2024-10-10T22:56:42.207Z","updated_at":"2025-07-09T16:35:59.602Z","avatar_url":"https://github.com/apacha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal Music Symbol Classifier\n\n![](universal-music-symbol-collection.png)\n\nThis repository is the model trainer part of the Universal Music Symbol Classifier, which classifies handwritten Music Symbols into 79 different classes using Deep Learning and a massive dataset of over 90000 tiny images. It is part of a set of two tools:\n\n|[Model Trainer](https://github.com/apacha/MusicSymbolClassifier)|[Manual Classifier](https://github.com/apacha/ManualMusicSymbolClassifier)|\n|:----:|:-----:|\n|Trains a deep network to automatically classify images of handwritten music symbols into 32 different classes.|Mobile Android application that uses a trained model to perform real-time classification on a mobile device.|A small C#/WPF application that can be used manually classify images, used during evaluation|\n|[![Build Status](https://travis-ci.org/apacha/MusicSymbolClassifier.svg?branch=master)](https://travis-ci.org/apacha/MusicSymbolClassifier)|[![Build status](https://ci.appveyor.com/api/projects/status/2lxb6eg6qnfj9jq5?svg=true)](https://ci.appveyor.com/project/apacha/manualmusicsymbolclassifier)|\n|[![codecov](https://codecov.io/gh/apacha/MusicSymbolClassifier/branch/master/graph/badge.svg)](https://codecov.io/gh/apacha/MusicSymbolClassifier) [![Code Health](https://landscape.io/github/apacha/MusicSymbolClassifier/master/landscape.svg?style=flat)](https://landscape.io/github/apacha/MusicSymbolClassifier/master)||\n\nNote my previous project which classifies images into Music scores or something else which can be found in [this](https://github.com/apacha/MusicScoreClassifier) repository on Github and my current project that tries to perform [Music Object Detection](https://github.com/apacha/MusicObjectDetector-TF) (Object Detection for Music Symbols).\n\nAn extensive overview of the results of different parameters is documented in this [Google Spreadsheet](https://docs.google.com/spreadsheets/d/1D9kHRhrOBogcrr5ko1DleCnHVKGGNkwbBc6_mnfA6XE/edit?usp=sharing) and you may also take a look at this [presentation](https://docs.google.com/presentation/d/14g97TnrcI9o-5D6DIY-dMFfBp9kUAqpbe86c-VE83Bk/edit?usp=sharing), given at GREC 2017.\n\n[This scientific paper](https://alexanderpacha.files.wordpress.com/2017/05/grec_2017_paper___towards_a_universal_music_symbol_classifier.pdf) contains more information on this research, including condensed results. If you find this research useful, please consider citing it as:\n\n    @InProceedings{Pacha2017,\n      author       = {Pacha, Alexander and Eidenberger, Horst},\n      title        = {Towards a Universal Music Symbol Classifier},\n      booktitle    = {14th International Conference on Document Analysis and Recognition},\n      year         = {2017},\n      pages        = {35--36},\n      address      = {Kyoto, Japan},\n      organization = {IAPR TC10 (Technical Committee on Graphics Recognition)},\n      publisher    = {IEEE Computer Society},\n      doi          = {10.1109/ICDAR.2017.265},\n      isbn         = {978-1-5386-3586-5},\n      issn         = {2379-2140},\n    }\n\n# Running the application\nThis repository contains several scripts that can be used independently of each other. \nBefore running them, make sure that you have the necessary requirements installed. \n\n## Requirements\n\n- Python 3.5+ (tested with 3.9)\n- Tensorflow 2.8.0\n\nOptional: If you want to print the graph of the model being trained, install GraphViz on Windows via http://www.graphviz.org/Download_windows.php and add /bin to the PATH or run `sudo apt-get install graphviz` on Ubuntu (see https://github.com/fchollet/keras/issues/3210)\n\nFor installing Tensorflow and Keras we recommend using [Anaconda](https://www.continuum.io/downloads) or \n[Miniconda](https://conda.io/miniconda.html) as Python distribution (we did so for preparing Travis-CI and it worked).\n\n## Training the model\n\nRun `python ModelTrainer/TrainModel.py` or `ModelTrainer/TrainBestModel.ps1` for automatically training a neural network with the best available configuration. It will automatically download and extract the HOMUS dataset.\n\nThe result of this training is a .h5 (e.g. res_net_4.h5) file that contains the trained model and when running via the PowerShell-script a transcript of the entire training is also created for later investigation.\n\n`TrainModel.py` has a couple of parameters that can be changed for the training. Note that all options have meaningful default values, so they are completely optional:\n\n- `--dataset_directory` the folder where the images should be stored. Default is `data`\n- `--datasets` Specifies which datasets are used for the training. One or multiple datasets of the following are possible: homus, rebelo1, rebelo2, printed, audiveris, muscima_pp, fornes or openomr. Multiple values are connected by a separating comma, i.e. `homus,rebelo1`.\n- `--use_existing_dataset_directory` Whether to delete and recreate the dataset-directory (by downloading the appropriate files from the internet, extracting and generating images) or simply use whatever data currently is inside of that directory. This flag should not be provided, if you switch datasets.\n- `--model_name` the name of the model configuration used for training (e.g. `vgg4`). Run `ListAvailableConfigurations.ps1` or `models/ConfigurationFactory.py` to get a list of all available configurations\n- `--width` Width of the input-images for the network in pixel\n- `--height` Height of the input-images for the network in pixel\n\nFurther parameters for optional hyperparameter tuning\n\n- `--minibatch_size` Size of the minibatches for training, typically one of 8, 16, 32, 64 or 128\n- `--optimizer` The optimizer used for the training, can be SGD, Adam or Adadelta\n- `--no_dynamic_learning_rate_reduction` True, if the learning rate should not be scheduled to be reduced on a plateau\n- `--class_weights_balancing_method` The optional weight balancing method for handling unbalanced datasets. If provided, valid choices are simple or skBalance. 'simple' uses 1/sqrt(#samples_per_class) as weights for samples from each class to compensate for classes that are underrepresented. 'skBalance' uses the Python SkLearn module to calculate more sophisticated weights.\n\n\n# License\n\nPublished under MIT License,\n\nCopyright (c) 2022 [Alexander Pacha](http://alexanderpacha.com), [TU Wien](https://informatics.tuwien.ac.at/people/alexander-pacha)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapacha%2Fmusicsymbolclassifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapacha%2Fmusicsymbolclassifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapacha%2Fmusicsymbolclassifier/lists"}