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

Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...nirzagarg
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...Elaine Werffeli
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...gragchanchal546
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numberssuginr1
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Klinik kandungan
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...SOFTTECHHUB
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 

Recently uploaded (20)

Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 

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/