搜尋套件、儲存庫與 APP 分類

套件詳情v2.2.1

google_vision

允許您將 Google Visions 圖像標籤、人臉、商標和地標檢測、OCR 以及敏感內容檢測功能加入跨平台應用程式中。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
306
喜歡數
46
Pub 分數
160

安裝套件

flutter pub add google_vision

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

google_vision 套件讓跨平台 Flutter 應用程式能利用 Google Cloud Vision API 進行進階影像分析。它支援影像標記、人臉與地標偵測、商標識別、光學字元辨識(OCR),以及敏感內容識別。透過與 Android、iOS、Web、macOS、Windows 及 Linux 的無縫整合,此套件賦予開發者建構能理解視覺內容的智慧應用程式的能力。該套件透過簡單的 Dart 界面簡化對強大機器學習模型的存取。

適用情境

  • 圖像內容審核
  • 自動文檔掃描
  • 視覺搜尋功能
  • 使用者產生內容分析
  • 應用中的面部和物件識別
  • 品牌標誌檢測

主要特色

  • 支援 OCR 文字提取
  • 檢測人臉、特徵點和商標
  • 識別明確或敏感內容
  • 跨平台相容性
  • 簡單 API 結合
  • 即時影像分析

適合對象

  • 需要圖像理解的應用程式
  • 開發人工智慧驅動工具的開發者
  • 內容平台需要審核
  • 文件處理應用
  • 具有視覺功能的移動和網路應用

使用建議

  • 需要 Google Cloud API 金鑰
  • 可能會產生使用費用
  • 依賴互聯網連接
  • 有限的離線功能
  • 速率限制適用
  • 影像資料的隱私考量

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Google Vision Workspace

Melos-managed Dart/Flutter monorepo for the Google Vision API.

pub package pub package

Packages

Package Description Pub
google_vision Core Dart REST client for image annotation, OCR, and document analysis pub
google_vision_cli CLI tool for running Vision API requests from the terminal pub
google_vision_flutter Flutter widget wrapping the core library pub

Features

  • Image Labeling — identify objects, locations, activities, and more
  • Face Detection — detect faces and facial attributes (emotion, headwear, etc.)
  • Logo Detection — recognize popular brand logos
  • Landmark Detection — identify natural and man-made landmarks
  • Optical Character Recognition (OCR) — extract text from images and documents
  • Safe Search — detect explicit content across multiple categories
  • Crop Hints — suggest optimal image crops
  • Web Detection — find matching images and pages on the web

Quick Start

Dart (core library)
import 'package:google_vision/google_vision.dart';

final googleVision = await GoogleVision.withApiKey('YOUR_API_KEY');
final response = await googleVision.image.labelDetection(
  jsonImage: JsonImage.fromPath('path/to/image.jpg'),
);
CLI
# Install via Homebrew
brew tap cdavis-code/google-vision
brew install vision

# Run landmark detection
vision detect --image-file photo.jpg --features LANDMARK_DETECTION
Flutter
GoogleVisionFlutter(
  apiKey: 'YOUR_API_KEY',
  imagePath: 'assets/photo.jpg',
  features: [FeatureType.labelDetection],
)

Authentication

The core library supports three auth strategies:

Method Use Case
withApiKey(key) Quick start, development
withJwt(credentialsJson) Service accounts, production
withGenerator(generator) Custom token refresh logic

Workspace Commands

This project uses Melos for monorepo management.

Action Command
Get dependencies melos run dep
Analyze melos run analyze
Format melos run format
Build (codegen) melos run build
Generate docs melos run doc
Pana score check melos run pana
Publish prep melos run prep

CI / CD

GitHub Actions workflows run on every push:

License

MIT

所屬分類

依賴

依賴清單 12 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。