GithubHelp home page GithubHelp logo

raumildhandhukia / cloud-based-image-recognition-service Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 224 KB

Cloud-Based Image Recognition Service using AWS (EC2, SQS, S3, Cloud Watch)

Python 100.00%

cloud-based-image-recognition-service's Introduction

IaaS - Cloud-Based Image Recognition Service

Our project is to develop a cloud-based image recognition service that leverages deep learning to classify and identify images provided by users. The service will be accessible to users via a web interface, and it will utilize cloud resources to perform the deep learning computations needed for image recognition.

This is an elastic application that can automatically scale out and in on-demand by leveraging the Infrastructure-as-a-Service (IaaS) resources from Amazon Web Services (AWS).

Installation

Install Unzip (If you do not have it installed)

sudo apt install unzip

Install AWS CLI

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Set Up the AWS (Add access key, secret, region and format)

aws configure

Install Dependencies

pip install -r requirements.txt

Run

Start Web-Tier

python3 server.py

Start App-Tier

python3 app/app.py

Now web server will be listening on http://127.0.0.1:3000/. It will take Image file as payload. Image will be stored on S3 Bucket and key of image will be sent to request-queue(SQS). App-Tier will continously processing images and sending output on response-queue(SQS). Web-Tier will fetch responses and return it to the client.

Auto-Start Services Of App-Tier Instances

Create .service file

sudo touch /etc/systemd/system/myservice.service

Edit .service file

sudo nano /etc/systemd/system/myservice.service

Copy this service file into the .service created and save the .service file (change the path according to your system)

[Unit]
Description=Run AppTier Service Each Time Server Starts Up
After=network.target

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/
ExecStart=/usr/bin/python3 /home/ubuntu/app.py
Restart=always

[Install]
WantedBy=multi-user.target

Reload the systemd daemon to read the new service file

sudo systemctl daemon-reload

Enable the service to start at boot time

sudo systemctl enable myservice.service

Start the service

sudo systemctl start myservice.service

AWS Resources

  • SQS Request Queue: request-queue

  • SQS Response Queue: response-queue

  • S3 Input Bucket: cse546-cc-autoscale-input-bucket

  • S3 Output Bucket: cse546-image-processing-op

  • EC2 Web-Tier: CC-ImageProcessing-Web

  • EC2 App-Tier: cc-image-processing-app-tier

Help

Web-Tier contains server.py, resources/s3.py, resources/sqs.py, resources/__init__.py

App-Tier contains app/app.py, app/image_classification.py, app/imagenet-labels.json, app/__init__.py, resources/s3.py, resources/sqs.py, resources/__init__.py

resouces folder is shared by Web-Tier and App-Tier. It contains basic operations related to S3 and SQS

requirements.txt is common for Web-Tier and App-Tier.

workload_generator.py and multithread_workload_generator.py are used to test the services.

cloud-based-image-recognition-service's People

Contributors

raumildhandhukia 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.