{"id":20663985,"url":"https://github.com/universaldatatool/udt-iou-error","last_synced_at":"2025-06-13T14:06:15.988Z","repository":{"id":105784623,"uuid":"288841259","full_name":"UniversalDataTool/udt-iou-error","owner":"UniversalDataTool","description":"Npm module for calculating the Intersection over Union (IoU) error for a set of polygons (or UDT Regions)","archived":false,"fork":false,"pushed_at":"2020-08-22T06:48:59.000Z","size":273,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T18:40:44.890Z","etag":null,"topics":["computer-vision","computer-vision-algorithms","labeling-tool","npm","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/UniversalDataTool.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":"2020-08-19T21:27:15.000Z","updated_at":"2020-08-22T06:49:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"c76e0d88-c7dd-4049-a4ba-76bfbe39752a","html_url":"https://github.com/UniversalDataTool/udt-iou-error","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.125,"last_synced_commit":"9d71fda190dc168e2c106dcdd559aa2a484d0426"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalDataTool%2Fudt-iou-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalDataTool%2Fudt-iou-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalDataTool%2Fudt-iou-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniversalDataTool%2Fudt-iou-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UniversalDataTool","download_url":"https://codeload.github.com/UniversalDataTool/udt-iou-error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242825845,"owners_count":20191466,"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":["computer-vision","computer-vision-algorithms","labeling-tool","npm","npm-package"],"created_at":"2024-11-16T19:21:27.973Z","updated_at":"2025-03-10T09:41:44.476Z","avatar_url":"https://github.com/UniversalDataTool.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UDT IOU Error\n\nCompute the intersection over union error of groups of polygons ([UDT regions](https://github.com/UniversalDataTool/udt-format/blob/master/interfaces/image_segmentation.md)). Created primarily for use with the [Universal Data Tool](https://universaldatatool.com).\n\nAll x/y coordinates should be in a `1x1` area, anything outside of the `1x1` area won't be considered. (If you want to change this behavior to something more configurable, PRs are welcome!)\n\n```javascript\n// install with npm install udt-iou-error\nconst getIOU = require(\"udt-iou-error\")\n\nconst annotation1 = [\n  {\n    regionType: \"bounding-box\",\n    centerX: 0.5,\n    centerY: 0.5,\n    width: 0.5,\n    height: 0.5,\n  },\n]\n\nconst annotation2 = [\n  {\n    regionType: \"polygon\",\n    points: [\n      { x: 0, y: 0 },\n      { x: 0, y: 1 },\n      { x: 1, y: 1 },\n    ],\n  },\n]\n\ngetIOU(annotation1, annotation2)\n// \u003e\u003e 0.2\n```\n\n### Classifications\n\nIt's also smart enough to calculate IOU error with multiple classifications.\n\n```javascript\nconst getIOU = require(\"udt-iou-error\")\n\nconst annotation1 = [\n  {\n    regionType: \"bounding-box\",\n    classification: \"red\",\n    centerX: 0.5,\n    centerY: 0.5,\n    width: 0.5,\n    height: 0.5,\n  },\n  {\n    regionType: \"bounding-box\",\n    classification: \"blue\",\n    centerX: 0.1,\n    centerY: 0.1,\n    width: 0.2,\n    height: 0.2,\n  },\n]\n\nconst annotation2 = [\n  {\n    regionType: \"polygon\",\n    classification: \"blue\",\n    points: [\n      { x: 0, y: 0 },\n      { x: 0, y: 1 },\n      { x: 1, y: 1 },\n    ],\n  },\n]\n\ngetIOU(annotation1, annotation2)\n// \u003e\u003e 0.259\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversaldatatool%2Fudt-iou-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funiversaldatatool%2Fudt-iou-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversaldatatool%2Fudt-iou-error/lists"}