All Projects → wapnen → google-cloud-vision-php

wapnen / google-cloud-vision-php

Licence: MIT license
A simple php wrapper for the google cloud vision API

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to google-cloud-vision-php

google-vision-sampler
Code examples for Google Vision API.
Stars: ✭ 47 (+193.75%)
Mutual labels:  face-detection, logo-detection, label-detection
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+9687.5%)
Mutual labels:  face-detection, landmark-detection
MLKit
🌝 MLKit是一个强大易用的工具包。通过ML Kit您可以很轻松的实现文字识别、条码识别、图像标记、人脸检测、对象检测等功能。
Stars: ✭ 294 (+1737.5%)
Mutual labels:  ocr, face-detection
Idmatch
Match faces on id cards with OCR capabilities.
Stars: ✭ 52 (+225%)
Mutual labels:  ocr, face-detection
Ai Reading Materials
Some of the ML and DL related reading materials, research papers that I've read
Stars: ✭ 79 (+393.75%)
Mutual labels:  ocr, face-detection
ImageToText
OCR with Google's AI technology (Cloud Vision API)
Stars: ✭ 30 (+87.5%)
Mutual labels:  ocr, google-cloud-vision
Tnn
TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and …
Stars: ✭ 3,257 (+20256.25%)
Mutual labels:  ocr, face-detection
Hms Ml Demo
HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
Stars: ✭ 187 (+1068.75%)
Mutual labels:  ocr, face-detection
bob
Bob is a free signal-processing and machine learning toolbox originally developed by the Biometrics group at Idiap Research Institute, in Switzerland. - Mirrored from https://gitlab.idiap.ch/bob/bob
Stars: ✭ 38 (+137.5%)
Mutual labels:  face-detection, landmark-detection
align iranian national id card
A program to align rotated id cards and extract user data from it.
Stars: ✭ 48 (+200%)
Mutual labels:  ocr, face-detection
DeepVTB
🌌 OpenVTuber-虚拟アイドル共享计划 An application of real-time face and gaze analyzation via deep nerual networks.
Stars: ✭ 32 (+100%)
Mutual labels:  face-detection, landmark-detection
enhanced-ssh-mxnet
The MXNet Implementation of Enhanced SSH (ESSH) for Face Detection and Alignment
Stars: ✭ 54 (+237.5%)
Mutual labels:  face-detection
face detection
using caffemode which is provided by shiqi yu
Stars: ✭ 14 (-12.5%)
Mutual labels:  face-detection
Persian-OCR
Optical character recognition of Farsi and Arabic letters
Stars: ✭ 36 (+125%)
Mutual labels:  ocr
jp-ocr-prunned-cnn
Attempting feature map prunning on a CNN trained for Japanese OCR
Stars: ✭ 15 (-6.25%)
Mutual labels:  ocr
Fovea
A CLI for the Google, Clarifai, Rekognition (AWS), Imagga, Watson, SightHound, and Microsoft Computer Vision APIs.
Stars: ✭ 37 (+131.25%)
Mutual labels:  google-cloud-vision
tesseract-ocr
Node.js wrapper for Tesseract OCR CLI.
Stars: ✭ 29 (+81.25%)
Mutual labels:  ocr
FileBasedMiniDMS
This php script sorts your documents (by using hardlinks) into subfolders based on the hashtags it finds in your documents filenames.
Stars: ✭ 35 (+118.75%)
Mutual labels:  ocr
keras-yolo3-facedetection
Real-time face detection model using YOLOv3 with Keras
Stars: ✭ 13 (-18.75%)
Mutual labels:  face-detection
pigallery
PiGallery: AI-powered Self-hosted Secure Multi-user Image Gallery and Detailed Image analysis using Machine Learning, EXIF Parsing and Geo Tagging
Stars: ✭ 35 (+118.75%)
Mutual labels:  face-detection

google-cloud-vision-php

Overview

Performs Label detection, face detection, Logo detection, explicit content detection, landmark detection, optical character recogition and web detection on images. You can read more about Google cloud vision here https://cloud.google.com/vision/

Getting Started

You will need a google account to use this API so if you do not already have an account with google, head over there and create one

Installation

composer require wapnen/google-cloud-vision-php

Enable the API

To start using the google cloud vision api, follow the instructions here to enable the api for your google account https://cloud.google.com/vision/docs/before-you-begin

Authentication

You must set up an Api key to authenticate your requests. Follow the instructions here https://support.google.com/cloud/answer/6158862?hl=en to set up an API key for your project on google cloud platform console

Usage

<?php
include "vendor/autoload.php";
use GoogleCloudVision\GoogleCloudVision;
use GoogleCloudVision\Request\AnnotateImageRequest;
use GoogleCloudVision\Request\Request;


$annotateImageRequest1 = new AnnotateImageRequest();
$annotateImageRequest1->setImageUri("https://cdn.pixabay.com/photo/2016/02/19/11/25/supreme-court-building-1209701_960_720.jpg");
$annotateImageRequest1->setFeature('IMAGE_PROPERTIES');
$annotateImageRequest1->setFeature('LABEL_DETECTION');
$annotateImageRequest1->setFeature('WEB_DETECTION');

$gcvRequest = new GoogleCloudVision([$annotateImageRequest1], "Your_api_key");
$response = $gcvRequest->annotate();

echo json_encode($response);



 ?>

Note : You can create as many as 16 Annotate image requests to be sent with the request object

The function setImageUri(); takes a Google Cloud Storage image location, or publicly-accessible image URL. Alternatively you can use setImage(); which takes a base64 encoded image string.

You can set as many features as are available to the annotateImageRequest by calling the setFeature(); function on the annotateImageRequest which takes any of the following enum parameters ; TYPE_UNSPECIFIED, FACE_DETECTION, LANDMARK_DETECTION, LOGO_DETECTION, LABEL_DETECTION, TEXT_DETECTION, DOCUMENT_TEXT_DETECTION, SAFE_SEARCH_DETECTION, IMAGE_PROPERTIES, CROP_HINTS, WEB_DETECTION.

Optionally, you can set the image context for each annotateImageRequest object like so

$annotateImageRequest1 = new AnnotateImageRequest()
$annotateImageRequest1->setImageContext();
$annotateImageRequest1->getImageContext()->setCropHintsParams([1.333]); //array
$annotateImageRequest1->getImageContext()->setWebDetectionParams(false);  //boolean
$annotateImageRequest1->getImageContext()->setLanguageHints([]); //array

Finally, the GoogleCloudVision request object takes an array of AnnotateImageRequest objects as the first parameter and the api key as the second parameter

Response object

If successful, you will receive a json object response in the format below;

{
  "responses": [
    {
      object(AnnotateImageResponse)
    }
  ]
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].