Skip to main content

CLI for ML Pipeline

Project description

Recognizes

This CLI allows you to upload files to the ML Pipeline and query results.

First Steps

You first need to make sure that you have the requirements needed to install the CLI as well as install the CLI itself.

Make sure that you have python and pip installed. It is recommended that you use a virtual environment although not a requirement.

Then to install the CLI run the following command in your shell:

pip install recognize

Usage

After installing the CLI run the following command:

recognize --help

This should show you a list of all the available commands with a short description of what they do. You can append the --help option to each command for more details about the command. For example:

recognize upload --help

This should give you a list of all the subcommands for this command, the options, and the order in which to write them.

Examples

To upload a directory of videos, accepted file types are mp4 and mov:

recognize upload directory path/to/directory/of/videos --tag some_custom_tag

The tag is useful for if you want to organise the uploads. You can search for labels associated with the tag and you can upload files using this tag at a later stage, and they will be automatically grouped.

After uploading videos it will take a few minutes to process them all. After which you can start querying.

recognize search keywords --output results.csv some interesting words

The --output argument is optional, if ommited you will be asked what to name the output interactively instead.

You can also search for specific entry types returned by AWS Rekognition. For example to which resources might have potentially harmful, violent, or offensive content run the following command:

recognize search entries --output results.csv moderation

Finally, to search for a particular face run the following command, accepted file types are png and jpeg:

recognize search faces --output results.csv file/path/to/image/of/face

Results

For keyword and entry search the columns in the csv (or keys in the records for the json output) will be:

Column Description
id The unique identifier for the entry.
average_confidence The average confidence score.
confidences The list of confidence scores.
entry_type The type of entry. Either label, alias, category, parent, moderation.
name The value associated with the entry.
timestamps The timestamps related to the entry.
url The S3 bucket URL of the associated video.
tag The tag related to the entry.

The faces search will have the following columns (or keys):

Column Description
faceId The unique identifier for the face.
imageId The unique identifier for the image.
externalImageId The path to the resource in the S3 bucket with metadata.
similarity The similarity of the face to the input image.
searchedFaceConfidence Confidence in whether a face was detected in the input.
timestamp The timestamp of the face. In milliseconds.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recognize-0.1.21.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

recognize-0.1.21-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file recognize-0.1.21.tar.gz.

File metadata

  • Download URL: recognize-0.1.21.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.16 Darwin/21.6.0

File hashes

Hashes for recognize-0.1.21.tar.gz
Algorithm Hash digest
SHA256 1753151f613cd8c6567c2bbdb6263ed51f7aba721d7bb33ff786e9cab4304659
MD5 6aa13f8ce74896f858cac30149c75b2f
BLAKE2b-256 52d6b6ee7cfc6af251be0fe80182f44fd9f0121ca65f64770859a18aefb1933c

See more details on using hashes here.

File details

Details for the file recognize-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: recognize-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.16 Darwin/21.6.0

File hashes

Hashes for recognize-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 d503c2c632fac432a59bdb3a2ffcf1e677db363c11145750f64927976a9d56f9
MD5 8bb36ef958686dbea8dd20c2f8f4c313
BLAKE2b-256 bb81a0ce2467af22ba4df43e9b8bca12d5921b44506895b6a7038978218fa93a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page