google_vision 2.2.0 copy "google_vision: ^2.2.0" to clipboard
google_vision: ^2.2.0 copied to clipboard

Allows you to add Google Visions image labeling, face, logo, and landmark detection, OCR, and detection of explicit content, into cross platform applications.

example/example.dart

import 'package:google_vision/google_vision.dart';
import 'package:universal_io/io.dart';

void main() async {
  final googleVision = await GoogleVision().withJwt(
    File('service_credentials.json').readAsStringSync(),
  );

  final requests = [
    AnnotateImageRequest(
      // You may want to crop or shrink the image to the area of interest to
      // safe bandwidth/upload time, but that's optional.
      jsonImage: JsonImage.fromGsUri(
        'gs://gvision-demo/young-man-smiling-and-thumbs-up.jpg',
      ),
      features: [
        Feature(maxResults: 10, type: AnnotationType.faceDetection),
        Feature(maxResults: 10, type: AnnotationType.objectLocalization),
      ],
    ),
  ];

  print('checking...');

  final annotatedResponses = await googleVision.image.annotate(
    requests: requests,
  );

  print(annotatedResponses.responses.first.annotations);
}
45
likes
160
points
253
downloads

Documentation

API reference

Publisher

verified publishercdavis.ca

Weekly Downloads

Allows you to add Google Visions image labeling, face, logo, and landmark detection, OCR, and detection of explicit content, into cross platform applications.

Homepage
Repository (GitHub)
View/report issues

Topics

#api #image #document

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

collection, crypto_keys, dio, flutter_loggy_dio, http, image, jose, json_annotation, loggy, mime, retrofit, universal_platform

More

Packages that depend on google_vision