{"id":16819212,"url":"https://github.com/davanstrien/flyswot-gym","last_synced_at":"2025-07-23T13:35:57.204Z","repository":{"id":37760717,"uuid":"453945198","full_name":"davanstrien/flyswot-gym","owner":"davanstrien","description":"🦾 training flyswot models (fairly) easily ","archived":false,"fork":false,"pushed_at":"2022-06-22T18:01:27.000Z","size":3472,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T15:54:48.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davanstrien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-31T09:28:38.000Z","updated_at":"2022-04-06T14:51:55.000Z","dependencies_parsed_at":"2022-09-09T00:21:20.353Z","dependency_job_id":null,"html_url":"https://github.com/davanstrien/flyswot-gym","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"fastai/nbdev_template","purl":"pkg:github/davanstrien/flyswot-gym","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davanstrien%2Fflyswot-gym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davanstrien%2Fflyswot-gym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davanstrien%2Fflyswot-gym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davanstrien%2Fflyswot-gym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davanstrien","download_url":"https://codeload.github.com/davanstrien/flyswot-gym/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davanstrien%2Fflyswot-gym/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266689371,"owners_count":23969142,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-10-13T10:52:22.161Z","updated_at":"2025-07-23T13:35:57.182Z","avatar_url":"https://github.com/davanstrien.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flyswot-gym 🦾\n\u003e “When you go through hardships and decide not to surrender, that is strength.” - Arnold Schwarzenegger\n\n\n`flyswot-gym` is a set of functions for helping to train [`flyswot`](github.com/davanstrien/flyswot/) models. This is a WIP and mainly intended for our particular workflow.\n\n## 🚀 Training/updating a new flyswot model \n\nThese steps will also work for training other image classification models thought the pipeline isn't intended to cover all possible scenarios to you may not get good results if you are doing something very different.\n\n\n### Loading our data\n\nThe data loading workflow described below assumes that you are working with data structured in an image folder structure. In this structure images are sorted into subdirectories with those directories representing the label for that image. For example:\n\n```\nImages/\n    dogs/\n        dog1.jpg\n        dog2.jpg\n    cats/\n        cats1.jpg\n        cats2.jpg\n```\n\nWe use the Hugging Face hub to store the data we are going to use for training. To upload our data from a local file system to the hub, we will use a command line tool `hugit`. This uploads our data to the hub and gets it into a format that can be used to train a computer vision model. For full instructions on using `hugit` please refer to the [docs](https://hugit-cli.readthedocs.io/en/latest/).\n\n## Training/updating a model \n\nOnce you have your data uploaded to the 🤗 hub we can train our or update a new model. There is a notebok which helps us do this 🦾 \u003ca href=\"https://colab.research.google.com/github/davanstrien/flyswot-gym/blob/master/flyswot_gym.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e \n\n## Using our model \n\nFor using a new model you can use [flyswot](https://github.com/davanstrien/flyswot/). You can pass in the model ID for your model to let `flyswot` know which model it should use for making predictions.\n\n```\nUsage: flyswot predict directory [OPTIONS] DIRECTORY CSV_SAVE_DIR\n\n  Predicts against all images stored under DIRECTORY which match PATTERN in the\n  filename.\n\n  By default searches for filenames containing 'fs'.\n\n  Creates a CSV report saved to `csv_save_dir`\n\nArguments:\n  DIRECTORY     Directory to start searching for images from  [required]\n  CSV_SAVE_DIR  Directory used to store the csv report  [required]\n\nOptions:\n  --model-id TEXT       The model flyswot should use for making predictions\n                        [default: flyswot/convnext-tiny-224_flyswot]\n  --pattern TEXT        Pattern used to filter image filenames\n  --bs INTEGER          Batch Size  [default: 16]\n  --image-formats TEXT  Image format(s) to check  [default: .tif]\n  --help                Show this message and exit.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavanstrien%2Fflyswot-gym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavanstrien%2Fflyswot-gym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavanstrien%2Fflyswot-gym/lists"}