{"id":16105649,"url":"https://github.com/charlesyuan02/emotion-music-player","last_synced_at":"2025-10-25T01:40:05.262Z","repository":{"id":117150510,"uuid":"365395125","full_name":"CharlesYuan02/emotion-music-player","owner":"CharlesYuan02","description":"A music player that recommends songs based on your detected mood. Created for TOHacks 2021.","archived":false,"fork":false,"pushed_at":"2022-01-04T22:04:37.000Z","size":80057,"stargazers_count":16,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T08:28:25.170Z","etag":null,"topics":["computer-vision","deep-learning","django","emotion-recognition","html-css-javascript","music-player"],"latest_commit_sha":null,"homepage":"https://emotion-music-player.herokuapp.com/","language":"Jupyter Notebook","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/CharlesYuan02.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":"2021-05-08T01:53:16.000Z","updated_at":"2025-02-16T13:13:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0bd009e-a341-45d7-bba5-eefaf857c9e5","html_url":"https://github.com/CharlesYuan02/emotion-music-player","commit_stats":null,"previous_names":["charlesyuan02/emotion-music-player"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Femotion-music-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Femotion-music-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Femotion-music-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Femotion-music-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlesYuan02","download_url":"https://codeload.github.com/CharlesYuan02/emotion-music-player/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910749,"owners_count":20367545,"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":["computer-vision","deep-learning","django","emotion-recognition","html-css-javascript","music-player"],"created_at":"2024-10-09T19:10:16.007Z","updated_at":"2025-10-25T01:40:00.224Z","avatar_url":"https://github.com/CharlesYuan02.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emotion-Based Music Player\n\nA web-based music player which detects the user's mood and recommends a set of songs, while changing its background theme accordingly. Created for TOHacks 2021, May 8-9. Made using HTML/CSS/Javascript for the frontend and Django/Python for the backend. The backend integrates both the Haar Cascade machine learning model and a CNN classifier through OpenCV. The classifier was trained using Colaboratory and Tensorflow. Essentially, the Haar Cascade algorithm utilizes the user's webcam to locate the user's face, which is then passed onto the classifier to detect what emotion the person is displaying. The classifier is trained on 4 emotions: Angry, Happy, Calm, and Sad. Depending on what emotion it detects, it will change the song selection and background of the music player accordingly.\n\n## Getting Started\n\nTo deploy on a local host:\n\n```\ncd main\npython manage.py runserver\n```\n\n### Prerequisites\n\nSee requirements.txt. Note that most of it isn't needed to run locally, but for hosting on Heroku.\n\n```\ntensorflow-cpu\nopencv-python-headless\nimutils==0.5.3\nimageio\ndj-database-url==0.5.0\nDjango==3.1.2\ngunicorn==20.0.4\npsycopg2-binary==2.8.6\nwhitenoise==5.2.0\n```\n\n### Demonstration\n\nWeb app is already deployed on Heroku: https://emotion-music-player.herokuapp.com/\n\n## Built With\n\n* HTML/CSS - Frontend styling and web page design\n* Javascript - Frontend music player functions\n* Django - Backend integration of machine learning algorithms\n* OpenCV - Computer vision tasks\n* Colab/Tensorflow - Training the emotion classifier\n\n### Dataset\n\nThe dataset was initially retrieved from Kaggle from a \u003ca href=\"https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge/data\"\u003eresearch prediction competiton\u003c/a\u003e titled \"Challenges in Representation Learning: Facial Expression Recognition Challenge.\" A \u003ca href=\"https://drive.google.com/drive/folders/1bCFKTkmItIZl73YNUq5QXppLpIdmTgUv\"\u003edirect link\u003c/a\u003e to the dataset is also provided. The data consists of 48x48 pixel grayscale images of faces. The faces have been automatically registered so that the face is more or less centered and occupies about the same amount of space in each image. Even though there are 7 labelled classes of expressions, we only decided to utilize the 4 most common ones.\n\n### Training Results\n\nFinal Accuracy = 58.33%, Validation Accuracy = 54.99%\n\n\u003cimg src=\"https://github.com/Chubbyman2/emotion-music-player/blob/main/media/model_training_results.JPG\"\u003e\n\n## Authors\n\nBig thanks to the organizers at TOHacks and everyone on Team AlphaHax.\n\n* Charles Yuan\n* Dulhan Naidappuwa Waduge\n* Golden Wang\n* Ilan Benjamin\n\n## License\n\nThis project is licensed under the MIT License - see the \u003ca href=\"https://github.com/Chubbyman2/emotion-music-player/blob/main/LICENSE\"\u003eLICENSE\u003c/a\u003e file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesyuan02%2Femotion-music-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesyuan02%2Femotion-music-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesyuan02%2Femotion-music-player/lists"}