PHPackages                             kontrimas/google-vision - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kontrimas/google-vision

ActiveLibrary[API Development](/categories/api)

kontrimas/google-vision
=======================

Google Vision Api for PHP (https://cloud.google.com/vision/)

1.7.4(8y ago)011MITPHPPHP ^5.6 || ^7.0

Since Jan 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/antanas777/Php-Google-Vision-Api)[ Packagist](https://packagist.org/packages/kontrimas/google-vision)[ RSS](/packages/kontrimas-google-vision/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (22)Used By (0)

Google Vision, PHP Client
=========================

[](#google-vision-php-client)

[![Latest Stable Version](https://camo.githubusercontent.com/25ba2ab6496fda0a2da7e5d554a3ca9bf21816a0ad99bc6f4501049c1e3c61ae/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7264696b726f6f6e2f676f6f676c652d766973696f6e2f762f737461626c65)](https://packagist.org/packages/jordikroon/google-vision)[![Build Status](https://camo.githubusercontent.com/50b5d301015c745b4043bc8fa7b0e595d632642f7a7766111f20a18bf0e86f11/68747470733a2f2f7472617669732d63692e6f72672f6a6f7264696b726f6f6e2f5068702d476f6f676c652d566973696f6e2d4170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jordikroon/Php-Google-Vision-Api)[![Dependency Status](https://camo.githubusercontent.com/d69d5958d624d88d9865ce6ff78aafd48d7a72cb69663794bff1acd30c67c4aa/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3538386264616430633634363236303032653564366261662f62616467652e7376673f7374796c653d666c61742d737175617265)](https://www.versioneye.com/user/projects/588bdad0c64626002e5d6baf)[![License](https://camo.githubusercontent.com/ba86da2807b613ca6f101f58168ad46608db413906e769124cd7c0c53c41d59f/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7264696b726f6f6e2f676f6f676c652d766973696f6e2f6c6963656e7365)](https://packagist.org/packages/jordikroon/google-vision)

Instalation
-----------

[](#instalation)

The easiest way to install Google Vision is through [Composer](http://getcomposer.org).

```
composer require jordikroon/google-vision
```

Next is to obtain an API key through the [Google Cloud Platform](https://cloud.google.com). To get one visit the link below.

Requirements
------------

[](#requirements)

- [PHP &gt;= 5.6](http://php.net/releases/5_6_0.php)
- [Curl extension](http://php.net/manual/en/curl.installation.php)

Basic usage
-----------

[](#basic-usage)

```
$vision = new \Vision\Vision(
    $apiKey,
    [
        // See a list of all features in the table below
        // Feature, Limit
        new \Vision\Feature(\Vision\Feature::FACE_DETECTION, 100),
    ]
);

$imagePath = $_FILES['file']['tmp_name'];
$response = $vision->request(
    // See a list of all image loaders in the table below
    new \Vision\Request\Image\LocalImage($imagePath)
);

$faces = $response->getFaceAnnotations();
foreach ($faces as $face) {
    foreach ($face->getBoundingPoly()->getVertices() as $vertex) {
        echo sprintf('Person at position X %f and Y %f', $vertex->getX(), $vertex->getY());
    }
}
```

Available features
------------------

[](#available-features)

NameConstant[LABEL\_DETECTION](https://cloud.google.com/vision/docs/detecting-labels)\\Vision\\Feature::LABEL\_DETECTION [TEXT\_DETECTION](https://cloud.google.com/vision/docs/detecting-text)\\Vision\\Feature::TEXT\_DETECTION[FACE\_DETECTION](https://cloud.google.com/vision/docs/detecting-faces)\\Vision\\Feature::FACE\_DETECTION[LANDMARK\_DETECTION](https://cloud.google.com/vision/docs/detecting-landmarks)\\Vision\\Feature::LANDMARK\_DETECTION[LOGO\_DETECTION](https://cloud.google.com/vision/docs/detecting-logos)\\Vision\\Feature::LOGO\_DETECTION[SAFE\_SEARCH\_DETECTION](https://cloud.google.com/vision/docs/detecting-safe-search)\\Vision\\Feature::SAFE\_SEARCH\_DETECTION[IMAGE\_PROPERTIES](https://cloud.google.com/vision/docs/detecting-properties)\\Vision\\Feature::IMAGE\_PROPERTIES[WEB\_DETECTION](https://cloud.google.com/vision/docs/detecting-web)\\Vision\\Feature::WEB\_DETECTION[CROP\_HINTS](https://cloud.google.com/vision/docs/detecting-crop-hints)\\Vision\\Feature::CROP\_HINTS[DOCUMENT\_TEXT\_DETECTION](https://cloud.google.com/vision/docs/detecting-fulltext)\\Vision\\Feature::DOCUMENT\_TEXT\_DETECTIONAvailable image loaders
-----------------------

[](#available-image-loaders)

Image loaderDescription[\\Vision\\Request\\Image\\Base64Image](src/Request/Image/Base64Image.php)Loads Base64 encoded images [\\Vision\\Request\\Image\\BinaryImage](src/Request/Image/BinaryImage.php)Loads binary images (file\_get\_contents or fopen)[\\Vision\\Request\\Image\\GoogleCloudImage](src/Request/Image/GoogleCloudImage.php)Loads images from a Google Cloud bucket[\\Vision\\Request\\Image\\LocalImage](src/Request/Image/LocalImage.php)Loads a locally stored image[\\Vision\\Request\\Image\\RemoteImage](src/Request/Image/RemoteImage.php)Loads a remote (HTTP/HTTPS) image somewhere from the webTo add a feature, add a `new \Vision\Feature` instance to features array used as second parameter. See [Basic Usage](#Basic-Usage) for a full example.

```
new \Vision\Feature($feature, $maxResults);
```

Run tests
---------

[](#run-tests)

```
$ composer install
$ ./vendor/bin/phpunit
```

Authors
-------

[](#authors)

Jordi Kroon | [Github](https://github.com/jordikroon) | [Twitter](https://twitter.com/jordi12100) | [jordikroon.nl](https://jordikroon.nl)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Total

21

Last Release

2998d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6.0

1.4.0PHP ^5.6 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/aee00d72419ad9b1e941e21ffe90c7273d549d71d45e9d13d228efc5df7c249a?d=identicon)[antanas777](/maintainers/antanas777)

---

Top Contributors

[![jordikroon](https://avatars.githubusercontent.com/u/2232811?v=4)](https://github.com/jordikroon "jordikroon (91 commits)")[![antanas777](https://avatars.githubusercontent.com/u/11694127?v=4)](https://github.com/antanas777 "antanas777 (2 commits)")[![lthurston](https://avatars.githubusercontent.com/u/202726?v=4)](https://github.com/lthurston "lthurston (2 commits)")[![KernelFolla](https://avatars.githubusercontent.com/u/615712?v=4)](https://github.com/KernelFolla "KernelFolla (1 commits)")

---

Tags

apicloudgoogleimagevisionrecognitionfacelandmark

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kontrimas-google-vision/health.svg)

```
[![Health](https://phpackages.com/badges/kontrimas-google-vision/health.svg)](https://phpackages.com/packages/kontrimas-google-vision)
```

###  Alternatives

[jordikroon/google-vision

Google Vision Api for PHP (https://cloud.google.com/vision/)

6374.9k1](/packages/jordikroon-google-vision)[aimeos/aimeos-headless

Aimeos headless ecommerce system

2.5k2.3k](/packages/aimeos-aimeos-headless)[mtownsend/remove-bg

A PHP package to interface with the remove.bg api.

183315.4k](/packages/mtownsend-remove-bg)[jcf/geocode

Google Geocoding API for Laravel

48160.5k](/packages/jcf-geocode)[serpwow/google-search-results

Google Search Results PHP package via SerpWow.com

1931.8k1](/packages/serpwow-google-search-results)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
