承接 bobbyshaw/ibm-watson-visual-recognition 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bobbyshaw/ibm-watson-visual-recognition

Composer 安装命令:

composer require bobbyshaw/ibm-watson-visual-recognition

包简介

A PHP library to provide API calls & handle authentication with the IBM Watson Visual Recognition

README 文档

README

This PHP library provides integration with the IBM Watson Visual Recognition service.

See API documentation.

Scrutinizer Code Quality Code Coverage Build Status

Usage

The structure of this library was inspired by the Omnipay suite of packages.

One of the things that this means is the library doesn't hide away that fact that API requests are being made. For each API request, the request should be created with parameters passed in, sent and then response reviewed.

All requests are available via the Client.

use Bobbyshaw\WatsonVisualRecognition\Client;
use Bobbyshaw\WatsonVisualRecognition\Classifier;

$client = new Client();

The client should then be initialized with parameters, e.g. username and password (your IBM Watson Service credentials).

$client->initialize(['username' => 'abcdef', 'password' => '12356])

The following can be used find default parameters

$client->getDefaultParameters();

Each method matches an API request and returns a request object ready to be sent. Most of the time you'll want to send the request straight away.

$request = $client->getClassifiers();
$response = $request->send();

Each response has a class which helps to manage the response, e.g with the Classifier and Image classes.

/** @var Classifier[] $classifiers */
$classifiers = $response->getClassifiers();

Commands

The library also comes with a set of commands to use on the command line

Get Classifiers

php app/console classifiers:get [-d|--version-date="..."] username password

Classify Image(s)

php app/console classifiers:classify [-c|--classifiers="..."] [-d|--version-date="..."] username password images

Get Classifier Info

php app/console classifier:get [-d|--version-date="..."] username password classifier_id

Create/Train Classifier

php app/console classifier:create [-d|--version-date="..."] username password positive_examples negative_examples name

Delete Classifier

php app/console classifier:delete [-d|--version-date="..."] username password classifier_id

Testing

Run phpunit tests with:

vendor/bin/phpunit

This is also using grumphp to automatically check for PSR style formatting as well.

Test images are provided by Pixabay.

Documentation

PHPDocumentor is being used for creating library documentation. So make sure to add function comments

vendor/bin/

You may need to install graphViz on your machine if you don't already have it. This can be done on mac with homebrew

brew install graphviz

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-04-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固