Intro to AWS AI Services: Textract, Comprehend, Rekognition
Tags: aws, ai, cloud
Published: 2022-09-25 16:03:13

Sharing these demos and compiled docs of AWS AI Services to help you visualize how these services work. These pre-built models will be beneficial for developers with no prior experience to machine learning as the models have been pre-trained. You will only need to call the API with the inputs to get the predicted results.

## Text & Documents
### Amazon Textract
Extract text from scanned documents using Optical Character Recognition (OCR).
#### Documents
Returns text, forms, tables and query responses.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ueuh5nsj0ambzv2o4spj.gif)

#### Expenses
Extracts data from invoices/receipts eg. vendor name, invoice/receipt date, invoice/receipt number, item name, item price, item quantity, total amount

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g31xbeoq220xn3fzfu7n.gif)

### Amazon Comprehend
Extract entities, key phrases, language, personal identifiable information (PII), and sentiments from text.
#### Entities
Extract entities from text documents eg. people, places, locations.

Using AWS Console:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmuc49n23narxoi4y1gr.png)
Using AWS API:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evr0sqonrlh6qjnfo4kt.png)

#### Key Phrases
Extract the key phrases (one or more words) from text documents.

Using AWS Console:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zy8brljktr2y7ea19wsg.png)
Using AWS API:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j7qdjvjbbp7vtpny4e8p.png)

#### Sentiment
Predict the overall sentiment of the text - positive, negative, neutral, mixed.

Using AWS Console:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xj9snwmuzefb9bct2ezv.png)

Using AWS API:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n5ilgw5djhaihtrl22qy.png)

#### Language
Predict the dominant language of the entire text. Amazon Comprehend can recognize 100 languages.

Using AWS Console:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxln6azfpjbd5z8o45y3.png)

Using AWS API:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxjukvhgyba9kvgg9f31.png)

#### Personally Identifiable Information (PII)
List out entities in your input text that contain personal information eg. address, bank account number, or phone number.

Using AWS Console:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/46ik6q0czbtzibn9h99w.png)

Using AWS API:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ct5sa1323aneb1gmkx4k.png)

## Vision
### Amazon Rekognition
Analyze images and videos to identify objects, people, text, scenes, and activities.
#### Label Detection
Extract labels of objects, concepts, scenes, and actions in your images.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ed9yezh7vwz4jo5bmdpl.gif)

#### Facial Analysis
Detect faces and retrieve facial attributes in an image eg. facial expressions, accessories, facial features, etc.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vhqulpx52nwyllwdr1ei.gif)

#### Face Comparison
Compare faces within a set of images with multiple faces in them. Compares the largest face in the source image (reference face) with up to 100 faces detected in the target image (comparison faces), and generate a similarity score.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1lvwr5h5ebh7jsa1zn11.gif)

## Sources:
* For other AWS AI services, refer to: 
https://aws.amazon.com/machine-learning/ai-services/
* https://docs.aws.amazon.com/rekognition/latest/dg/what-is.html
* https://docs.aws.amazon.com/comprehend/latest/dg/what-is.html

_Disclaimer: The opinions expressed here are my own and I'm not writing on behalf of AWS or Amazon._