{"id":20371761,"url":"https://github.com/28mm/fovea","last_synced_at":"2025-04-12T06:24:49.846Z","repository":{"id":107364849,"uuid":"82830526","full_name":"28mm/Fovea","owner":"28mm","description":"unified cli for various saas image classification apis. ","archived":false,"fork":false,"pushed_at":"2017-09-05T21:45:05.000Z","size":6756,"stargazers_count":40,"open_issues_count":9,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T01:51:08.533Z","etag":null,"topics":["clarifai","google-cloud-vision","imagga","microsoft-cognitive-services","rekognition","sighthound","watson-visual-recognition"],"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/28mm.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-22T17:02:58.000Z","updated_at":"2022-12-02T05:03:48.000Z","dependencies_parsed_at":"2023-05-17T06:31:07.228Z","dependency_job_id":null,"html_url":"https://github.com/28mm/Fovea","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/28mm%2FFovea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28mm%2FFovea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28mm%2FFovea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28mm%2FFovea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/28mm","download_url":"https://codeload.github.com/28mm/Fovea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248526386,"owners_count":21118879,"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":["clarifai","google-cloud-vision","imagga","microsoft-cognitive-services","rekognition","sighthound","watson-visual-recognition"],"created_at":"2024-11-15T01:09:35.744Z","updated_at":"2025-04-12T06:24:49.815Z","avatar_url":"https://github.com/28mm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=center\u003e\n\u003cimg src=\"examples/tty.gif\"\u003e\n\u003c/p\u003e\n\nFovea is a unified command-line interface to computer vision APIs from [Google](https://cloud.google.com/vision/docs/), [Microsoft](https://www.microsoft.com/cognitive-services/en-us/computer-vision-api), [AWS](https://aws.amazon.com/rekognition/), [Clarifai](https://developer.clarifai.com/), [Imagga](https://wwww.imagga.com/), [IBM Watson](https://www.ibm.com/watson/developercloud/visual-recognition.html), and [SightHound](https://www.sighthound.com/products/cloud/) Use Fovea if you want to:\n\n1.\tEasily classify images in a shell script.\n2.\tCompare alternative computer vision apis.\n\nThe table below characterizes Fovea's current feature coverage. Most vendors offer broadly similar features, but their output formats differ. Where possible, Fovea uses a tabular output mode suitable for interactive shell sessions, and scripts. If a particular feature is not supported by this tabular output mode, vendor-specific JSON is available, instead. \n\n| Feature               | Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n| ---:                  |  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| [Labels](#labels) | ✅️️     | ✅    ️️   | ✅️️     |  ✅      |  ✅   | ✅       |        | ✅         ️️| ✅    ️️|\n| [Label i18n](#label-i18n)    |        | ✅       |        | ✅        | ✅    | ✅       |        | ✅          | ✅      |\n| [Faces](#faces)                 | ✅️️     | ✅️️       | ✅️️     |  ✅      |  ✅   |        | ✅️️     | ✅️️         | ✅️️    |\n| [Landmarks](#landmarks)             | ✅     |          |        |          |        |        |        | ✅️️         | ✅️    ️|\n| [Text (OCR)](#ocr)            | ✅     | ✅️️️       |        |          |        |        |        | ️️❌          | ✅️️    |\n| [Emotions](#emotions)              | ✅️️     | ✅️️       | ❌️     |          |       |        |  ✅       | ❌          | ✅️️    |\n| [Description](#description)           |        | ✅️️       |        |          |        |        |         | ❌          | ✅️️    |\n| [Adult (NSFW)](#adult)          | ✅     | ✅️️       |        | ✅️️       |        | ❌        |         | ✅️️          | ✅️️    | \n| [Categories](#categories)            |        | ✅️️       |        |          | ✅️️     |        |         | ✅️️          | ✅️️    |\n| [Image Type](#image-type)            |        | ✅️       |        |          |        |        |         | ❌          | ✅️    ️|\n| [Color](#color)                 |        | ✅️️       |        | ✅️️       |        | ❌       |         | ❌          | ✅️️    |\n| [Celebrities](#celebrities)           |        | ✅       |        | ✅️       | ✅     |        | ✅️        | ✅️          | ✅      |\n| [Vehicles](#vehicles)           |        |        |        |     |     |        | ✅        | ✅️          | ✅      |\n\n\n✅ indicates a working feature, ❌ indicates a missing feature, and empty-cells represent features not supported by a particular vendor.\n\n## Installation and Setup\n\nClone the Fovea repository, install its dependencies, and source its environment script.\n\n````bash\n[user@host]$ git clone https://github.com/28mm/Fovea.git\n[user@host]$ cd Fovea\n[user@host]$ pip3 install -r requirements.txt\n[user@host]$ source fovea-env.sh \n`````\n\nObtain credentials for the web services you plan to use. These should be supplied to Fovea via environment variables. See `fovea-env.sh` for a template.\n\n * Google Cloud Vision API: [https://cloud.google.com/vision/docs/](https://cloud.google.com/vision/docs/)\n * Microsoft Computer Vision API: [https://www.microsoft.com/cognitive-services/en-us/computer-vision-api](https://www.microsoft.com/cognitive-services/en-us/computer-vision-api)\n * Amazon Web Services Rekognition: [https://aws.amazon.com/rekognition/](https://aws.amazon.com/rekognition/)\n * IBM Watson Image Recognition: [https://www.ibm.com/watson/developercloud/visual-recognition.html](https://www.ibm.com/watson/developercloud/visual-recognition.html)\n * Clarifai: [https://developer.clarifai.com/](https://developer.clarifai.com/)\n * Imagga: [https://docs.imagga.com](https://docs.imagga.com)\n * SightHound: [https://www.sighthound.com/products/cloud/](https://www.sighthound.com/products/cloud/)\n\n\n````bash\nexport GOOG_CV_KEY=\"\"\nexport MSFT_CV_KEY=\"\"\nexport AWS_CV_KEY_ID=\"\"\nexport AWS_CV_KEY_SECRET=\"\"\nexport AWS_CV_REGION=\"\"\nexport CLARIFAI_CLIENT_ID=\"\"\nexport CLARIFAI_CLIENT_SECRET=\"\"\nexport CLARIFAI_ACCESS_TOKEN=\"\"\nexport WATSON_CV_URL=\"\"\nexport WATSON_CV_KEY=\"\"\nexport IMAGGA_ID=\"\"\nexport IMAGGA_SECRET=\"\"\nexport SIGHTHOUND_TOKEN=\"\"\n````\n\n## Usage\n````bash\nusage: fovea [-h]\n             [--provider {google,microsoft,amazon,opencv,watson,clarifai,imagga,facebook,sighthound}]\n             [--google | --microsoft | --amazon | --opencv | --watson | --clarifai | --facebook | --imagga | --sighthound]\n             [--output {tabular,json,yaml}] [--tabular | --json | --yaml]\n             [--lang LANG] [--ocr-lang OCR_LANG] [--max-labels MAX_LABELS]\n             [--precision PRECISION] [--labels] [--faces] [--text]\n             [--emotions] [--description] [--celebrities] [--adult]\n             [--categories] [--image_type] [--color] [--landmarks]\n             [--vehicles] [--confidence confidence threshold] [--ontology]\n             [--model MODELS] [--list-models] [--list-langs]\n             [--list-ocr-langs]\n             [files [files ...]]\n````\n\n## Supported Features\n\n### Labels\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| ✅️️     | ✅    ️️   | ✅️️     |  ✅      |  ✅   | ✅       |        | ✅         ️️| ✅    ️️|\n\n\nIf no other flags are set, `--labels` is set by default, and `--provider` is set to `google`.\n\n````bash\n[user@host]$ fovea inverts/cten/pleur.jpg\n0.76\tbiology\n0.72\torganism\n0.61\tinvertebrate\n0.50\tdeep sea fish\n````\n\n````bash\n[user@host]$ fovea --clarifai  inverts/cten/pleur.jpg\n1.00    invertebrate\n0.99    science\n0.97    no person\n0.97    desktop\n0.96    biology\n0.96    exploration\n0.94    nature\n0.93    underwater\n0.93    one\n0.92    wildlife\n````\n\n### Label i18n\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        | ✅       |        | ✅        | ✅    | ✅       |        | ✅          | ✅      |\n\n\nSeveral providers offer label translations, and all default to English (en). Learn which languages a given provider supports with the list `--list-langs` flag.\n\n````bash\n[user@host]$ fovea --microsoft --list-langs\nen\nzh\n````\n\nFrom the list of vendor-supported languages, set the desired language with the `--lang` argument.\n\n````bash\n[user@host]$ fovea http://omp.gso.uri.edu/ompweb/doee/biota/inverts/cten/pleur.jpg --clarifai --lang ar\n0.99\tلافقاريات\n0.99\tالعلوم\n0.96\tلا يجوز لأي شخص\n0.96\tخلفية حاسوب\n0.95\tعلم الاحياء\n0.95\tاستكشاف\n````\n\n### Faces\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| ✅️️     | ✅️️       | ✅️️     |  ✅      |  ✅   |        | ✅️️     | ✅️️         | ✅️️    |\n\nMost vendors support face detection. In addtion, OpenCV's pre-trained Haar cascade is available with the `--faces` and `--opencv` flags. The bounding box for each detected face is reported in a four field format, described below.\n\n  1. Left-X \n  2. Top-Y\n  3. Width\n  4. Height\n\nSee [examples/face-detection](examples/face-detection) for further information.\n\n### Landmarks\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| ✅     |          |        |          |        |        |        | ✅️️         | ✅️    ️|\n\n\nAt present, only Google supports landmark and location detection. \n\n````bash\n[user@host]$ fovea --landmarks ../ex/rattlesnake-ledge.jpg\n0.35\tRattlesnake Lake\t47.436158,-121.77812576293945\n````\n\n### OCR\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| ✅     | ✅️️️       |        |          |        |        |        | ️️❌          | ✅️️    |\n\n\nOCR is only supported in the JSON output mode, and its format is vendor specific.\n\n### Emotions\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| ✅️️     | ✅️️       | ❌️     |          |       |        | ✅️️         | ❌          | ✅️️    |\n\n\nEmotion detection is only supported in the JSON output mode, and its format is vendor specific.\n\n### Description\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        | ✅️️       |        |          |        |        |         | ❌          | ✅️️    |\n\n\nScene descriptions are only available in the JSON output mode, and its format is vendor specific.\n\n### Adult\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n| ✅     | ✅️️       |        | ✅️️       |        | ❌        |         | ✅️️          | ✅️️    | \n\n\nThe parameters for NSFW and Adult image detection vary a bit between vendors. The values for Google are fudged from likelihoods (VERY_LIKELY, LIKELY, VERY_UNLIKELY) to numeric values (0.01, 0.25, 0.50, 0.75, 0.99), in order to follow the convention established by other services.\n\n```bash\n[user@host]$ fovea --adult --google test.jpg\n0.25\tnsfw\n\n[user@host]$ fovea --adult --clarifai test.jpg\n0.99\tsfw\n0.01\tnsfw\n\n[user@host]$ fovea --adult --microsoft test.jpg\n0.13\tnsfw\n0.07\tracy\n````\n\n### Categories\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        | ✅️️       |        |          | ✅️️     |        |         | ✅️️          | ✅️️    |\n\n\nCategoriziation is only available in the JSON output mode, and its format is vendor specific.\n\n### Image Type\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        | ✅️       |        |          |        |        |         | ❌          | ✅️    ️|\n\n\nImage type detection is only available in the JSON output mode, and its format is vendor specific.\n\n### Color\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        | ✅️️       |        | ✅️️       |        | ❌       |         | ❌          | ✅️️    |\n\nDominant color detection is only available in the JSON output mode, and its format is vendor specific.\n\n### Celebrities\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        | ✅       |        | ✅️       | ✅     |        | ✅️        | ✅️          | ✅      |\n\nCelebrity face matches are reported in a seven field format (if `--ontology` is set), or a six field format (if `--ontology` is not set). These formats are described below.\n\n  1. Left-X \n  2. Top-Y\n  3. Width\n  4. Height\n  5. Confidence Score\n  6. Ontology Link or a placeholder (if `--ontology` is set.)\n  7. The Celebrity's Name\n\n````bash\n[user@host]$ fovea obamas.jpg --microsoft --celebrities\n432 134 148 148 0.95    Barack Hussein Obama\n279 191 117 117 1.00    Michelle Obama\n````\n\nIn contrast to IBM and Microsoft, which return only their highest confidence results, Clarfai returns a long list of possible matches for each face. Exclude lower-confidence matches with the `--confidence \u003cint\u003e` parameter.\n\n````\n[user@host]$ fovea --celebrities --clarifai --confidence 0.9 --ontology obamas.jpg\n427 122 162 162 0.99    ai_5XjK3npz barack obama\n266 179 140 140 0.95    ai_z2S44mJX michelle obama\n````\n\n### Vehicles\n\n| Google | Microsoft | Amazon | Clarifai | Watson | Imagga | S. Hound | Tabular   |  JSON |\n|  ---   | ---       | ---    | ---      | ---    | ---    |---    |  ---      | ---  |\n|        |        |        |     |    |        | ✅️          | ✅️          | ✅      |\n\nVehicle detection and recognition are only available with SightHound. Recognized cars are reported in a ten field format, described below.\n\n  1. Left-X \n  2. Top-Y\n  3. Width\n  4. Height\n  5. Confidence Score (Make)\n  6. Make (e.g. *Cadillac*)\n  7. Confidence Score (Model)\n  8. Model (e.g. *Ats*)\n  9. Confidence Score (Color)\n  10. Color (e.g. *Black*)\n\n````bash\n[user@host]$ fovea --sighthound --vehicles batmobile.jpg\n15  112 580 238 0.08    Cadillac    0.08    Ats 0.66    black\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F28mm%2Ffovea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F28mm%2Ffovea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F28mm%2Ffovea/lists"}