{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Introduction \n\n[![Build Status](https://dev.azure.com/aussiedevcrew/Annotation-Factory/_apis/build/status/Microsoft.Annotation-Factory?branchName=master)](https://dev.azure.com/aussiedevcrew/Annotation-Factory/_build/latest?definitionId=9&branchName=master)\n[![GitHub](https://img.shields.io/github/license/Microsoft/Annotation-Factory.svg?color=blue&label=License)](https://github.com/Microsoft/Annotation-Factory/blob/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/annotationfactory.svg?label=PyPi)](https://pypi.org/project/annotationfactory/)\n![Python Version](https://img.shields.io/pypi/pyversions/annotationfactory.svg?label=Python)\n\nAnnotation-Factory Python SDK. This package works specifically with Microsoft Cognitive Services detection results. `AnnotationWriter` takes a JSON object received from Cognitive Services and produces annotation files in both VOC and YOLO formats for use in training machine learning models.\n\n# Getting Started\n\n1. Install `annotationfactory` package via pip:\n\n ```\n pip install annotationfactory\n ```\n\n# Sample to use\n\n```python\nfrom annotationfactory.annotationwriter import AnnotationWriter\nimport annotationfactory.annotationconverter as converter\n\nexample = {\n 'tagId': 0,\n 'tagName': 'Apples',\n 'region': {\n 'left': 0.288039029,\n 'top': 0.411838,\n 'width': 0.291451037,\n 'height': 0.4237842\n }\n}\n\n# Initialise AnnotationWriter.\nwriter = AnnotationWriter()\n\n# Initialise annotation handlers.\nwriter.initVoc(\"test.jpg\", 608, 608)\nwriter.initYolo()\n\n# Add VOC object to writer.\nwriter.addVocObject(example)\nwriter.addVocObject(example)\n\n# Add YOLO object to writer.\nwriter.addYoloObject(example)\nwriter.addYoloObject(example)\n\n# Output VOC annotations to file.\nwriter.saveVoc(\"myannotation.xml\")\n\n# Output YOLO annotations to file.\nwriter.saveYolo(\"myannotation.txt\")\n\n# Converts VOC annotations back to CustomVision annotation format.\nvoc2cv = converter.convertVocFromPath(\"myannotation.xml\")\n\n# Converts YOLO annotations back to CustomVision annotation format.\n# Requires a txt file with list of label names as an input.\nyolo2cv = converter.convertYoloFromPath(\"myannotation.txt\", \"class.names\")\n\n```\n\n# Run locally\n\n``` \npip install -r requirements.txt \npython example/test.py\n```\n\n# Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Microsoft/Annotation-Factory", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "annotationfactory", "package_url": "https://pypi.org/project/annotationfactory/", "platform": "", "project_url": "https://pypi.org/project/annotationfactory/", "project_urls": { "Homepage": "https://github.com/Microsoft/Annotation-Factory" }, "release_url": "https://pypi.org/project/annotationfactory/0.0.1.dev304/", "requires_dist": [ "jinja2", "jsonschema", "xmltodict" ], "requires_python": "", "summary": "annotation factory python sdk", "version": "0.0.1.dev304" }, "last_serial": 5318002, "releases": { "0.0.1.dev123": [ { "comment_text": "", "digests": { "md5": "db21b299c8c4f45716445d6752940225", "sha256": "3a525676486ea2b7822cf80b515e7e78410847ba2db620f54a7d516131696441" }, "downloads": -1, "filename": "annotationfactory-0.0.1.dev123-py3-none-any.whl", "has_sig": false, "md5_digest": "db21b299c8c4f45716445d6752940225", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7360, "upload_time": "2019-03-01T01:47:04", "url": "https://files.pythonhosted.org/packages/24/86/1fd1cd61a4c4144bf7dfd0b9c0f91f8da4ebb293df16c20edfb1b951e76a/annotationfactory-0.0.1.dev123-py3-none-any.whl" } ], "0.0.1.dev126": [ { "comment_text": "", "digests": { "md5": "24f48d0505307bc4ae92a2dba7d553fd", "sha256": "3e6979741a2dfb0e4820627de2ae16dfcd91d2b638e6e1d224da9d1e1078f634" }, "downloads": -1, "filename": "annotationfactory-0.0.1.dev126-py3-none-any.whl", "has_sig": false, "md5_digest": "24f48d0505307bc4ae92a2dba7d553fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7703, "upload_time": "2019-03-03T04:13:04", "url": "https://files.pythonhosted.org/packages/71/d5/4b666bf4772f71c1b1bbb3eb5263de438c01bf6b782f9b74842ca641d39d/annotationfactory-0.0.1.dev126-py3-none-any.whl" } ], "0.0.1.dev127": [ { "comment_text": "", "digests": { "md5": "1c00683f49f040cbe5e4d06fe27387d1", "sha256": "dabe1aeb3ad48b4d2e3431c87720dc0659de915c4936f5edcecb35afc158cf5a" }, "downloads": -1, "filename": "annotationfactory-0.0.1.dev127-py3-none-any.whl", "has_sig": false, "md5_digest": "1c00683f49f040cbe5e4d06fe27387d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8011, "upload_time": "2019-03-03T23:29:01", "url": "https://files.pythonhosted.org/packages/d3/7b/0a17ca93e355acee23665d0700a615f600123defb9600997810d26d14b2b/annotationfactory-0.0.1.dev127-py3-none-any.whl" } ], "0.0.1.dev176": [ { "comment_text": "", "digests": { "md5": "df0ce53b9543292d4c9fb6e21c64b08b", "sha256": "515afdba2a35752851011810463bc29caccc34bcd8fa3cfee52d7437821f28ff" }, "downloads": -1, "filename": "annotationfactory-0.0.1.dev176-py3-none-any.whl", "has_sig": false, "md5_digest": "df0ce53b9543292d4c9fb6e21c64b08b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8105, "upload_time": "2019-03-27T03:27:47", "url": "https://files.pythonhosted.org/packages/3f/78/40a1fcab2943683f8526528fa8ab6e22747a0f341755d4c5dd0e2a2677ac/annotationfactory-0.0.1.dev176-py3-none-any.whl" } ], "0.0.1.dev304": [ { "comment_text": "", "digests": { "md5": "11a88d8887dcce77fb4005ef4a92724c", "sha256": "9ee86eaf600bc3e4effb3bbacd6e3d994503548c2be2f6caf83246328a05a1e0" }, "downloads": -1, "filename": "annotationfactory-0.0.1.dev304-py3-none-any.whl", "has_sig": false, "md5_digest": "11a88d8887dcce77fb4005ef4a92724c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8135, "upload_time": "2019-05-26T05:45:57", "url": "https://files.pythonhosted.org/packages/2b/a5/acb28475be576f40014fd4987b79fb6e3881d78b83ec9ad9fdbd9e7809a9/annotationfactory-0.0.1.dev304-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "11a88d8887dcce77fb4005ef4a92724c", "sha256": "9ee86eaf600bc3e4effb3bbacd6e3d994503548c2be2f6caf83246328a05a1e0" }, "downloads": -1, "filename": "annotationfactory-0.0.1.dev304-py3-none-any.whl", "has_sig": false, "md5_digest": "11a88d8887dcce77fb4005ef4a92724c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8135, "upload_time": "2019-05-26T05:45:57", "url": "https://files.pythonhosted.org/packages/2b/a5/acb28475be576f40014fd4987b79fb6e3881d78b83ec9ad9fdbd9e7809a9/annotationfactory-0.0.1.dev304-py3-none-any.whl" } ] }