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 details)

Uploaded Source

File details

Details for the file queryS3-0.0.22.tar.gz.

File metadata

  • Download URL: queryS3-0.0.22.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for queryS3-0.0.22.tar.gz
Algorithm Hash digest
SHA256 026899b60de6535143e9925b4975ca98d6842b44d2389493292959679b699f75
MD5 1cfdee027072a6c160dc2af08ff72922
BLAKE2b-256 9117798abaf9b9a8f29af7756c706f2dd93b7554ff9aa1f4f6246cec31a4901b

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