{"id":16021448,"url":"https://github.com/eve-ning/opal","last_synced_at":"2025-06-12T16:36:12.393Z","repository":{"id":45705469,"uuid":"509707343","full_name":"Eve-ning/opal","owner":"Eve-ning","description":"Rhythm Game Score Estimation through Neural Collaborative Filtering","archived":false,"fork":false,"pushed_at":"2023-10-01T01:43:33.000Z","size":103024,"stargazers_count":8,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T16:40:34.196Z","etag":null,"topics":["osu","osumania","pytorch","pytorch-lightning","streamlit"],"latest_commit_sha":null,"homepage":"https://opal-ai.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eve-ning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["Eve-ning"]}},"created_at":"2022-07-02T09:00:48.000Z","updated_at":"2024-09-15T05:36:18.000Z","dependencies_parsed_at":"2023-02-14T18:31:48.786Z","dependency_job_id":null,"html_url":"https://github.com/Eve-ning/opal","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eve-ning%2Fopal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eve-ning%2Fopal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eve-ning%2Fopal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eve-ning%2Fopal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eve-ning","download_url":"https://codeload.github.com/Eve-ning/opal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244150685,"owners_count":20406638,"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":["osu","osumania","pytorch","pytorch-lightning","streamlit"],"created_at":"2024-10-08T18:04:20.473Z","updated_at":"2025-03-18T03:31:37.237Z","avatar_url":"https://github.com/Eve-ning.png","language":"Python","funding_links":["https://github.com/sponsors/Eve-ning"],"categories":[],"sub_categories":[],"readme":"# :arrow_forward: [**Try Out Opal on Streamlit**](https://opal-ai.streamlit.app/)\n![modelsize](https://img.shields.io/github/size/Eve-ning/opal/src/opal/models/V4/2023_08_01_performance_mania_top_10000_20230819163602.csv/lightning_logs/version_1/evaluation/model.ckpt)\n![version](https://img.shields.io/pypi/v/opal-net)\n![pyversions](https://img.shields.io/pypi/pyversions/opal-net)\n[![https://img.shields.io/pypi/dm/opal-net](https://img.shields.io/pypi/dm/opal-net)](https://pypi.org/project/opal-net/)\n\n[![Test Model Pipeline Inference](https://github.com/Eve-ning/opal/actions/workflows/pipeline-test.yml/badge.svg?branch=master)](https://github.com/Eve-ning/opal/actions/workflows/pipeline-test.yml)\n# :comet: opal-net\nopal is an accuracy-prediction model.\n\nIt uses a Matrix Factorization branch \u0026 Multi-layered Perceptron branch to learn associations between user and maps,\nthen use those associations to predict new scores never before seen.\n\n## :hourglass_flowing_sand: Project Status\nCurrently, it's in its early access, that means, it'll have many problems!\nHowever, we're working on it to minimize these issues o wo)b\n\n## :arrow_double_down: Dataset Used\n\nI used the top 10K mania users data from https://data.ppy.sh.\nAfter preprocessing, we use\n- ~10m scores for training\n- ~1m scores for validation and testing each\n\nAfter preprocessing, we found ~30K valid users, ~10K valid maps\nThis models can thus help predict ~300m unplayed scores!\n\n### Users\nWe deem a player on separate years as a different user. This is to reflect\nthe improvement of the player after time.\n\n## :high_brightness: Usage\n\nTo use this, install `opal-net`\n\n```bash\npip install opal-net\n```\n\nThen in a python script\n\u003e Tip: GPU doesn't speed this up significantly, you can use a CPU.\n```py\nfrom opal import OpalNet\n\n# Load in the model\n# You can explicitly specify map_location='cpu' or 'cuda' in map_location=...\nopal = OpalNet.load()\n\n# You can predict a single instance.\n#\n# The 1st arg: \"\u003cUSER_ID\u003e/\u003cYEAR\u003e\",\n# The 2nd arg: \"\u003cMAP_ID\u003e/\u003cSPEED\u003e\" \n#   \u003cYEAR\u003e is the year of the user to test.\n#   \u003cSPEED\u003e can be {-1, 0, or 1} for {HT, NT, DT}\n#\n# For example: \n# Predict Evening on Year 2020, on the map Triumph \u0026 Regret [Regret] at Double Time\npred = opal.predict(\"2193881/2020\", \"767046/1\")\n\n# You can predict multiple entries at the same time. This is much faster that looping the above.\n# Note that both lists must be of the same length!\n# Note: If you're predicting millions, partition the predictions to reduce GPU memory usage!\npreds = opal.predict([\"2193881/2020\", \"2193881/2017\"], [\"767046/0\", \"767046/1\"])\n\n# Note that if the prediction doesn't exist, then it'll raise a ValueError\ntry:\n    opal.predict(\"2193881/2018\", \"767046/0\")\nexcept ValueError:\n    print(\"Prediction Failed!\")\n```\n\n## :brain: AlphaOsu!\nCurrently, opal doesn't provide recommendations, however, you can try out [AlphaOsu!](https://alphaosu.keytoix.vip/).\n- [AlphaOsu! GitHub](https://github.com/AlphaOSU)\n- [Support AlphaOsu!](https://alphaosu.keytoix.vip/support)\n\n## Annex\n\n### Why not Score Metric?\nScore is not straightforward to calculate, and may be difficult to debug. Furthermore, score isn't of interest when\ncalculating performance points anymore.\n\n[osu!mania ScoreV1 Reference](https://osu.ppy.sh/wiki/en/Gameplay/Score/ScoreV1/osu%21mania)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feve-ning%2Fopal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feve-ning%2Fopal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feve-ning%2Fopal/lists"}