{"id":13586578,"url":"https://github.com/goruck/detection-server","last_synced_at":"2026-05-16T02:03:02.914Z","repository":{"id":37656741,"uuid":"267486452","full_name":"goruck/detection-server","owner":"goruck","description":"Object detection served over grpc using Google Edge TPU.","archived":false,"fork":false,"pushed_at":"2023-07-05T21:02:41.000Z","size":42,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-14T21:38:06.708Z","etag":null,"topics":["detection-server","google-edge-tpu","grpc","object-detection"],"latest_commit_sha":null,"homepage":null,"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/goruck.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":"2020-05-28T03:42:53.000Z","updated_at":"2024-08-01T16:32:37.522Z","dependencies_parsed_at":"2024-08-01T16:32:34.287Z","dependency_job_id":null,"html_url":"https://github.com/goruck/detection-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goruck/detection-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruck%2Fdetection-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruck%2Fdetection-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruck%2Fdetection-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruck%2Fdetection-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goruck","download_url":"https://codeload.github.com/goruck/detection-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruck%2Fdetection-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"online","status_checked_at":"2026-05-16T02:00:07.515Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["detection-server","google-edge-tpu","grpc","object-detection"],"created_at":"2024-08-01T15:05:39.708Z","updated_at":"2026-05-16T02:03:02.890Z","avatar_url":"https://github.com/goruck.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# detection-server\n\nThis project implements object detection served over grpc using the Google Edge TPU. These detections are returned from the server in the form of the centroid coordinates of the object's bounding box and its label. \n\nThis is part of the [radar-ml](https://github.com/goruck/radar-ml) project.\n\n# Installation\nClone this directory and cd to it.\n\nInstall the required Python modules in [requirements.txt](./requirements.txt) and OpenCV per the instructions [here](https://github.com/goruck/smart-zoneminder/tree/master/tpu-servers#installation).\n\nIf you'd like to compile the Protocol Buffers from scratch, use the following command.\n\n```bash\n$ python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./detection_server.proto\n```\n\n# Usage\nSee [detection_server.proto](./detection_server.proto) for the server's interface definitions. \n\nThe following illustrates an example client calling the detection server's services.\n\n```python\n\"\"\"\nExample client for detection_server.py.\n\nCopyright (c) 2020 Lindo St. Angel\n\"\"\"\n\nimport grpc\nimport detection_server_pb2\nimport detection_server_pb2_grpc\n\ndef get_camera_resolution(stub):\n    request = detection_server_pb2.Empty()\n    try:\n        response = stub.GetCameraResolution(request)\n        print('Camera resolution fetched.')\n        return response\n    except grpc.RpcError as err:\n        print(err.details()) #pylint: disable=no-member\n        print('{}, {}'.format(err.code().name, err.code().value)) #pylint: disable=no-member\n        exit(1)\n\ndef get_detected_objects(stub):\n    request = detection_server_pb2.DesiredLabels(labels=['person', 'dog', 'cat'])\n    try:\n        response = stub.GetDetectedObjects(request)\n        print('Detected object(s) fetched.')\n        return response\n    except grpc.RpcError as err:\n        print(err.details()) #pylint: disable=no-member\n        print('{}, {}'.format(err.code().name, err.code().value)) #pylint: disable=no-member\n        exit(1)\n\ndef run():\n    with grpc.insecure_channel('localhost:50051') as channel:\n        stub = detection_server_pb2_grpc.DetectionServerStub(channel)\n        while True:\n            res = get_camera_resolution(stub)\n            print(res)\n            res = get_detected_objects(stub)\n            print(res)\n\nif __name__ == '__main__':\n    run()\n```\n\n# License\nEverything here is licensed under the [MIT license](./LICENSE).\n\n# Contact\nFor questions or comments about this project please contact the author goruck (Lindo St. Angel) at {lindostangel} AT {gmail} DOT {com}.\n\n# Acknowledgements\nThis project inspired by and borrows from [OpenCV camera examples with Coral](https://github.com/google-coral/examples-camera/tree/master/opencv). ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoruck%2Fdetection-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoruck%2Fdetection-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoruck%2Fdetection-server/lists"}