-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Rekognition Integration #245
Comments
Hi @mickeypash, thanks for your interest in taking this on! This is a good impetus to start laying out some guides for developers, so I'll use this issue as an opportunity to provide a fairly detailed overview, and will then work this up into a full doc section at some point. Feel free to ask questions if anything's unclear. In general, we've tried to ease the pain of writing new class MyNewExtractor(ImageExtractor):
def _extract(self, stim):
# Must return an instance of class ExtractorResult!
... There's a pre-defined hierarchy of For Note that the transformation method (i.e., Beyond these minimal requirements, there are a bunch of other conventions and utilities you can take advantage of to minimize work. For example: class MyNewAPIExtractor(ImageExtractor):
_log_attributes = ('param1', 'param2')
_env_keys = (EXAMPLE_API_PARAM1, EXAMPLE_API_PARAM2)
_version = '0.1'
_batch_size = 100
def __init__(self, param1, param2):
self.param1 = param1
self.param2 = param2
def _extract(self, stim):
# Must return an instance of class ExtractorResult!
... The class attributes do some useful stuff for you (and also for the user):
In addition to the transformation logic itself, you're also encouraged to implement a Aside from that, it's really up to you how you want to implement support for Rekognition (or for any other service). Some general tips/suggestions:
I'm probably forgetting things, but that's what comes to mind. Feel free to ask questions or bring up issues here as you run into them. Thanks!! |
On further inspection, I think this issue can be broken up into several steps. The Rekognition API supports a number of services that don't require S3. In boto3's Rekognition client, these include all of the Beyond those detection methods, we start to get into functionality that requires S3 support. The next step would probably be to extend the extractors created in the above step to accept S3 inputs. The easiest way to handle this would be to let the user just pass in their S3 credentials and bucket information either at Beyond that, we get into video-extraction territory. Here things get even more complex, because these extractors are asynchronous, so, as with the Google Cloud Video Intelligence services, we need to wait for the request to complete. Many of the video-based tools have the further complication that they work with collections stored on S3 (e.g., extracting faces from a video as they're encountered, so that they can be detected and tracked later on). So then we need to not only create collections, but pass them to the extractors as needed, and then, once completed, process the results into a form we can eventually return in |
The text was updated successfully, but these errors were encountered: