retinal icon indicating copy to clipboard operation
retinal copied to clipboard

Feature: Add ability to do image feature extraction/object-detection using AWS Rekognition

Open adieuadieu opened this issue 8 years ago • 5 comments

Q: Should this be done in a new Lambda function or as part of the same/single lambda function? Q: Should this be a lambda function in a separate project?

  • [ ] add configuration to enable feature
  • [ ] Integrate AWS Rekognition API
  • [ ] add option to save to JSON in S3
  • [ ] add option to save to DB: DynamoDB (Add IAM, create table?)
  • [ ] add option to save to DB: MongoDB
  • [ ] add option to save to DB: MySQL-compatible (use something like Knex to support any SQL-like DB?)

Somewhat related to #21

adieuadieu avatar Feb 14 '17 07:02 adieuadieu

@adieuadieu are you still working on all the enhancements? Nice job btw.

superandrew213 avatar Mar 19 '17 13:03 superandrew213

@superandrew213 Thank you. Yes! What would you like to see? (or rather, what would you like to see first?) I have some basic Rekognition stuff ready, including integration into DynamoDB—but I want to refactor it a bit before I commit/push it. Also, I'm aiming to close #18 and release 1.0 before I finalise the Rekognition features.

adieuadieu avatar Mar 19 '17 15:03 adieuadieu

https://github.com/adieuadieu/serverless-sharp-image/issues/3 would be nice to have for completeness. Looking forward to try Rekognition.

superandrew213 avatar Mar 19 '17 23:03 superandrew213

This feels like it should be it's own Lambda function...

bluepeter avatar Mar 30 '17 03:03 bluepeter

@bluepeter yea; I think so to, for the most part. Definitely would follow the whole "microservices" architecture better. My main thought about why you might want it in the same lambda function has to do with performance/optimisation. E.g., say you have a 16MB image. Due to the AWS Recognition API limits of 15MB max image size, you'd have to resize the image. As two separate lambda functions, you'd be separately resizing the image twice, which, at scale, could result in nearly double the operating cost. One way to solve this would be to chain the two functions, perhaps with AWS Step Functions.. but because the resize function can output multiple resized images, or even otherwise manipulate the image, which resized photo should the second recoknition-lambda function use? In other words, I wonder what the best way is to tie the two functions together—or maybe not at all and if you have to resize twice.. tough luck?

adieuadieu avatar Apr 01 '17 03:04 adieuadieu