{"id":15019191,"url":"https://github.com/andrewda/frc-livescore","last_synced_at":"2025-10-24T05:31:49.920Z","repository":{"id":22518984,"uuid":"96502246","full_name":"andrewda/frc-livescore","owner":"andrewda","description":"A Python package to determine the score of an FRC game from images","archived":false,"fork":false,"pushed_at":"2022-06-21T21:13:46.000Z","size":65659,"stargazers_count":29,"open_issues_count":12,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-31T00:12:52.635Z","etag":null,"topics":[],"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/andrewda.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}},"created_at":"2017-07-07T05:27:18.000Z","updated_at":"2024-04-10T16:42:02.000Z","dependencies_parsed_at":"2022-08-26T01:23:49.744Z","dependency_job_id":null,"html_url":"https://github.com/andrewda/frc-livescore","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewda%2Ffrc-livescore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewda%2Ffrc-livescore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewda%2Ffrc-livescore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewda%2Ffrc-livescore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewda","download_url":"https://codeload.github.com/andrewda/frc-livescore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237918710,"owners_count":19387305,"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":[],"created_at":"2024-09-24T19:53:07.722Z","updated_at":"2025-10-24T05:31:39.910Z","avatar_url":"https://github.com/andrewda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FRC Livescore\n\nA package which can determine the score of a live FRC game from an image.\n\n![Travis](https://img.shields.io/travis/andrewda/frc-livescore.svg?style=flat-square)\n[![License](https://img.shields.io/github/license/andrewda/frc-livescore.svg?style=flat-square)](https://github.com/andrewda/frc-livescore/blob/master/LICENSE)\n![Version](https://img.shields.io/pypi/v/livescore.svg?style=flat-square)\n![Downloads](https://img.shields.io/pypi/dm/livescore.svg?style=flat-square)\n\n## Features\n\n- Access to many parts of the scoreboard (and more coming soon)\n- Easy to use\n- Super fast\n- Template matching (it doesn't matter where the scoreboard is on the screen)\n\n## Installation\n\n```bash\n$ pip install livescore\n```\n\nYou will also need to have [Tesseract](https://github.com/tesseract-ocr/tesseract/wiki#installation)\nand OpenCV 3 (instructions for\n[macOS](http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/),\n[Windows](http://docs.opencv.org/3.2.0/d5/de5/tutorial_py_setup_in_windows.html) and\n[Linux](http://docs.opencv.org/3.2.0/d7/d9f/tutorial_linux_install.html))\ninstalled in order for `frc-livescore` to work.\n\n## Usage\n\n*Check out the `examples` directory for full examples on the usage of\n`frc-livescore`.*\n\nA very simple example program would be to just get the score data from a single\nimage. To do this, we'll use OpenCV to read the image.\n\n```python\nfrom livescore import Livescore2018\nimport cv2\n\n# Initialize a new Livescore instance\nfrc = Livescore2018()\n\n# Read the image from disk\nimage = cv2.imread('./examples/scenes/scene1.png')\n\n# Get score data\ndata = frc.read(image)\n\nprint(data)\n```\n\n## API\n\n### Constructor\n\n#### LivescoreYEAR(debug=False, save_training_data=False, training_data=None)\n\n\u003e Currently supported years: 2017, 2018, 2019\n\u003e\n\u003e e.g. Livescore2017(), Livescore2018() or Livescore2019()\n\n- `debug` - Debug mode, where outputs are displayed.\n- `save_training_data` - Whether the training should be saved to disk.\n- `append_training_data` - Whether to start training from scratch\n\nCreates and returns a new Livescore instance with specified options.\n\n### Methods\n\n#### .read(img, force_find_overlay=False)\n\n- `img` - The image to read from.\n- `force_find_overlay` - Whether we should forcefully find the overlay or only do\n   so if the overlay cannot be found.\n\nReads an image and returns an [OngoingMatchDetails](#ongoingmatchdetails) class\ncontaining the score data. Values that could not be determined from the input\nimage will be `False`.\n\n### Classes\n\n#### AllianceYEAR\n\n\u003e Currently supported years: 2017, 2018, 2019\n\u003e\n\u003e e.g. Alliance2017, Alliance2018 or Alliance2019\n\n- `score` - The alliance's score.\n- ... many more year-specific properties.\n\nStores year-specific properties for an alliance, such as whether the switch or\nscale is owned for the 2018 game.\n\n#### OngoingMatchDetails\n\n- `match_key` - The match key, such as \"qf1m2\".\n- `match_name` - The match name, such as \"Qualifications 16 of 128\".\n- `mode` - The current game mode, one of `pre_match`, `auto`, `teleop`, or\n  `post_match`.\n- `time` - The time remaining in the match.\n- `red` - An [Alliance](#alliance) class for the red alliance.\n- `blue` - An [Alliance](#alliance) class for the blue alliance.\n\n\u003c!--\n#### CompletedMatchDetails\n\n- `match` - The match identification, such as \"Qualifications 16\"\n- `winner` - A string containing the match winner; either \"red\" or \"blue\"\n- `red` - An [Alliance](#alliance) class for the red alliance\n- `blue` - An [Alliance](#alliance) class for the blue alliance\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewda%2Ffrc-livescore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewda%2Ffrc-livescore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewda%2Ffrc-livescore/lists"}