{"id":18411035,"url":"https://github.com/guyettinger/gle-pascal-voc","last_synced_at":"2025-04-12T22:52:02.394Z","repository":{"id":206529337,"uuid":"716879891","full_name":"guyettinger/gle-pascal-voc","owner":"guyettinger","description":"A library for working with Pascal Visual Object Classes (VOC) Annotations","archived":false,"fork":false,"pushed_at":"2023-12-01T00:43:22.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T22:51:53.008Z","etag":null,"topics":["pascal-voc","pascal-voc-xml","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/guyettinger.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}},"created_at":"2023-11-10T04:09:37.000Z","updated_at":"2023-11-10T17:32:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"19bcde9c-24f8-4478-843e-9a47d0ed6389","html_url":"https://github.com/guyettinger/gle-pascal-voc","commit_stats":null,"previous_names":["guyettinger/gle-pascal-voc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-pascal-voc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-pascal-voc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-pascal-voc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-pascal-voc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guyettinger","download_url":"https://codeload.github.com/guyettinger/gle-pascal-voc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643043,"owners_count":21138353,"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":["pascal-voc","pascal-voc-xml","typescript"],"created_at":"2024-11-06T03:34:59.916Z","updated_at":"2025-04-12T22:52:02.373Z","avatar_url":"https://github.com/guyettinger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"/\"\u003e\n    \u003cimg alt=\"logo\" src=\"public/images/logo-flipped.png\" align=\"right\" width=\"120\" height=\"120\"/\u003e\n\u003c/a\u003e\n\n# GLE Pascal VOC\nA library for working with Pascal Visual Object Classes (VOC) Annotations\n\n[![Version](https://img.shields.io/npm/v/gle-pascal-voc?style=flat\u0026colorA=000000\u0026colorB=000000)](https://www.npmjs.com/package/gle-pascal-voc)\n[![Downloads](https://img.shields.io/npm/dt/gle-pascal-voc.svg?style=flat\u0026colorA=000000\u0026colorB=000000)](https://www.npmjs.com/package/gle-pascal-voc)\n\n\n## Installation\n```shell\nnpm install gle-pascal-voc\n```\n\n## Usage\n```typescript\nconst pascalVocModel = new PascalVocModel(\n    'Image Folder',\n    'Image.jpg',\n    '/annotations/Image.jpg',\n    new SourceModel(),\n    new SizeModel(100, 100, 3),\n    Segmented.Linear,\n    [\n        new ObjectModel(\n            'person',\n            'Unspecified',\n            Truncated.FullyVisible,\n            Difficult.Easy,\n            new BoundingBoxModel(1, 1, 99, 99),\n            [\n                new PartModel(\n                    'hand',\n                    new BoundingBoxModel(25, 25, 50, 50)\n                ),\n                new PartModel(\n                    'hand',\n                    new BoundingBoxModel(50, 25, 99, 99)\n                )\n            ],\n            new ActionsModel(new Map\u003cstring, number\u003e([\n                ['other', 1],\n                ['jumping', 0],\n                ['phoning', 1],\n                ['playinginstrument', 0],\n                ['reading', 1],\n                ['ridingbike', 0],\n                ['ridinghorse', 1],\n                ['running', 0],\n                ['takingphoto', 1],\n                ['usingcomputer', 0],\n                ['walking', 0],\n            ])),\n        ),\n        new ObjectModel(\n            'person',\n            'Unspecified',\n            Truncated.FullyVisible,\n            Difficult.Easy,\n            new BoundingBoxModel(1, 1, 99, 99),\n            [\n                new PartModel(\n                    'hand',\n                    new BoundingBoxModel(25, 25, 50, 50)\n                ),\n                new PartModel(\n                    'hand',\n                    new BoundingBoxModel(50, 25, 99, 99)\n                )\n            ],\n            new ActionsModel(new Map\u003cstring, number\u003e([\n                ['other', 1],\n                ['jumping', 0],\n                ['phoning', 1],\n                ['playinginstrument', 0],\n                ['reading', 1],\n                ['ridingbike', 0],\n                ['ridinghorse', 1],\n                ['running', 0],\n                ['takingphoto', 1],\n                ['usingcomputer', 0],\n                ['walking', 0],\n            ])),\n        )\n    ]\n)\nconst xml = toXML.pascalVOCToXML(pascalVocModel)\nconsole.log(xml)\n```\n```xml\n\u003cannotation\u003e\n  \u003cfolder\u003eImage Folder\u003c/folder\u003e\n  \u003cfilename\u003eImage.jpg\u003c/filename\u003e\n  \u003csize\u003e\n    \u003cwidth\u003e100\u003c/width\u003e\n    \u003cheight\u003e100\u003c/height\u003e\n    \u003cdepth\u003e3\u003c/depth\u003e\n  \u003c/size\u003e\n  \u003csegmented\u003e0\u003c/segmented\u003e\n  \u003cobject\u003e\n    \u003cname\u003eperson\u003c/name\u003e\n    \u003cpose\u003eUnspecified\u003c/pose\u003e\n    \u003ctruncated\u003e0\u003c/truncated\u003e\n    \u003cdifficult\u003e0\u003c/difficult\u003e\n    \u003cbndbox\u003e\n      \u003cxmin\u003e1\u003c/xmin\u003e\n      \u003cymin\u003e1\u003c/ymin\u003e\n      \u003cxmax\u003e99\u003c/xmax\u003e\n      \u003cymax\u003e99\u003c/ymax\u003e\n    \u003c/bndbox\u003e\n    \u003cpart\u003e\n      \u003cname\u003ehand\u003c/name\u003e\n      \u003cbndbox\u003e\n        \u003cxmin\u003e25\u003c/xmin\u003e\n        \u003cymin\u003e25\u003c/ymin\u003e\n        \u003cxmax\u003e50\u003c/xmax\u003e\n        \u003cymax\u003e50\u003c/ymax\u003e\n      \u003c/bndbox\u003e\n    \u003c/part\u003e\n    \u003cpart\u003e\n      \u003cname\u003ehand\u003c/name\u003e\n      \u003cbndbox\u003e\n        \u003cxmin\u003e50\u003c/xmin\u003e\n        \u003cymin\u003e25\u003c/ymin\u003e\n        \u003cxmax\u003e99\u003c/xmax\u003e\n        \u003cymax\u003e99\u003c/ymax\u003e\n      \u003c/bndbox\u003e\n    \u003c/part\u003e\n    \u003cactions\u003e\n      \u003cother\u003e1\u003c/other\u003e\n      \u003cjumping\u003e0\u003c/jumping\u003e\n      \u003cphoning\u003e1\u003c/phoning\u003e\n      \u003cplayinginstrument\u003e0\u003c/playinginstrument\u003e\n      \u003creading\u003e1\u003c/reading\u003e\n      \u003cridingbike\u003e0\u003c/ridingbike\u003e\n      \u003cridinghorse\u003e1\u003c/ridinghorse\u003e\n      \u003crunning\u003e0\u003c/running\u003e\n      \u003ctakingphoto\u003e1\u003c/takingphoto\u003e\n      \u003cusingcomputer\u003e0\u003c/usingcomputer\u003e\n      \u003cwalking\u003e0\u003c/walking\u003e\n    \u003c/actions\u003e\n  \u003c/object\u003e\n  \u003cobject\u003e\n    \u003cname\u003eperson\u003c/name\u003e\n    \u003cpose\u003eUnspecified\u003c/pose\u003e\n    \u003ctruncated\u003e0\u003c/truncated\u003e\n    \u003cdifficult\u003e0\u003c/difficult\u003e\n    \u003cbndbox\u003e\n      \u003cxmin\u003e1\u003c/xmin\u003e\n      \u003cymin\u003e1\u003c/ymin\u003e\n      \u003cxmax\u003e99\u003c/xmax\u003e\n      \u003cymax\u003e99\u003c/ymax\u003e\n    \u003c/bndbox\u003e\n    \u003cpart\u003e\n      \u003cname\u003ehand\u003c/name\u003e\n      \u003cbndbox\u003e\n        \u003cxmin\u003e25\u003c/xmin\u003e\n        \u003cymin\u003e25\u003c/ymin\u003e\n        \u003cxmax\u003e50\u003c/xmax\u003e\n        \u003cymax\u003e50\u003c/ymax\u003e\n      \u003c/bndbox\u003e\n    \u003c/part\u003e\n    \u003cpart\u003e\n      \u003cname\u003ehand\u003c/name\u003e\n      \u003cbndbox\u003e\n        \u003cxmin\u003e50\u003c/xmin\u003e\n        \u003cymin\u003e25\u003c/ymin\u003e\n        \u003cxmax\u003e99\u003c/xmax\u003e\n        \u003cymax\u003e99\u003c/ymax\u003e\n      \u003c/bndbox\u003e\n    \u003c/part\u003e\n    \u003cactions\u003e\n      \u003cother\u003e1\u003c/other\u003e\n      \u003cjumping\u003e0\u003c/jumping\u003e\n      \u003cphoning\u003e1\u003c/phoning\u003e\n      \u003cplayinginstrument\u003e0\u003c/playinginstrument\u003e\n      \u003creading\u003e1\u003c/reading\u003e\n      \u003cridingbike\u003e0\u003c/ridingbike\u003e\n      \u003cridinghorse\u003e1\u003c/ridinghorse\u003e\n      \u003crunning\u003e0\u003c/running\u003e\n      \u003ctakingphoto\u003e1\u003c/takingphoto\u003e\n      \u003cusingcomputer\u003e0\u003c/usingcomputer\u003e\n      \u003cwalking\u003e0\u003c/walking\u003e\n    \u003c/actions\u003e\n  \u003c/object\u003e\n\u003c/annotation\u003e\n\n```\n\n## Development\nInstall\n```\nnpm install\n```\nBuild Library\n```\nnpm run build\n```\nRun Tests\n```\nnpm run test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyettinger%2Fgle-pascal-voc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguyettinger%2Fgle-pascal-voc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyettinger%2Fgle-pascal-voc/lists"}