Giter Site home page Giter Site logo

smart-photo-album's Introduction

Smart Photo Album

(My Youtube Video Demo) https://www.youtube.com/watch?v=xSYp1JsPXb8

Architecture Diagram

image-20200803040143058

Introduction

This event-driven serverless Smart Photo Album allows users to upload photos to their album, and also search for photos using natural language through either voice. My implementation enables intelligent search layer to query users' searching (people, animals, objects, actions, landmarks, etc.).

This project involves a lot of AWS micro-service components such as Amazon LEX (for natural lanaguage queries processing), Amazon Virtual Private Cloud (VPC), Amazon Rekognition, ElasticSearch Services, Amazon Transcribe, Amazon Lambda backend functions, etc. This project orchestrates all these components to stand up the entire web app.



This is what my front-end looks like

It has 2 major components:

  1. uploading a photo to my AWS S3 photo-gallery-bucket

  2. searching for photos with user-defined criteria

image-20200519015133107




I have defined my APIs on a YAML file, which then can be imported onto AWS API Gateway to modify or fine tune what other settings need to be done there

image-20200519015434631


After deploying the API (note that I have enabled CORS on AWS API Gateway for cross-domain interactions), the API is ready to use.




An interesting part about this project is that I have hosted everything onto my Virtual Private Cloud (VPC) for better monitoring, access and control

image-20200519015541663


In order to enable AWS cross-services and public-to-private interactions, I need to create a few subnets

image-20200519015709157


In addition, to enable some services to run inside my VPC, I need to open up a few endpoitns. Note that I have added AWS Rekognition because I need to use this powerful services to operate AI analysis on any photo I upload and label the photo with some features that it carries

image-20200519015901553


Also, a few other components need to be updated in order to have a more well-defined VPC used for my project, including route tables, internet gateways, NAT gateways, ACLs, etc.

image-20200519020037236




For searching for photos, a very friendly service AWS provides is ElasticSearch Services (ES). Since I have my VPC ready, it's better to host my ES thereimage-20200519020140259




To upload a photo to my AWS S3 photo gallery, I can randomly pick anything to upload

image-20200519020422315


I have set a S3 bucket PUT trigger, which waits for any photo uploads to the bucket and then trigger my lambda function, which uses AWS Rekogniton to label my picture

image-20200519020548040

image-20200519020532186


Apparently, the labels that AWS Rekognition that my lambda function invokes for my microwave picture are something like: Appliance, Oven, Microwave

image-20200519020705179




In order to search for photos, simply type or speak (yes, I have also incorporated voice input here) the utterances for AWS Lex to pick up, and extract the keywords that match the labels as my ElasticSearch index to search for the photos.

Particularly, Amazon Lex first extract the keywords from input utterances, and invoke my search-lambda-function

image-20200519021151411


My lambda function uses the extracted labels, send the request to my ElasticSearch Services with these labels as indices, and fetch photos from after my AWS S3 photo-gallery

(Note that I have set quite a few utterances sample for training AWS Lex to learn some possible input types in order to extract the keyword, such as "cat" and "dog" provided with the input "show me cat and dog")

image-20200519020913177



After all the paths from here to there, some nice pictures with the matched labeled fetched by my search-lambda-function will be pushed onto my backend, which then hands over to my frontEnd to present

image-20200519020816640




Finally, in order to stand up the entire projects, I have deployed and pipelined each components of this project onto AWS Cloudformation so that with a template, well defined lambda backend codes, and beautifuly crafted frontend codes, such project can be easily replicated

image-20200519021609708

smart-photo-album's People

Contributors

tommy1220 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.