{"id":18455355,"url":"https://github.com/cloud-annotations/object-detection-python","last_synced_at":"2025-04-22T17:09:08.019Z","repository":{"id":97445352,"uuid":"169996082","full_name":"cloud-annotations/object-detection-python","owner":"cloud-annotations","description":"🐍 Run Object Detection Inferences in Python","archived":false,"fork":false,"pushed_at":"2020-02-03T21:47:49.000Z","size":21519,"stargazers_count":12,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T14:56:31.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/cloud-annotations.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-10T16:00:43.000Z","updated_at":"2022-05-26T01:25:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"543f0220-e27e-40d5-849b-40838bd22396","html_url":"https://github.com/cloud-annotations/object-detection-python","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/cloud-annotations%2Fobject-detection-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-annotations%2Fobject-detection-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-annotations%2Fobject-detection-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-annotations%2Fobject-detection-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-annotations","download_url":"https://codeload.github.com/cloud-annotations/object-detection-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285695,"owners_count":21405297,"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":[],"created_at":"2024-11-06T08:07:50.390Z","updated_at":"2025-04-22T17:09:07.974Z","avatar_url":"https://github.com/cloud-annotations.png","language":null,"readme":"# Object Detection Python Examples\n\nRun your models trained using [Cloud Annotations](https://github.com/cloud-annotations/training) with python.\n\n## Tflite Object Detection\n\nCurrently, `python-tflite.py` supports using Mobilenet-V1 SSD models trained using Cloud Annotations.\n\n### Output:\nSummary Information\n```\nImage 7 of 9.\nInference time: 0.15027356147766113\n----------\nInference Summary:\nHighest Score: 0.9407029747962952\nHighest Scoring Box: [0.60926155 0.47011317 0.67576766 0.56898813]\n----------\nImage shape: (563, 1000, 3)\nBoxes shape: (1917, 4)\nClasses shape: (1917,)\nScores shape: (1917,)\n['plate: 94%']\nImage Saved\n==========\n```\n\nSaved Image:\n\n![alt text](examples/tflite_interpreter/basic/model/sample_model/tflite_img.jpg)\n\n### Perform object detection with your model\n\nNote: to find a list of all models trained do:\n```\ncacli list\n```\n\nTo use a custom model, perform\n```\ncacli download \u003cmodel_name\u003e\n```\nFor example, if the downloaded files were saved to `/path/to/\u003cmodel_name\u003e` :\n* Our tflite model is stored in `\u003cmodel_name\u003e/model_android/model.tflite`\n* Our tflite anchors file is stored in `\u003cmodel_name\u003e/model_android/anchors.json`\n* Our tflite labels file is stored in `\u003cmodel_name\u003e/model_android/labels.json`\n\n\n```\ncd examples/tflite_interpreter/basic/\npython python-tflite.py --MODEL_DIR /path/to/\u003cmodel_name\u003e/model_android\n```\nThis script calls the tflite model interpreter for inference on all .jpg files inside the directory `PATH_TO_TEST_IMAGES_DIR`.\n\nSimilary the output .jpg files are storesd in `PATH_TO_OUTPUT_DIR`.\n\nWe can also specify the minimum confidence (score) for a given detection box to be displayed with `MINIMUM_CONFIDENCE`.\n\nFinally:\n```\npython python-tflite.py \\\n--MODEL_DIR /path/to/\u003cmodel_name\u003e/model_android \\\n--PATH_TO_TEST_IMAGES_DIR /path/to/test/images \\\n--PATH_TO_OUTPUT_DIR /path/to/output/images \\\n--MINIMUM_CONFIDENCE 0.01\n\n```\n\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites and installing\nInstall the required packages in `requirement.txt`\n\nCreating a new virtual environement is recommended.\n\n```\nconda create -n object_detection python=3.7\nconda activate object_detection\n```\n\nGit clone the repo and change directory into it. Then pip install the packages in `requirement.txt`.\n```\ncd directory/you/want/to/clone/into\ngit clone https://github.com/cloud-annotations/object-detection-python.git\ncd object-detection-python\npip install -r requirement.txt\n```\n\n### Test if everything is working\nI have supplied a test model and some test images. This should output the images with detection boxes and labels in jpg format in 'examples/tflite_interpreter/basic/model/output'\n\n```\ncd examples/tflite_interpreter/basic/\npython python-tflite.py\n```\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-annotations%2Fobject-detection-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-annotations%2Fobject-detection-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-annotations%2Fobject-detection-python/lists"}