{"id":20601726,"url":"https://github.com/lkuich/coach-python","last_synced_at":"2026-06-28T21:09:52.161Z","repository":{"id":35121695,"uuid":"185541295","full_name":"lkuich/coach-python","owner":"lkuich","description":"Coach Client Library for Python","archived":false,"fork":false,"pushed_at":"2023-03-24T23:21:05.000Z","size":8232,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-06T00:38:53.451Z","etag":null,"topics":["computer-vision","image-classification","image-recognition","ml","python","tensorflow"],"latest_commit_sha":null,"homepage":null,"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/lkuich.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}},"created_at":"2019-05-08T06:10:47.000Z","updated_at":"2024-10-30T08:55:00.000Z","dependencies_parsed_at":"2023-01-15T14:15:53.972Z","dependency_job_id":null,"html_url":"https://github.com/lkuich/coach-python","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":"0.18571428571428572","last_synced_commit":"55d1f37c99231fd6cb84d52ec15ec9cc730b532f"},"previous_names":["lkuich/coach-python","coach-ml/coach-python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkuich/coach-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkuich%2Fcoach-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkuich%2Fcoach-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkuich%2Fcoach-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkuich%2Fcoach-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkuich","download_url":"https://codeload.github.com/lkuich/coach-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkuich%2Fcoach-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34903910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","image-classification","image-recognition","ml","python","tensorflow"],"created_at":"2024-11-16T09:11:49.413Z","updated_at":"2026-06-28T21:09:52.137Z","avatar_url":"https://github.com/lkuich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coach Python SDK\r\n\r\nCoach is an end-to-end Image Recognition platform, we provide the tooling to do effective data collection, training, and on-device parsing of Image Recognition models.\r\n\r\nSee https://coach.lkuich.com for more information!\r\n\r\n## Installing\r\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\r\n```bash\r\npip install coach-ml\r\n```\r\n\r\n## Usage\r\nCoach can be initialized 2 different ways. If you are only using the offline model parsing capabilities and already have a model package on disk, you can initialize like so:\r\n\r\n```python\r\ncoach = CoachClient()\r\n\r\n# We already had the `flowers` model on disk, no need to authenticate:\r\nresult = coach.get_model('flowers').predict('rose.jpg')\r\n```\r\n\r\nHowever, in order to download your trained models, you must authenticate with your API key:\r\n```python\r\ncoach = CoachClient().login('myapikey')\r\n\r\n# Now that we're authenticated, we can cache our models for future use:\r\ncoach.cache_model('flowers')\r\n\r\n# Evaluate with our cached model:\r\nresult = coach.get_model('flowers').predict('rose.jpg')\r\n```\r\n\r\n## API Breakdown\r\n\r\n### CoachClient\r\n`__init__(is_debug=False)`  \r\nOptional `is_debug`, if `True`, additional logs will be displayed\r\n\r\n`login(apiKey) -\u003e CoachClient`  \r\nAuthenticates with Coach service and allows for model caching. Accepts API Key as its only parameter. Returns its own instance.\r\n\r\n`cache_model(model_name, path='.', skip_match=False, model_type='frozen')`\r\nDownloads model from Coach service to disk. Specify the name of the model, and the path to store it. This will create a new directory in the specified path and store any model related documents there.\r\nBy default, if a model already exists with the same version, in the same path, caching will be skipped. Set `skip_match` to `False` to override this behaviour.\r\n`model_type` can be one of: `frozen`, `unity`, `mobile`, and can be useful if you're interested in caching a specific version of your model.\r\n\r\n`get_model(path='.') -\u003e CoachModel`\r\nLoads model into memory. Specify the path of the cached models directory. Returns a `CoachModel`\r\n\r\n`get_model_remote(model_name, path='.') -\u003e CoachModel`\r\nDownloads and loads model into memory. Specify the path of the cached models directory. Returns a `CoachModel`\r\n\r\n### CoachModel\r\n`__init__(graph, labels, base_module)`  \r\nInitializes a new instance of `CoachModel`, accepts a loaded `tf.Graph()`, array of `labels`, and the `base_module` the graph was trained off of.\r\n\r\n`predict(image, input_name=\"input\", output_name=\"output\") -\u003e dict`  \r\nSpecify the directory of an image file or the image as a byte array. Parses the specified image into memory and runs it through the loaded model. Returns a dict of its predictions in order of confidence.\r\nIf you have a pretrained frozen graph with different Tensor input/output names, you can specify them with `input_name` and `output_name` respectfully.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkuich%2Fcoach-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkuich%2Fcoach-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkuich%2Fcoach-python/lists"}