搜索插件、代码仓与 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 进行高级图像分析。它支持图像标记、人脸和地标检测、logo 识别、光学字符识别(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 项

源码仓库

使用此插件的项目

暂无相关数据。