SlideShare a Scribd company logo
1 of 4
Download to read offline
Proposal for a Machine Learning Application
Use Case: Classify Agricultural fields based on crops from images
Infrastructure of choice: Amazon Web Services
Training Data Acquisition:
For an effective machine learning model, we need a significant number of images of different fields,
growing various variety of crops. The best cost-effective way would be to build a web crawler
application in Python, which searches for images on google, or image websites and downloads images
based on individual classes of crops that we have identified. The problem with this is web crawled
images are often inaccurate and from a sample of what I have seen for agricultural fields most of the
images are difficult to tell, what crops they are growing. Hence there can be two possible work-arounds
– buy labelled dataset from 3rd
party – image brokers or universities or crawl and collect the image or
use services like AWS Sagemaker Groundtruth to label them. AWS Groundtruth provides human labelled
image tagging service at $0.012 per image per labeler. So, if we roughly gather 50000 images, the cost to
label them would be = $600
The labelled images are stored in an AWS S3 bucket which is a file-based object store provided by S3.
The web crawler can be hosted on an AWS EC2 instance.
Model Development:
Now that we have the labelled image dataset in S3 bucket, we can use AWS SageMaker Notebook to
train our models. Now for Image classification we should be using a Deep Learning with Convolutional
Neural Network. There are standard Sagemaker Image Classification algorithms (RestNet) which can be
used in our case. If pre-built algorithms are used, Sagemaker will fetch pre-built Image Classifier docker
container from EC2 Container Registry from the particular region. We can set the training instance
configurations, the number of instances – single or distributed. We can tune the model as required by
setting the model hyperparameters. Once satisfactory model is produced, we can validate the model
with a small number of validation images, separately kept aside to check the validity.
Instead of using standard AWS Image classification algorithms, we can use our own models, separately
creating docker images and uploading them to EC2 Container Registry, and use them in SageMaker.
If we use a GPU Instance for example - p2.xlarge costs around $1.26 /Hour
Assuming an approximate speed of 20 images/second ~ 45 min for each training run ~ $1
Model Deployment in Production:
Once the model is ready, the Sagemaker API for deployment can be called within the development
notebook, mentioning the number of instances, the type of instances and along with that a Sagemaker
HTTPS endpoint is also created. This endpoint can be invoked to use the model for prediction purposes.
In our case the model deployment will be for On-demand Real time inference. Taking two moderately
powerful instances m5.2xlarge will cost
2 x $0.538/Hr x 24 Hrs x 30 Days ~ $775/ month
Frontend – Serving Prediction to Client
Now when our HTTPS endpoint from Sagemaker is ready, we can invoke the same from a web
application and the users can interact with the model. For doing the same we will develop our data
transformations and code for invocation in a local virtual environment. Once completed this can be
deployed in AWS Lambda using command line tool Zappa. This will create an API Gateway Endpoint
attached to the Lambda Function. This API Endpoint Gateway can be used to POST data from User Web
or Mobile application. Once the request is posted with input data, the lambda function will be triggered
and SageMaker endpoint invoked. Sagemaker model will return the classification data based on the
pixels passed.
Web Browser/
Mobile Application API Gateway Lambda Sagemaker Endpoint
Now since we are dealing with image here, there can be multiple options where to convert the image
data into vectorized format. This can be done locally in the client application or the image/images can
be uploaded in a S3 bucket itself, and at a later stage another lambda function could be invoked to do
the transformation. Anothet case could be we can build such a Inference Docker image, where we just
need to pass the image URL and it will return the classification.
Costwise AWS Lambda is really economical : 1 million free requests a month , $0.20 per 1 million
requests thereafter which is quite negligible.
Similar is the case witl API Gateway, 1 million API calls free, negligible rate thereafter.
Data Curation:
Now that our model is running in an interactive mode, we have to make sure that we are not incurring
extra cost from the 50,000 images in training dataset. S3 is in any case quite in-expensive storage,
assuming 1MB as an avergage image size, 50GB of data should’nt incurr more than $2 a month.
However, if there are more images and the storage cost increases, images can be archived from AWS S3
High Availability storage to AWS Glacier, using the Lifecycle settings. For example we can configure, after
7 days move all the images into archive.
Thus to summarize lets look at the model on a whole:
Lambda Invocation
Web Browser/ API Gateway
Mobile Application
Temporary S3 Bucket
Web Crawler
Few Additional Points :
1. Multiple SageMaker Instances can be configured to feed to a single HTTPS endpoint. This can be
used as a Load Balancer to divert network traffic in an uniform way
2. What have been described here is a simple deployment. Often Machine Learning models get
updated and there can be requirements to do a trial run or a A/B testing or decomission the old
model and replace this with new one. The best way to do this is configuring the Sagemaker
Endpoint to shift partial traffic on the new model deployed in new instance. Once the trials are
successful, full traffic can be diverted, or distributed accordingly.
Conclusion: The proposed architecture uses AWS Services for convenience, cost-effectiveness and high
availability. This minimizes manual intervention and maintenance of infrastructure. There are several
alternatives to this approach. This would largely depend on complexity of requirements, compliance and
budget.
A
AWS Ground Truth
Referrences:
1. https://aws.amazon.com/blogs/machine-learning/build-a-serverless-frontend-for-an-amazon-
sagemaker-endpoint/
2. https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-hosting.html
3. https://medium.com/@julsimon/mastering-the-mystical-art-of-model-deployment-
c0cafe011175
4. https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-
using-amazon-api-gateway-and-aws-lambda/

More Related Content

What's hot

Optimize Content Processing in the Cloud with GPU and Spot Instances
Optimize Content Processing in the Cloud with GPU and Spot InstancesOptimize Content Processing in the Cloud with GPU and Spot Instances
Optimize Content Processing in the Cloud with GPU and Spot InstancesAmazon Web Services
 
Get Value from Your Data
Get Value from Your DataGet Value from Your Data
Get Value from Your DataDanilo Poccia
 
AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...
AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...
AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...Edureka!
 
Amazon Elastic Block Storage and Balancer
Amazon Elastic Block Storage and BalancerAmazon Elastic Block Storage and Balancer
Amazon Elastic Block Storage and BalancerWhizlabs
 
How to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda RuntimeHow to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda RuntimeDonnie Prakoso
 
ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012
ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012
ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012Amazon Web Services
 
Workshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWSWorkshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWSAmazon Web Services
 
Cloudwatch - The In's and Out's
Cloudwatch - The In's and Out'sCloudwatch - The In's and Out's
Cloudwatch - The In's and Out'sbeaknit
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps_Fest
 
Hands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake AnalyticsHands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake AnalyticsAmazon Web Services
 
Building prediction models with Amazon Redshift and Amazon Machine Learning -...
Building prediction models with Amazon Redshift and Amazon Machine Learning -...Building prediction models with Amazon Redshift and Amazon Machine Learning -...
Building prediction models with Amazon Redshift and Amazon Machine Learning -...Amazon Web Services
 
Understand AWS Pricing
Understand AWS PricingUnderstand AWS Pricing
Understand AWS PricingLynn Langit
 
(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR
(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR
(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMRAmazon Web Services
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda FundamentalsPiyush Agrawal
 
Amazon Batch: 實現簡單且有效率的批次運算
Amazon Batch: 實現簡單且有效率的批次運算Amazon Batch: 實現簡單且有效率的批次運算
Amazon Batch: 實現簡單且有效率的批次運算Amazon Web Services
 
Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Varun Torka
 

What's hot (20)

AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Optimize Content Processing in the Cloud with GPU and Spot Instances
Optimize Content Processing in the Cloud with GPU and Spot InstancesOptimize Content Processing in the Cloud with GPU and Spot Instances
Optimize Content Processing in the Cloud with GPU and Spot Instances
 
Get Value from Your Data
Get Value from Your DataGet Value from Your Data
Get Value from Your Data
 
AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...
AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...
AWS Data Pipeline Tutorial | AWS Tutorial For Beginners | AWS Certification T...
 
Amazon Elastic Block Storage and Balancer
Amazon Elastic Block Storage and BalancerAmazon Elastic Block Storage and Balancer
Amazon Elastic Block Storage and Balancer
 
AWS CloudWatch
AWS CloudWatchAWS CloudWatch
AWS CloudWatch
 
How to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda RuntimeHow to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda Runtime
 
ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012
ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012
ARC303 Dissecting and Internet-Scale Application - AWS re: Invent 2012
 
Workshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWSWorkshop: Building a Streaming Data Platform on AWS
Workshop: Building a Streaming Data Platform on AWS
 
Cloudwatch - The In's and Out's
Cloudwatch - The In's and Out'sCloudwatch - The In's and Out's
Cloudwatch - The In's and Out's
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
 
AMAZON CLOUD Course Content
AMAZON CLOUD Course ContentAMAZON CLOUD Course Content
AMAZON CLOUD Course Content
 
Hands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake AnalyticsHands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake Analytics
 
Building prediction models with Amazon Redshift and Amazon Machine Learning -...
Building prediction models with Amazon Redshift and Amazon Machine Learning -...Building prediction models with Amazon Redshift and Amazon Machine Learning -...
Building prediction models with Amazon Redshift and Amazon Machine Learning -...
 
Understand AWS Pricing
Understand AWS PricingUnderstand AWS Pricing
Understand AWS Pricing
 
AWS Big Data Landscape
AWS Big Data LandscapeAWS Big Data Landscape
AWS Big Data Landscape
 
(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR
(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR
(SEC403) Diving into AWS CloudTrail Events w/ Apache Spark on EMR
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda Fundamentals
 
Amazon Batch: 實現簡單且有效率的批次運算
Amazon Batch: 實現簡單且有效率的批次運算Amazon Batch: 實現簡單且有效率的批次運算
Amazon Batch: 實現簡單且有效率的批次運算
 
Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)
 

Similar to Machine Learning Use Case - Agriculture

Machine Learning Model as API with AWS Serverless- Loves Cloud
Machine Learning Model as API with AWS Serverless- Loves CloudMachine Learning Model as API with AWS Serverless- Loves Cloud
Machine Learning Model as API with AWS Serverless- Loves CloudLoves Cloud
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Wordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWSWordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWSLe Kien Truc
 
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDeploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDatabricks
 
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SCGIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SCJim Tochterman
 
Exploring Cloud Computing with Amazon Web Services (AWS)
Exploring Cloud Computing with Amazon Web Services (AWS)Exploring Cloud Computing with Amazon Web Services (AWS)
Exploring Cloud Computing with Amazon Web Services (AWS)Kalema Edgar
 
AWS Customer Presentation - family builder
AWS Customer Presentation -  family builderAWS Customer Presentation -  family builder
AWS Customer Presentation - family builderAmazon Web Services
 
Google cloud Professional Data Engineer practice exam test 2020
Google cloud Professional Data Engineer practice exam test 2020Google cloud Professional Data Engineer practice exam test 2020
Google cloud Professional Data Engineer practice exam test 2020SkillCertProExams
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyRobert Dempsey
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIVijayananda Mohire
 
Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...
Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...
Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...Amazon Web Services
 
Fowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopFowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopMark Masterson
 
Building and scaling a B2D service, the bootstrap way
Building and scaling a B2D service, the bootstrap wayBuilding and scaling a B2D service, the bootstrap way
Building and scaling a B2D service, the bootstrap wayNadav Soferman
 
Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)IRJET Journal
 
predictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdf
predictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdfpredictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdf
predictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdfssuser2a55d11
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computingwebscale
 
Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020SkillCertProExams
 
Train, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning modelTrain, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning modelCloudera Japan
 
Rails in the Cloud
Rails in the CloudRails in the Cloud
Rails in the Cloudiwarshak
 

Similar to Machine Learning Use Case - Agriculture (20)

Machine Learning Model as API with AWS Serverless- Loves Cloud
Machine Learning Model as API with AWS Serverless- Loves CloudMachine Learning Model as API with AWS Serverless- Loves Cloud
Machine Learning Model as API with AWS Serverless- Loves Cloud
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Wordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWSWordpress site scaling architecture on cloud infrastructure with AWS
Wordpress site scaling architecture on cloud infrastructure with AWS
 
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDeploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
 
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SCGIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
 
Exploring Cloud Computing with Amazon Web Services (AWS)
Exploring Cloud Computing with Amazon Web Services (AWS)Exploring Cloud Computing with Amazon Web Services (AWS)
Exploring Cloud Computing with Amazon Web Services (AWS)
 
AWS Customer Presentation - family builder
AWS Customer Presentation -  family builderAWS Customer Presentation -  family builder
AWS Customer Presentation - family builder
 
Google cloud Professional Data Engineer practice exam test 2020
Google cloud Professional Data Engineer practice exam test 2020Google cloud Professional Data Engineer practice exam test 2020
Google cloud Professional Data Engineer practice exam test 2020
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with Ruby
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AI
 
Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...
Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...
Build, Deploy, and Serve Machine-Learning Models on Streaming Data Using Amaz...
 
Fowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopFowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing Workshop
 
Aws coi7
Aws coi7Aws coi7
Aws coi7
 
Building and scaling a B2D service, the bootstrap way
Building and scaling a B2D service, the bootstrap wayBuilding and scaling a B2D service, the bootstrap way
Building and scaling a B2D service, the bootstrap way
 
Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)
 
predictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdf
predictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdfpredictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdf
predictive-data-science-with-amazon-sagemaker-and-a-data-lake-on-aws.pdf
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020
 
Train, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning modelTrain, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning model
 
Rails in the Cloud
Rails in the CloudRails in the Cloud
Rails in the Cloud
 

Recently uploaded

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...amitlee9823
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 

Recently uploaded (20)

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 

Machine Learning Use Case - Agriculture

  • 1. Proposal for a Machine Learning Application Use Case: Classify Agricultural fields based on crops from images Infrastructure of choice: Amazon Web Services Training Data Acquisition: For an effective machine learning model, we need a significant number of images of different fields, growing various variety of crops. The best cost-effective way would be to build a web crawler application in Python, which searches for images on google, or image websites and downloads images based on individual classes of crops that we have identified. The problem with this is web crawled images are often inaccurate and from a sample of what I have seen for agricultural fields most of the images are difficult to tell, what crops they are growing. Hence there can be two possible work-arounds – buy labelled dataset from 3rd party – image brokers or universities or crawl and collect the image or use services like AWS Sagemaker Groundtruth to label them. AWS Groundtruth provides human labelled image tagging service at $0.012 per image per labeler. So, if we roughly gather 50000 images, the cost to label them would be = $600 The labelled images are stored in an AWS S3 bucket which is a file-based object store provided by S3. The web crawler can be hosted on an AWS EC2 instance. Model Development: Now that we have the labelled image dataset in S3 bucket, we can use AWS SageMaker Notebook to train our models. Now for Image classification we should be using a Deep Learning with Convolutional Neural Network. There are standard Sagemaker Image Classification algorithms (RestNet) which can be used in our case. If pre-built algorithms are used, Sagemaker will fetch pre-built Image Classifier docker container from EC2 Container Registry from the particular region. We can set the training instance configurations, the number of instances – single or distributed. We can tune the model as required by setting the model hyperparameters. Once satisfactory model is produced, we can validate the model with a small number of validation images, separately kept aside to check the validity. Instead of using standard AWS Image classification algorithms, we can use our own models, separately creating docker images and uploading them to EC2 Container Registry, and use them in SageMaker. If we use a GPU Instance for example - p2.xlarge costs around $1.26 /Hour Assuming an approximate speed of 20 images/second ~ 45 min for each training run ~ $1 Model Deployment in Production: Once the model is ready, the Sagemaker API for deployment can be called within the development notebook, mentioning the number of instances, the type of instances and along with that a Sagemaker HTTPS endpoint is also created. This endpoint can be invoked to use the model for prediction purposes. In our case the model deployment will be for On-demand Real time inference. Taking two moderately powerful instances m5.2xlarge will cost 2 x $0.538/Hr x 24 Hrs x 30 Days ~ $775/ month Frontend – Serving Prediction to Client Now when our HTTPS endpoint from Sagemaker is ready, we can invoke the same from a web application and the users can interact with the model. For doing the same we will develop our data transformations and code for invocation in a local virtual environment. Once completed this can be deployed in AWS Lambda using command line tool Zappa. This will create an API Gateway Endpoint
  • 2. attached to the Lambda Function. This API Endpoint Gateway can be used to POST data from User Web or Mobile application. Once the request is posted with input data, the lambda function will be triggered and SageMaker endpoint invoked. Sagemaker model will return the classification data based on the pixels passed. Web Browser/ Mobile Application API Gateway Lambda Sagemaker Endpoint Now since we are dealing with image here, there can be multiple options where to convert the image data into vectorized format. This can be done locally in the client application or the image/images can be uploaded in a S3 bucket itself, and at a later stage another lambda function could be invoked to do the transformation. Anothet case could be we can build such a Inference Docker image, where we just need to pass the image URL and it will return the classification. Costwise AWS Lambda is really economical : 1 million free requests a month , $0.20 per 1 million requests thereafter which is quite negligible. Similar is the case witl API Gateway, 1 million API calls free, negligible rate thereafter. Data Curation: Now that our model is running in an interactive mode, we have to make sure that we are not incurring extra cost from the 50,000 images in training dataset. S3 is in any case quite in-expensive storage, assuming 1MB as an avergage image size, 50GB of data should’nt incurr more than $2 a month. However, if there are more images and the storage cost increases, images can be archived from AWS S3 High Availability storage to AWS Glacier, using the Lifecycle settings. For example we can configure, after 7 days move all the images into archive.
  • 3. Thus to summarize lets look at the model on a whole: Lambda Invocation Web Browser/ API Gateway Mobile Application Temporary S3 Bucket Web Crawler Few Additional Points : 1. Multiple SageMaker Instances can be configured to feed to a single HTTPS endpoint. This can be used as a Load Balancer to divert network traffic in an uniform way 2. What have been described here is a simple deployment. Often Machine Learning models get updated and there can be requirements to do a trial run or a A/B testing or decomission the old model and replace this with new one. The best way to do this is configuring the Sagemaker Endpoint to shift partial traffic on the new model deployed in new instance. Once the trials are successful, full traffic can be diverted, or distributed accordingly. Conclusion: The proposed architecture uses AWS Services for convenience, cost-effectiveness and high availability. This minimizes manual intervention and maintenance of infrastructure. There are several alternatives to this approach. This would largely depend on complexity of requirements, compliance and budget. A AWS Ground Truth
  • 4. Referrences: 1. https://aws.amazon.com/blogs/machine-learning/build-a-serverless-frontend-for-an-amazon- sagemaker-endpoint/ 2. https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-hosting.html 3. https://medium.com/@julsimon/mastering-the-mystical-art-of-model-deployment- c0cafe011175 4. https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint- using-amazon-api-gateway-and-aws-lambda/