Skip to main content

Minimum version of query s3 by label

Project description

queryS3 API

Introduction

This API enable users to query images from AI Testing database, currently implementing on AWS S3, with natural English description. A string of keywords also works if users want to put more restrictions onto the picture. The main functionality of this API can be treated in a blackbox manner. That it takes is a string of description and returns a list of S3 object URL of the images.

Dependencies

- nltk: Natural Language Toolkit github link

- pandas: powerful Python data analysis toolkit github link

Installation

pip install queryS3

Example usage

from queryS3 import QS3

qs = QS3.QS3()

# this line will retrieve all images that have single husky
# the return type will be a python list
qs.query('single husky')

API details

QS.query(in_q: str): -> List[str]: "query" is a function in the class QS. It takes a english description(or a string of keywords needed) as input and returns a list of S3 object URL strings

QS.set_label_list(self, label_list: List[str]): This function will replace the original label list in the database with a new list of labels only for this object instance of QS. By doing so, the whole "extract label from description" and "label matching search" process will then based on the new set of labels. Duplicated labels will be removed.

QS.add_label_list(self, label_list: List[str]): This function will append the label list with the newly added list. Duplicated labels will be removed.

Author

Qiao Liu , Everette Li

Copyright

Copyright © 2020, The AITestResourceLibrary Authority. Released under the MIT License.

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

queryS3-0.0.22.tar.gz (3.9 kB view hashes)

Uploaded Source

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