{"id":29027621,"url":"https://github.com/defi0x1/google-vision-api","last_synced_at":"2025-06-26T06:37:29.479Z","repository":{"id":44190603,"uuid":"253733523","full_name":"defi0x1/google-vision-api","owner":"defi0x1","description":"Text Annotation Using Google Vision API","archived":false,"fork":false,"pushed_at":"2023-10-03T00:31:23.000Z","size":505,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T04:45:39.595Z","etag":null,"topics":["google-vision-api","text-annotation"],"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/defi0x1.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-04-07T08:31:25.000Z","updated_at":"2023-03-04T04:10:04.000Z","dependencies_parsed_at":"2025-02-18T21:43:10.408Z","dependency_job_id":null,"html_url":"https://github.com/defi0x1/google-vision-api","commit_stats":null,"previous_names":["docongminh/google-vision-api","defi0x1/google-vision-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/defi0x1/google-vision-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defi0x1%2Fgoogle-vision-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defi0x1%2Fgoogle-vision-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defi0x1%2Fgoogle-vision-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defi0x1%2Fgoogle-vision-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defi0x1","download_url":"https://codeload.github.com/defi0x1/google-vision-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defi0x1%2Fgoogle-vision-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262017152,"owners_count":23245578,"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":["google-vision-api","text-annotation"],"created_at":"2025-06-26T06:37:14.319Z","updated_at":"2025-06-26T06:37:29.468Z","avatar_url":"https://github.com/defi0x1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Use Google Vision API to extract Text Annotations\n\n## Description\n\nHere Script use `Google Vision api` to extract `Text Annotations` in images.\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 script\n\nText Detection\n\n```bash\n~ python vision.py --images ./images \n```\n\nTest Result\n```bash\n~ python test.py --gt ./ --output ./image_test --number_test 2\n```\n\nConvert to Pascal VOC data format\n```bash\n~ python convert_pascal_format.py --output output --input images --gt_path gt.pkl\n```\n\n# Result\n## Words Annotations\n![Words Annotations](https://github.com/docongminh/Simple-google-vision-api/blob/master/image_test/word_rect_test.jpg)\n\n## Character Annotations\n![Characters Annotations](https://github.com/docongminh/Simple-google-vision-api/blob/master/image_test/char_rect_test.jpg)\n\n## Image Suggestion Resizing\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefi0x1%2Fgoogle-vision-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefi0x1%2Fgoogle-vision-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefi0x1%2Fgoogle-vision-api/lists"}