{"id":13584961,"url":"https://github.com/mdhmz1/Auto-Annotate","last_synced_at":"2025-04-07T06:32:06.946Z","repository":{"id":50535416,"uuid":"302966747","full_name":"mdhmz1/Auto-Annotate","owner":"mdhmz1","description":"Auto-Annotate - Automatically annotate your entire image directory by a single command.  As simple as saying - \"Annotate all the street sign (label) in the autonomous car dataset (directory)\" and BAM! DONE. Each and every image with a street sign in the diverse dataset directory containing images of all sorts which have a street sign are filtered and the segmentation annotation is performed in a single command.  The Auto-Annotate tool provides auto annotation of segmentation masks for the objects in the images inside some directory based on the labels. Auto-Annotate is able to provide automated annotations for the labels defined in the COCO Dataset and also supports Custom Labels. ","archived":false,"fork":false,"pushed_at":"2022-10-07T23:01:37.000Z","size":3922,"stargazers_count":182,"open_issues_count":10,"forks_count":29,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-06T02:38:08.498Z","etag":null,"topics":["deep-learning","hacktoberfest","image-processing","machine-learning","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/mdhmz1.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}},"created_at":"2020-10-10T18:35:06.000Z","updated_at":"2024-10-17T18:20:07.000Z","dependencies_parsed_at":"2022-08-12T21:40:39.176Z","dependency_job_id":null,"html_url":"https://github.com/mdhmz1/Auto-Annotate","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/mdhmz1%2FAuto-Annotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhmz1%2FAuto-Annotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhmz1%2FAuto-Annotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhmz1%2FAuto-Annotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdhmz1","download_url":"https://codeload.github.com/mdhmz1/Auto-Annotate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247607202,"owners_count":20965935,"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":["deep-learning","hacktoberfest","image-processing","machine-learning","object-detection"],"created_at":"2024-08-01T15:04:37.744Z","updated_at":"2025-04-07T06:32:06.940Z","avatar_url":"https://github.com/mdhmz1.png","language":"Python","funding_links":[],"categories":["Python","Deprecated repositories"],"sub_categories":["Industrial application"],"readme":"\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/mdhmz1/Auto-Annotate#mdhmz1\"\u003e\u003cimg src=\"https://github.com/mdhmz1/Auto-Annotate/blob/main/asset/logos/auto-annotate-logo-transparent.png\" alt=\"Auto-Annotate Logo\" height=\"240\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eAuto-Annotate\u003c/h1\u003e\n\u003cp align=\"center\"\u003eAutomatically annotate your entire image directory by a single command. \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://img.shields.io/badge/version-v1.0.0-brightgreen?style=plastic\" alt=\"Auto-Annotate Version\"\u003e \u003cimg src=\"https://img.shields.io/github/repo-size/mdhmz1/Auto-Annotate?style=plastic\" alt=\"repo size\"\u003e \u003cimg src=\"https://img.shields.io/github/stars/mdhmz1/Auto-Annotate?\u0026style=social\" alt=\"stars\"\u003e\u003c/p\u003e\n\n\n\n\nFor a more detailed explaination and code usage, please refer to this [medium article](https://medium.com/analytics-vidhya/automated-image-annotation-using-auto-annotate-tool-f8fff8ea4900).\n\n\u003ca href=\"https://medium.com/analytics-vidhya/automated-image-annotation-using-auto-annotate-tool-f8fff8ea4900\"\u003e![](https://img.shields.io/badge/Medium-12100E?style=for-the-badge\u0026logo=medium\u0026logoColor=white) \u003c/a\u003e\n\n\n**As simple as saying - \"Annotate all the street sign (label) in the autonomous car dataset (directory)\" and BAM! DONE.**\nEach and every image with a street sign in the diverse dataset directory containing images of all sorts which have a street sign are filtered and the segmentation annotation is performed in a single command.\n\nThe Auto-Annotate tool provides auto annotation of segmentation masks for the objects in the images inside some directory based on the labels. Auto-Annotate is able to provide automated annotations for the labels defined in the COCO Dataset and also supports Custom Labels. This tool is built on top of [Mask R-CNN](https://github.com/matterport/Mask_RCNN) to support auto annotation for each instance of an object segment in the image. \n\n![Working Sample: ANNOTATE CUSTOM](asset/AutoAnnotate-Working_LowRes.png)\n\nThe Auto-Annotate tool works on two modes\n* **COCO Label Annotation** - NO TRAINING REQUIRED. Just use the weights of the the Coco dataset. Point to the directory and the annotations are ready.\n* **Custom Label Annotation** - Train the model for the custom label. Use the weights and annotate.\n\nNOTE: Please refer to [knownIssues.md](knownIssues.md) file in the repo for known issues and their resolution. Please feel free to contribute in case of any errors/issues arising during the installation and usage of the tool.\n\n## JSON Annotation Format\n\n### SAMPLE JSON: \n\n```json\n[\n  {\n    \"filename\": \"bird_house_in_lawn.jpg\",\n    \"id\": 1,\n    \"label\": \"Bird House\",\n    \"bbox\": [ 111.5, 122.5, 73, 66 ],\n    \"segmentation\": [\n      [ 167, 188.5, 174, 185.5, 177.5, 181, 177.5, 157, 183.5, 154, 184.5, 149, 159, 124.5, 150, 122.5, \n        142, 124.5, 131, 131.5, 111.5, 150, 111.5, 156, 116.5, 162, 116.5, 184, 121, 188.5, 167, 188.5\n      ]\n    ]\n  }\n]\n```\n\n### JSON FORMAT:\n```\n[\n  {\n    \"filename\": image_file_name,\n    \"id\": id_of_the_image,\n    \"label\": label_to_search_and_annotate,\n    \"bbox\": [ x, y, w, h ], -- x,y coordinate of top left point of bounding box\n                            -- w,h width and height of the bounding box\n                            Format correspond to coco json response format for bounding box\n    \"segmentation\": [\n      [ x1, y1, x2, y2,...] -- For X,Y belonging to the pixel location of the mask segment\n                            -- Format correspond to coco json response format for segmentation\n    ]\n  }\n]\n```\n\n###\nORIGINAL IMAGE             |  MASKED IMAGE\n:-------------------------:|:-------------------------:\n![](asset/bird_house_in_lawn.jpg)  |  ![](asset/bird_house_in_lawn_masked.jpg)\n\n\n## Installation\n1. Clone this repository\n\n2. Install dependencies\n   ```bash\n   pip3 install -r requirements.txt\n   ```\n\n3. **If annotating objects supported by COCO Dataset** \n  Download pre-trained COCO weights (mask_rcnn_coco.h5) from the [releases page](https://github.com/matterport/Mask_RCNN/releases) and store it in the root directory.\n  **If annotating objects Custom Objects** \n  Train Mask RCNN and use those weights.\n\n4. Run Commands as below based on the mode.\n  ```bash\n  python3 annotate.py annotateCoco --image_directory=/path/to/the/image/directory/ --label=object_label_to_annotate --weights=/path/to/weights.h5 --displayMaskedImages=False\n  ```\n  ```bash\n  python3 annotate.py annotateCustom --image_directory=/path/to/the/image/directory/ --label=object_label_to_annotate --weights=/path/to/weights.h5 --displayMaskedImages=False\n  ```\n\n5. Find the annotations in the directory - /path/to/the/image/directory/ specified above\n\n\n## Annotating on MS COCO\nUse pre-trained weights for MS COCO. After finishing with the installation, we\ncan run it directly from the command line as such:\n\n```\n# Annotate label defined by COCO\npython3 annotate.py annotateCoco --image_directory=/path/to/the/image/directory/ --label=object_label_to_annotate --weights=/path/to/weights.h5 --displayMaskedImages=False\n```\nNote: --label=object_label_to_annotate should be in accordance to the COCO dataset labels.\nRefer [COCO Dataset](https://cocodataset.org/) for more details.\n\n## Annotating on Custom Images\nUse pre-trained weights for the custom label. After finishing with the installation, we\ncan run it directly from the command line as such:\n\n```\n# Annotate Custom\npython3 annotate.py annotateCustom --image_directory=/path/to/the/image/directory/ --label=object_label_to_annotate --weights=/path/to/weights.h5 --displayMaskedImages=False\n```\nNote: --label=object_label_to_annotate should be a label for which the weights are provided.\n\n\n## Training on Your Own Dataset\n\nRead the original post by Waleed Abdulla [blog post about the balloon color splash sample](https://engineering.matterport.com/splash-of-color-instance-segmentation-with-mask-r-cnn-and-tensorflow-7c761e238b46) where he explained the process starting from annotating images to training to using the results in a sample application.\n\nThe use train.py which is a modified version of balloon.py written by Waleed to support only the training part.\n```\n    # Train a new model starting from pre-trained COCO weights\n    python3 customTrain.py train --dataset=/path/to/custom/dataset --weights=coco\n\n    # Resume training a model that you had trained earlier\n    python3 customTrain.py train --dataset=/path/to/custom/dataset --weights=last\n```\n\n## :clap: Supporters\n\n### :star: Stargazers\n[![Stargazers repo roster for @mdhmz1/Auto-Annotate](https://reporoster.com/stars/dark/mdhmz1/Auto-Annotate)](https://github.com/mdhmz1/Auto-Annotate/stargazers)\n### :twisted_rightwards_arrows: Forkers \n[![Forkers repo roster for @mdhmz1/Auto-Annotate](https://reporoster.com/forks/dark/mdhmz1/Auto-Annotate)](https://github.com/mdhmz1/Auto-Annotate/network/members)\n\n##\n\n[🤝 CONNECT WITH ME ON LINKEDIN](https://www.linkedin.com/in/mdhmz1/)\n\n\n\u003ca href=\"https://www.linkedin.com/in/mdhmz1/\"\u003e![](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\n) \u003c/a\u003e\n\n##","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdhmz1%2FAuto-Annotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdhmz1%2FAuto-Annotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdhmz1%2FAuto-Annotate/lists"}