{"id":19866349,"url":"https://github.com/nielsrogge/coco-eval","last_synced_at":"2025-05-02T05:32:36.966Z","repository":{"id":103946482,"uuid":"607355368","full_name":"NielsRogge/coco-eval","owner":"NielsRogge","description":"A tiny package supporting distributed computation of COCO metrics for PyTorch models.","archived":false,"fork":false,"pushed_at":"2023-02-28T21:21:56.000Z","size":14,"stargazers_count":11,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T23:12:37.607Z","etag":null,"topics":["coco","metrics","object-detection"],"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/NielsRogge.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-02-27T20:24:17.000Z","updated_at":"2025-03-24T20:13:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"95763a29-45cf-4b82-9a7c-5c0688cd36b4","html_url":"https://github.com/NielsRogge/coco-eval","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsRogge%2Fcoco-eval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsRogge%2Fcoco-eval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsRogge%2Fcoco-eval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsRogge%2Fcoco-eval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NielsRogge","download_url":"https://codeload.github.com/NielsRogge/coco-eval/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251993002,"owners_count":21677022,"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":["coco","metrics","object-detection"],"created_at":"2024-11-12T15:25:33.463Z","updated_at":"2025-05-02T05:32:36.959Z","avatar_url":"https://github.com/NielsRogge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coco-eval (PyTorch)\nA tiny package supporting distributed computation of COCO metrics (like mAP) for PyTorch models.\n\n## Installation\n\nI made this package available on PyPi (thanks to [this guide](https://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56)): https://pypi.org/project/coco-eval/. \n\n```\npip install coco-eval\n```\n\n## Usage\n\nThe metric was taken and isolated from the [DETR repository](https://github.com/facebookresearch/detr/tree/main). Credits go to the authors.\n\nHigh-level usage is as follows (assuming you have a PyTorch model that makes predictions):\n\n```\nfrom coco_eval import CocoEvaluator\nfrom torchvision.datasets import CocoDetection\nfrom torch.utils.data import DataLoader\n\ndataset = CocoDetection(root=\"path_to_your_images\", annFile=\"path_to_annotation_file\")\n\ndataloader = DataLoader(dataset, batch_size=2)\n\nevaluator = CocoEvaluator(coco_gt=dataset.coco, iou_types=[\"bbox\"])\n\nmodel = ...\n\nfor batch in dataloader:\n   predictions = model(batch)\n   \n   evaluator.update(predictions)\n\nevaluator.synchronize_between_processes()\nevaluator.accumulate()\nevaluator.summarize()\n```\n\nRefer to my [DETR fine-tuning demo notebook](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/DETR/Fine_tuning_DetrForObjectDetection_on_custom_dataset_(balloon).ipynb) regarding an example of using it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielsrogge%2Fcoco-eval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnielsrogge%2Fcoco-eval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielsrogge%2Fcoco-eval/lists"}