{"id":18055344,"url":"https://github.com/agentmorris/und-ducks","last_synced_at":"2025-04-05T09:12:13.582Z","repository":{"id":179307653,"uuid":"655445301","full_name":"agentmorris/und-ducks","owner":"agentmorris","description":"Code for training and evaluating a detector for the UND ducks dataset","archived":false,"fork":false,"pushed_at":"2023-09-23T01:44:39.000Z","size":304,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T18:11:18.231Z","etag":null,"topics":[],"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/agentmorris.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":"2023-06-18T22:58:01.000Z","updated_at":"2023-07-03T19:35:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b830bc6-1da3-4456-84d9-983ebb498e46","html_url":"https://github.com/agentmorris/und-ducks","commit_stats":null,"previous_names":["agentmorris/und-ducks"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fund-ducks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fund-ducks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fund-ducks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentmorris%2Fund-ducks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentmorris","download_url":"https://codeload.github.com/agentmorris/und-ducks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312086,"owners_count":20918344,"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-10-31T00:14:39.677Z","updated_at":"2025-04-05T09:12:13.563Z","avatar_url":"https://github.com/agentmorris.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## UND duck detector training\n\n### Overview\n\nThe code in this repo trains and evaluates models to detect ducks and other waterfowl in drone images, based on a dataset provided by the [Felege Wildlife Lab](https://arts-sciences.und.edu/academics/biology/susan-felege/).\n\nThere are around 35,000 images total, about 95% of which contain no birds.  Images are around 5000x3000.  A typical ground truth image looks like this:\n\n\u003cimg src=\"sample_image.jpg\" width=\"800px;\"\u003e\u003cbr/\u003e\n\nThe annotations you can vaguely see as different colors correspond to different species of bird.  Most of this repo operates on 1280x1280 patches that look like this (this is also a ground truth patch, not a model prediction):\n\n\u003cimg src=\"annotated_patch.jpg\" width=\"800px;\"\u003e\u003cbr/\u003e\n\n### Files\n\nThese are listed in roughly the order in which you would use them.\n\n#### und-ducks-data-import.py\n\n* Match images to annotation files\n* Read the original annotations in Pascal VOC format\n* Convert to COCO format\n* Do a bunch of miscellaneous consistency checking\n\n#### und-ducks-training-data-prep.py\n\n* For all the images with at least one annotation, slice into mostly-non-overlapping patches\n* Optionally sample hard negatives (I did not end up actually using any hard negatives)\n* Split into train/val\n* Export to YOLO annotation format\n\n#### und-ducks-training.py\n\n* Train the model (training happens at the YOLOv5 CLI, but this script documents the commands)\n* Run the YOLOv5 validation scripts\n* Convert YOLOv5 val results to MD .json format\n* Example code to use the MD visualization pipeline to visualize results\n* Example code to use the MD inference pipeline to run the trained model\n\n### Running the models, and doing stuff with the results\n\nMuch of the code in this repo is shared with the [Izembek Brant Goose Detector](https://github.com/agentmorris/usgs-geese) repo; the training code is bespoke for each model, but the inference code is identical.  So, for instructions on running the model and postprocessing the results, see the \"[Running the model](https://github.com/agentmorris/usgs-geese#running-the-model)\" section on the Izembek Detector repo.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentmorris%2Fund-ducks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentmorris%2Fund-ducks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentmorris%2Fund-ducks/lists"}