{"id":24037339,"url":"https://github.com/pd-mera/object-detection-validation","last_synced_at":"2026-06-09T01:31:28.450Z","repository":{"id":206146151,"uuid":"713795112","full_name":"PD-Mera/object-detection-validation","owner":"PD-Mera","description":"Evaluation for object detection models","archived":false,"fork":false,"pushed_at":"2023-11-08T07:23:08.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-20T01:17:31.835Z","etag":null,"topics":["average-precision","evaluation","mean-average-precision","object-detection","onnx","onnxruntime","precision","recall"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PD-Mera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-03T08:52:41.000Z","updated_at":"2023-11-08T03:23:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"d17b57bb-b661-40f9-9f3b-1a73c006c271","html_url":"https://github.com/PD-Mera/object-detection-validation","commit_stats":null,"previous_names":["pd-mera/object-detection-validation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PD-Mera/object-detection-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PD-Mera%2Fobject-detection-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PD-Mera%2Fobject-detection-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PD-Mera%2Fobject-detection-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PD-Mera%2Fobject-detection-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PD-Mera","download_url":"https://codeload.github.com/PD-Mera/object-detection-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PD-Mera%2Fobject-detection-validation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34088013,"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-08T02:00:07.615Z","response_time":111,"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":["average-precision","evaluation","mean-average-precision","object-detection","onnx","onnxruntime","precision","recall"],"created_at":"2025-01-08T19:40:14.225Z","updated_at":"2026-06-09T01:31:28.397Z","avatar_url":"https://github.com/PD-Mera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Implement validation of object detection models\n\n## Environments\n\nSimply install requirements\n\n``` bash\npip install -r requirements.txt\n```\n\n## Models\n\n### YOLO Format\n\nModel in onnx format, with input is an image with pixel values from [0, 1], outputs with shape `[batch_size, anchors, 4 + num_classes + 1]`\n\nExample 1 line in outputs is\n\n``` bash\n# Format is [x_center, y_center, w, h, obj_conf, class_1_conf, class_2_conf]\n[0.51 0.75 0.21 0.19 0.85 0.1 0.9]\n```\n\n### Retina Format\n\nModel in onnx format, with input is an image read from `cv2.imread`, 3 outputs are `scores`, `bboxes` and `landmarks`\n\nExample 1 line in outputs is\n\n``` bash\n# bboxes\n[ 0.67413944  1.0143973  -1.1417826   0.16699778]\n# scores\n[9.9962950e-01 3.7046883e-04]\n# landmarks\n```\n\n## Prepare labels\n\nGround truth labels in yolo format `[class_idx, x_center, y_center, w, h]`\n\n``` txt\n0 0.725000 0.287500 0.089394 0.070455\n```\n\nPredict labels also in yolo format, with confidence `[class_idx, x_center, y_center, w, h, conf]`\n\n``` txt\n0 0.8927168528238932 0.9185009002685547 0.17276369730631513 0.13056144714355478 0.8909046649932861\n```\n\n## Run\n\nTo get predict of model, modify path in `predict.py` and run\n\n``` bash\npython predict.py --onnx ./weights/yolov5m_v0_0_1.onnx \\\n                  --image_dir ../__testset__/TCB-VJA-testset_1/all/images \\\n                  --save_txt ./output_labels \\\n                  --backend yolo \\\n                  --gpu\n```\n\nTo get evaluation value such as `mAP`, run\n\n``` bash\npython evaluate.py -gt ../__testset__/TCB-VJA-testset_1/all/labels \\\n                   -dr ./output_labels \\\n                   --image_dir ../__testset__/TCB-VJA-testset_1/all/images \\\n                   --num_classes 2\n```\n\n## References\n\n- https://github.com/Cartucho/mAP\n- https://github.com/ppogg/Retinaface_Ghost","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpd-mera%2Fobject-detection-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpd-mera%2Fobject-detection-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpd-mera%2Fobject-detection-validation/lists"}