{"id":16194710,"url":"https://github.com/hironsan/google-vision-sampler","last_synced_at":"2025-08-11T21:31:39.509Z","repository":{"id":50204146,"uuid":"72064118","full_name":"Hironsan/google-vision-sampler","owner":"Hironsan","description":"Code examples for Google Vision API.","archived":false,"fork":false,"pushed_at":"2022-12-08T02:46:48.000Z","size":1421,"stargazers_count":46,"open_issues_count":4,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-02T02:04:46.864Z","etag":null,"topics":["face-detection","google-vision","label-detection","logo-detection","python","text-detection","vision-api"],"latest_commit_sha":null,"homepage":null,"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/Hironsan.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":"2016-10-27T02:39:26.000Z","updated_at":"2024-06-13T09:12:47.000Z","dependencies_parsed_at":"2023-01-24T21:15:40.089Z","dependency_job_id":null,"html_url":"https://github.com/Hironsan/google-vision-sampler","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/Hironsan%2Fgoogle-vision-sampler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hironsan%2Fgoogle-vision-sampler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hironsan%2Fgoogle-vision-sampler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hironsan%2Fgoogle-vision-sampler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hironsan","download_url":"https://codeload.github.com/Hironsan/google-vision-sampler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229608528,"owners_count":18098039,"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":["face-detection","google-vision","label-detection","logo-detection","python","text-detection","vision-api"],"created_at":"2024-10-10T08:24:40.383Z","updated_at":"2024-12-13T19:59:46.073Z","avatar_url":"https://github.com/Hironsan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-vision-sampler\n\nCode examples for Google Vision API written in Python.\n\n## Description\n\nExample codes has following features:\n\n* Face Detection\n* Landmark Detection\n* Logo Detection\n* Label Detection\n* Text Detection\n\n## Requirement\n\n* Python 3.x\n* Credentials\n\n## Setup\n\nTo install necessary library, simply use pip:\n\n```bash\npip install google-cloud-vision\n```\n\nor,\n\n```bash\npip install -r requirements.txt\n```\n\nNext, set up to authenticate with the Cloud Vision API using your project's service account credentials. See the [Vision API Client Libraries](https://cloud.google.com/vision/docs/libraries) for more information. Then, set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to your downloaded service account credentials:\n\n```bash\nexport GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials-key.json\n```\n\n## Quick Start: Running the Example\n\n\n### Face Detection\n\nFace Detection demo using FACE_DETECTION feature.\n\n![Face Detection](images/face.jpg)\n\n```bash\n$ python examples/face_detection.py images/face.jpg\nJoy Likelihood: 1\nJoy Likelihood: 5\n```\n\n### Label Detection\n\nLabel Detection demo using LABEL_DETECTION feature.\n\n![Label Detection](images/label.jpg)\n\n```bash\n$ python examples/label_detection.py images/label.jpg\nLabels:\nlaptop\nelectronic device\ntechnology\nnetbook\ncomputer keyboard\npersonal computer\ngadget\n```\n\n### Landmark Detection\n\nLandmark Detection demo using LANDMARK_DETECTION feature.\n\n![Landmark Detection](images/landmark.jpg)\n\n```bash\n$ python examples/landmark_detection.py images/landmark.jpg\nFound landmark: Statue of Liberty\n```\n\n### Logo Detection\n\nLogo Detection demo using LOGO_DETECTION feature.\n\n![Logo Detection](images/logo.jpg)\n\n```bash\n$ python examples/logo_detection.py images/logo.jpg\nFound logo: Starbucks\n```\n\n### Text Detection\n\nText Detection demo using TEXT_DETECTION feature.\n\n![Text Detection](images/text.png)\n\n```bash\n$ python examples/text_detection.py images/text.png\nThe Daily News\nThe martians have come at last\nLorem Ipsum is simply dummy Lorem Ipsum is simply dummy\ntext of the printing and typesettingext of the printing and typesetting\nindustry. Lorem Ipsum has been industry. Lorem Ipsum has been\nthe industry's standard dummy the industry's standard dummy\ntext ever since the 1500s, when text ever since the 1500s, whern\nan unknown printer took a galley an unknown printer took a galley\nof type and scrambled it to make of type and scrambled it to make\na type specimen book. It has a type specimen book. It has\nsurvived not only five centuries survived not only five centuries\n, but also the leap into electronic , but also the leap into electronic\n...\n```\n\n## Image Sizing\n\nTo enable accurate image detection within the Google Cloud Vision API, images should generally be a minimum of 640 x 480 pixels (about 300k pixels). Full details for different types of Vision API Feature requests are shown below:\n\n| Vision API Feature | Recommended Size | Notes |\n|---|---|---|\n| FACE_DETECTION | 1600 x 1200 | Distance between eyes is most important |\n| LANDMARK_DETECTION | 640 x 480 |   |\n| LOGO_DETECTION | 640 x 480 |   |\n| LABEL_DETECTION | 640 x 480 |   |\n| TEXT_DETECTION | 1024 x 768 | OCR requires more resolution to detect characters |\n| SAFE_SEARCH_DETECTION | 640 x 480 |   |\n\n## Licence\n\n[MIT](https://github.com/Hironsan/google-vision-sampler/blob/master/LICENSE)\n\n## Author\n\n[Hironsan](https://github.com/Hironsan)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhironsan%2Fgoogle-vision-sampler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhironsan%2Fgoogle-vision-sampler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhironsan%2Fgoogle-vision-sampler/lists"}