Socket
Socket
Sign inDemoInstall

@aws-sdk/client-rekognition

Package Overview
Dependencies
Maintainers
5
Versions
403
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-rekognition

AWS SDK for JavaScript Rekognition Client for Node.js, Browser and React Native


Version published
Weekly downloads
401K
decreased by-0.81%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/client-rekognition?

@aws-sdk/client-rekognition is an AWS SDK for JavaScript package that provides a client for Amazon Rekognition, a service that makes it easy to add image and video analysis to your applications. The package allows you to perform a variety of tasks such as object detection, facial analysis, and text recognition.

What are @aws-sdk/client-rekognition's main functionalities?

Detecting Labels in an Image

This feature allows you to detect objects, scenes, and concepts in an image stored in an S3 bucket. The code sample demonstrates how to use the DetectLabelsCommand to get labels for an image.

const { RekognitionClient, DetectLabelsCommand } = require('@aws-sdk/client-rekognition');

const client = new RekognitionClient({ region: 'us-west-2' });
const params = {
  Image: {
    S3Object: {
      Bucket: 'example-bucket',
      Name: 'example.jpg'
    }
  },
  MaxLabels: 10
};

const run = async () => {
  try {
    const data = await client.send(new DetectLabelsCommand(params));
    console.log('Labels detected:', data.Labels);
  } catch (err) {
    console.error('Error:', err);
  }
};

run();

Facial Analysis

This feature allows you to analyze faces in an image to detect attributes such as age range, emotions, and facial landmarks. The code sample demonstrates how to use the DetectFacesCommand to get detailed facial analysis.

const { RekognitionClient, DetectFacesCommand } = require('@aws-sdk/client-rekognition');

const client = new RekognitionClient({ region: 'us-west-2' });
const params = {
  Image: {
    S3Object: {
      Bucket: 'example-bucket',
      Name: 'example.jpg'
    }
  },
  Attributes: ['ALL']
};

const run = async () => {
  try {
    const data = await client.send(new DetectFacesCommand(params));
    console.log('Face details:', data.FaceDetails);
  } catch (err) {
    console.error('Error:', err);
  }
};

run();

Text Detection in Images

This feature allows you to detect and recognize text within an image. The code sample demonstrates how to use the DetectTextCommand to extract text from an image stored in an S3 bucket.

const { RekognitionClient, DetectTextCommand } = require('@aws-sdk/client-rekognition');

const client = new RekognitionClient({ region: 'us-west-2' });
const params = {
  Image: {
    S3Object: {
      Bucket: 'example-bucket',
      Name: 'example.jpg'
    }
  }
};

const run = async () => {
  try {
    const data = await client.send(new DetectTextCommand(params));
    console.log('Detected text:', data.TextDetections);
  } catch (err) {
    console.error('Error:', err);
  }
};

run();

Other packages similar to @aws-sdk/client-rekognition

FAQs

Package last updated on 18 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc