{"id":15377749,"url":"https://github.com/emuell/afec-classifiers","last_synced_at":"2025-03-01T14:19:59.072Z","repository":{"id":78166166,"uuid":"368540164","full_name":"emuell/AFEC-Classifiers","owner":"emuell","description":"Audio sample datasets and Tensorflow experiments for AFEC's classifiers","archived":false,"fork":false,"pushed_at":"2021-05-19T09:09:59.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T06:50:02.328Z","etag":null,"topics":["afec","classification-models","dataset","keras-tensorflow","lightgbm","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emuell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2021-05-18T13:27:53.000Z","updated_at":"2022-07-20T13:01:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"6bd7fca8-3b15-43b7-a582-a6fbb9ff0066","html_url":"https://github.com/emuell/AFEC-Classifiers","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"7a17525e2cf1b6cba13844a8fea0fe8aef94abdc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emuell%2FAFEC-Classifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emuell%2FAFEC-Classifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emuell%2FAFEC-Classifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emuell%2FAFEC-Classifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emuell","download_url":"https://codeload.github.com/emuell/AFEC-Classifiers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241375115,"owners_count":19952655,"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":["afec","classification-models","dataset","keras-tensorflow","lightgbm","machine-learning"],"created_at":"2024-10-01T14:13:41.492Z","updated_at":"2025-03-01T14:19:59.022Z","avatar_url":"https://github.com/emuell.png","language":"Python","readme":"# AFEC Classifiers\n\nThis repository holds the sample-train-packs which are used to create [AFEC](https://github.com/emuell/afec)'s default category and classification models. \n\nPlease note that *only* the extracted audio-features for the machine learning models and folder structure is included here. The actual audio-files of the classification packs partly got lost and also can't be uploaded because of unclear copyright issues.\n\nBut you can use the extracted features (`afec-ll.csv`) to test various classification models, and can use the given folder structure for your own classification experiments.\n\n## Scripts\n\nThe `./Scripts` folder contains various python scripts to experiment with Keras / Tensorflow classification models.\u003cbr/\u003e \nSee individual `train_XXX.py` files for details and pip dependencies. Please note: AFEC does not use those Keras models - they are *only* used for the sake of experimentation. \n\n**Please Note**: The datasets are stored via git lfs, so first make sure they are checked out via `git lfs pull`.\n\n\n## Classification Packs\n\n* `OneShot-vs-Loops`: \n__Class__ in AFEC: splits sounds into either _Loop_ or _OneShot_ sounds.\n\n* `OneShot-Categories`: \n__Categories__ in AFEC: detects categories for all sounds which got classified as _OneShots_.\n\n\n## Creating new or updating existing models\n\nThe AFEC crawler executable uses two bundled [shark models](https://github.com/emuell/AFEC/tree/master/Source/Classification/Export/ClassificationModel.h) to evaluate the classifiers. The shark models get built from the sample-packs in this repository.\n\nTo update the existing or built new models, you can use the `Create%SAMPLE_PACK_NAME%Model.[bat|sh]` scripts in the main AFEC main repository at [Scripts/ModelCreator](https://github.com/emuell/AFEC/tree/master/Scripts/ModelCreator).\n\nThey do the following for each sample pack:\n\n```bash\n# Create or update low level descriptors for the sample pack - when necessary.\n$ Crawler -l low $PATH_TO_SAMPLE_PACK -o $PATH_TO_SAMPLE_PACK/features.db\n\n# Load descriptors from $PATH_TO_SAMPLE_PACK and train the networks. Write \n# resulting binary shark model to the crawler's Resource/Models path, using\n# the sample pack folder base-name as model filename.\n$ ModelCreator $PATH_TO_SAMPLE_PACK/features.db \n```\n\n## Testing models or adding new classes \n\nTo test modified sample packs or when adding completely new categories, the `ModelTester` executable can be used to evaluate and debug the performance of the newly created model and classes. To do so, you can use the `Test%SAMPLE_PACK_NAME%Model.bat` scripts in the main AFEC main repository at [Scripts/ModelCreator](https://github.com/emuell/AFEC/tree/master/Scripts/ModelCreator).\n\nSimilar to the ModelCreator, they do the following:\n\n```bash\n# Create or update low level descriptors for the sample pack, when necessary.\n$ Crawler -l low $PATH_TO_SAMPLE_PACK -o $PATH_TO_SAMPLE_PACK/features.db\n\n# Load descriptors from PATH_TO_SAMPLE_PACK and train a simplified version of the model\n# .\n# When done, a summary for each class's prediction accuracy will be printed to the console. \n# Additionally it copies two files to the $PATH_TO_SAMPLE_PACK root folder:\n# - Confusion.csv: the classification confusion matrix (see https://en.wikipedia.org/wiki/Confusion_matrix)\n# - PredictionErrors.csv: a list of all audio files which have been mispredicted\n$ ModelTester $PATH_TO_SAMPLE_PACK/features.db \n```\n\nThe prediction accuracy tells you how good each class/category performs in overall in the tests. Ideally all classes should have an accuracy of \u003e 80% to be somewhat usable later on. \n`Confusion.csv` gives you more details about that, by also listing as which other categories the mispredicted samples got detected instead. \n`PredictionErrors.csv` shows more details about each single sound that got mispredicted, including all calculated class weights for all categories for this specific sample. \n\n`Confusion.csv` usually is a first good overview of how the model performs. `PredictionErrors.csv` then is useful to double-check a categories' (possibly modified) content in detail. If a sample often gets confused with some other category, this usually is a good hint that either the category can't be detected properly (ir isn't well defined) or that a specific sample simply is not a good example for the category: \nIdeally each sample pack's category folder should include a variety of prototype sounds that fit into this category, but all those prototypes should also not smear too much into other categories prototypes.\n\nNote that when adding a completely new category, it's often necessary to double-check all old class prototypes again, to ensure that the old category prototypes are not represented by the new category as well. `Confusion.csv` again should give you a good hint here and `PredictionErrors.csv` what exactly seems to be the problem.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femuell%2Fafec-classifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femuell%2Fafec-classifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femuell%2Fafec-classifiers/lists"}