Democratization of Artificial Intelligence (AI) to Small Scale
Farmers: A Framework to Deploy AI Models to Tiny IoT Edges That
Operate in Constrained Environments
Chandrasekar Vuppalapati
1a
, Anitha Ilapakurti
1
, Sharat Kedari
1
, Jaya Vuppalapati
2
,
Santosh Kedari
2
and Raja Vuppalapati
1
1
Hanumayamma Innovations and Technologies, Inc., 628 Crescent, Fremont, U.S.A.
2
Hanumayamma Innovations and Technologies Private Limited, HIG-II, Hyderabad, India
Keywords: Edge, IoT Device, Artificial Intelligence, Kalman Filter, Dairy Cloud, Small Scale Farmers, Hardware
Constrained Model, Hanumayamma, Cow Necklace.
Abstract: Big Data surrounds us. Every minute, our smartphone collects huge amount of data from geolocations to next
clickable item on the ecommerce site. Data has become one of the most important commodities for the
individuals and companies. Nevertheless, this data revolution has not touched every economic sector,
especially rural economies, e.g., small farmers have been largely passed over the data revolution, in the
developing countries due to infrastructure and compute constrained environments. Not only this is a huge
missed opportunity for the big data companies, it is one of the significant obstacle in the path towards
sustainable food and a huge inhibitor closing economic disparities. The purpose of the paper is to develop a
framework to deploy artificial intelligence models in constrained compute environments that enable remote
rural areas and small farmers to join the data revolution and start contribution to the digital economy and
empowers the world through the data to create a sustainable food for our collective future.
1 INTRODUCTION
Artificial intelligence (AI) stands out as a
transformational technology of our digital age - and
its practical application throughout the economy is
growing apace (Chael et al., 2018). One of the chief
reasons why AI applications are getting prominence
and industry acceptance is in its software ability to
learn, albeit continuously, from real-world use and
experience, and its capability to improve its
performance(Chael et al., 2018). It is no wonder that
the applications of AI span from complex high-
technology equipment manufacturing to personalized
exclusive recommendations.
Nevertheless, this data has not touched every
economic sector, especially rural economies, e.g.,
small farmers have been largely passed over the
revolution, in the developing countries due to
infrastructure and compute constrained environments
even when AI is critical for food sustainability (Luiz,
2019).
a
https://orcid.org/0000-0003-2261-759X
In noting the promise and challenge of AI, the
McKinsey Global consulting Firm noted numerous
use cases across many domains where AI could be
applied and for these AI-enabled interventions to be
effectively applied, several barriers must be
overcome (James & Jacques, 2018). These include
the challenges of data, computing, and talent
availability, as well as more basic challenges of
access, infrastructure, and financial resources that are
particularly acute in remote or economically
challenged places and communities.
One chief reason, importantly, for AI not touched
every economic sector is the current AI algorithms
are only made to run on very powerful research
workstations without considering how they can be
used on real-world hardware, embedded constrained
hardware. Machine learning in embedded systems
specifically target embedded system to gather
data, process data, and apply mathematical rules to
produce insights (Van, 2019). The embedded systems
typically consists of low memory, low Ram, limited
power compared to regular computers. Increase in
652
Vuppalapati, C., Ilapakurti, A., Kedari, S., Vuppalapati, J., Kedari, S. and Vuppalapati, R.
Democratization of Artificial Intelligence (AI) to Small Scale Farmers: A Framework to Deploy AI Models to Tiny IoT Edges That Operate in Constrained Environments.
DOI: 10.5220/0009358706520657
In Proceedings of the 9th International Conference on Pattern Recognition Applications and Methods (ICPRAM 2020), pages 652-657
ISBN: 978-989-758-397-1; ISSN: 2184-4313
Copyright
c
2022 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
factors such as processing power (Devin, 2016) leads
to higher accuracies – the cost to bear is battery life.
To successfully disseminate AI to masses and
enable successful democratization, we need to bring
rural communities to digital revolution (people,
technology and data together) and the purpose of the
paper is to achieve such digital revolution. The paper
proposes AI deployment to Small Foot Print (Tiny)
IoT Edge device that operate in constrained device
and presents the data collected in real production
environment. Our goal is the achieve AI for all, a true
Fourth Industrial Revolution (ANDREW, 2019).
2 DEMOCRATIZATION OF AI
The democratization of AI is need of the day. The
current AI is more applicable for businesses and end-
consumers who are mostly city dwellers. Lack of data
that could potentially help local businesses and
societies are one of the most significant challenges in
AI adoption. One limiting challenge is the availability
of Data for social good use cases, especially in rural
communities. Lack of technologies, importantly, in
the hands of the users exacerbating the issue. For
instance, global penetration of Internet in rural areas
are very low compared to suburban and urban area
and this is persisting wider digital gap between rural
and urban area (ANDREW, 2019). Lack of internet
connectivity is causing inhibition of digital data
services dissemination, resulting into sparse vital
datasets capture for better governance purposes and
preventing rural population to participate in the
digital economy.
2.1 Waves of Compute
AI applications can be categorized into four waves of
Compute / AI (please see Fig 1. and Table 1) (Neil
and Michael, 2019) and with the 5G, the invent of
fifth wave is on horizon (Kai-Fu, 2018).
Figure 1: Waves of Computing.
Table 1: Waves of Compute & AI.
First Wave of
compute -
Mainframe
Characterized by processing of
Large Scale Social Media Analytics.
Use Cases include: click streaming,
personalization, exclusive
recommendations and notifications
to en
d
-user.
Second Wave of
compute –
client-server
Business AI developed during the
Second Wave. The algorithms were
trained on proprietary business
datasets and enabled business
analytics.
Third Wave of
compute –
Mobile
“Perception A.I.”— gets an upgrade
with eyes, ears, and myriad other
senses, collecting new data that was
never before captured, and using it
to create new a
pp
lications
Fourth Wave
compute – Core
IoT Ed
g
e
Autonomous AI start of
autonomous cars. IoT fuelled the
fourth wave.
Fifth Wave
(Simon, 2019)
5G Infused AI – the 5G network
provides speeds that AI requires.
2.2 Data
Small Farmers make big contribution to agriculture
and dairy production in developing countries (Devii,
2017). Unlike the dairy farms of the west, milk
originates in highly decentralized villages with the
help of small farmers who own three to five cattle and
they bring milk twice a day to milk collection centers
to get paid (Prahalad and Stuart, 1999). Simply put,
the livelihood of roughly 2 billion people (26.7% of
the world population) of small farmers in developing
world depend on agriculture and the climate change
adversely impacting their survival (see fig 2) (Robert,
2009).
Figure 2: Farmer Protest
Additionally, lack of data for serving these
farmers putting food sustainability and food security
in a huge risk mode.
Democratization of Artificial Intelligence (AI) to Small Scale Farmers: A Framework to Deploy AI Models to Tiny IoT Edges That Operate
in Constrained Environments
653
2.3 The Last Mile – Constrained
Compute Environments & “Ai
Chasm”
Fourth wave of compute has spurred the development
of Edge devices. Edge devices come in various forms
and shapes with varying compute capacities (Class 0,
Class 1 and Class2) (Bormann, Ersue and Keranen,
2014). Class 0 and Class 1 devices collect vast
amount of environmental & geolocation data on a
periodic basis. Due to constrained environments, the
class 0 devices require external devices such as
gateways & mobile phones to relay to the Internet.
However, these devices deployments for small farmer
is sporadic.
2.3.1 Class 0 Devices
Class 0 devices are very constrained sensor-like
motes. These devices are so severely constrained in
memory and processing capabilities that most likely
they will not have the resources required to
communicate directly with the Internet in a secure
manner.
In order to connect Class 0 devices to the Internet,
larger compute devices such as desktop workstations
or central nodes acting as proxies, gateways, or
servers are required at the site of Class 0 devices
deployment. For device management purposes, class
0 device could answer keep alive signals and send on/
off or basic health indications.
2.3.2 Class 1 Devices
Class 1 devices are quite constrained in code
execution space (Stack & Register Level) and
processing capabilities, such that they cannot easily
talk to other Internet nodes employing a full protocol
stack such as using Hyper Text Transport Protocol
(HTTP), Transport Layer Security (TLS), and related
security protocols and Extensible Markup Language
(XML)-based data representations(Bormann, Ersue
and Keranen, 2014). However, Class 1 devices are
capable enough to use a (Internet Protocol (IP) stack
specifically designed for constrained nodes (such as
the Constrained Application Protocol (CoAP) over
UDP [COAP]) and participate in meaningful
conversations without the help of a gateway node.
Therefore, they can be integrated as fully developed
peers into an IP network, but they need to be
parsimonious with state memory, code space, and
often power expenditure for protocol and application
usage (Ilapakurti et.al, 2017).
2.3.3 Class 2 Devices
Class 2 devices are less constrained and
fundamentally capable of supporting most of the
same protocol stacks as used on notebooks or servers.
However, even these devices can benefit from
lightweight and energy-efficient protocols and from
consuming less bandwidth. Examples of the devices
include Smartphones.
2.3.4 Constrained Device (Tiny IoT Edge)
Architecture
As shown in Fig.3, constrained devices are limited by
the compute power, memory, storage space, stack
space and work in limited infrastructure. In general,
the devices have a central microcontroller as a
processing unit with sensors tied to the device unit.
The Sensors collect data on time frequency
frequencies of collection would affect the battery
useful time.
Figure 3: Constrained Device Architecture.
2.4 Hardware in Constrained
Environment
Small Tiny Edge devices or Class By addressing
following challenges by private sector (see Fig 4),
purpose built hardware manufacturers, AI
developers, Cloud providers and local & national
governments, we can achieve AI for all, a true Fourth
Industrial Revolution (Sanjeev, 2018):
Infrastructure Conditions
Operating Environment
Device Characteristics
ICPRAM 2020 - 9th International Conference on Pattern Recognition Applications and Methods
654
Figure 4: Purpose Built Hardware vs. Constrained
Environment.
3 ML MODEL FRAMEWORK
We have deployed model as part of Cow Necklace.
The following hardware consists of Accelerometers,
Gyroscope, Temperature, Humidity and on-board
Bluetooth connectivity.
The Sensor module is built (see Fig 5) on working in
constrained environments (Kedari et al, 2017).
Figure 5: Mobile App.
The Cow Necklace sensor connects to mobile
(See Fig. 6) using Bluetooth Low Energy (BLE) and
uploads data to the Dairy Analytics Cloud.
The Machine Learning Model in constrained
environment is subjected to various constraints and
trade-offs (Jiawei et al, 2011).
Hardware to Model Accuracy
Model Accuracy to Connectivity
Connectivity to Hardware
Figure 6: Cow Necklace (Tiny IoT Edge) - PCB Board.
The Sensor collected data (see Figure 7):
Figure 7: Sensor Data.
Figure 8: Hardware-ML Model-Connectivity Framework.
The balance has to be drawn with respect to
applicability vs. model accuracy (see Fig 8). For
instance, if ML deployed model is active learner (e.g.,
K-means Cluster), the power consumption is taxed
very high as the algorithm dynamically allocates K
values. On the other hand, if deployed model is Lazy
learners, the model evaluation is based on the
memory resident stack space algorithm evaluation.
Here, the rules are in high-drive mode to execute the
model.
Democratization of Artificial Intelligence (AI) to Small Scale Farmers: A Framework to Deploy AI Models to Tiny IoT Edges That Operate
in Constrained Environments
655
3.1 Hardware-model Accuracy Table
(Constraint – Connectivity)
For evaluating various conditions that are subjected
to Hardware to Model Accuracy, holding
Connectivity, an infrastructure aspect, as a constraint
the following to be considered:
Model: Hardware vs. Model Accuracy
Constraint: Connectivity
The connectivity, which is infrastructure service,
could vary based on the geographical location:
Connectivity Options:
Wi-Fi
Manual (Bluetooth Low Energy)
No Connectivity
3.1.1 Constraint – Wi-Fi Connectivity
With Wi-Fi availability, the model could be updated
during the hardware refresh or via over the air (OTA)
(See Fig 9). With OTA, would provide more
flexibility as the latest model could be deployed.
Let us run through the different options:
Figure 9: Connectivity: Manual.
Over the Air Model Update
This option provides more flexibility as it has
influence on the model in-memory and storage
options (see Fig 10):
Hardware – Memory: Low
The most optimized & updated models could be
deployed on the Sensor
Hardware – Power: High
Since on-board Wi-Fi consumes considerable
power
Hardware – Storage: Low
Sensor collected data is posted to backend server
on a periodic basis
3.1.2 Constraint – Manual Connectivity
With manual connectivity, either Bluetooth Low
Energy, the Model execution and Hardware have
huge performance or tax penalties. Let us look
following cases:
Figure 10: Connectivity: Wi-Fi.
In this case, no OTA applicable as sensor is not
connected directly to the Internet. For Model update
during Hardware refresh, following are considered:
Hardware – Memory: High
High due to self-contained model with high
memory - host models (for historical & Outlier
detection)
Hardware – Battery: High
High to support in-memory & compute
operations
Hardware – Battery: Storage
Since no connectivity, the data collected to be
saved on
Hardware design consideration: Toggle of Sensor
ambient indicators (LEDs or Speaker) provide visual
clues & delivers insights.
3.1.3 Kalman Model Code
The following code predicts Kalman Temperature
(Rajaraman and Ullman, 2011):
# Formulas
def
TempPrediction(PreviousEstimate,currentMeasur
ement,PreviousErrorInEstimate):
ErrorInEstimate = 2
ErrorInMeasurement= 4
KalmanGain = ErrorInEstimate
/(ErrorInEstimate + ErrorInMeasurement)
CurrentEstimate = PreviousEstimate +
KalmanGain*(currentMeasurement -
PreviousEstimate)
# step2
ErrorInEstimate = (1-
KalmanGain)*(PreviousErrorInEstimate)
return CurrentEstimate,ErrorInEstimate
ICPRAM 2020 - 9th International Conference on Pattern Recognition Applications and Methods
656
4 CONCLUSIONS
Democratization of artificial intelligence is the need
of the day. It is our responsibility to develop models
and hardware equipment that enable the collection of
the data from the constrained environments so as to
model the AI for food sustainability and threats that
we face as humans – climate change. Finally, it is our
ardent believe that the data is our best defense and
the savior against the negative effects of climate
change. The sooner we embark on democratization
of AI to small farmers, the better we leave our
progeny a wonderful life on the earth, i.e., better than
what we have inherited.
ACKNOWLEDGEMENTS
We are very thankful to the management of
Hanumayamma Innovations and Technologies, Inc.,
for providing Sensor and Sensor data to publish as
part of the paper.
REFERENCES
Chael Chui, James Manyika, Mehdi Miremadi, Nicolaus
Henke, Rita Chung, Pieter Nel, and Sankalp Malhotra,
2018, Notes from the AI frontier: Applications and
value of deep learning, https://www.mckinsey.com/
featured-insights/artificial-intelligence/notes-from-the-
ai-frontier-applications-and-value-of-deep-learning .
Luiz Amaral - March 05, 2019, "The Data Revolution
Hasn't Yet Hit Agriculture", https://www.wri.org/blog/
2019/03/data-revolution-hasnt-yet-hit-agriculture
James Manyika and Jacques Bughin, OCT 2018, the
promise and challenge of the age of artificial
intelligence, https://www.mckinsey.com/featured-
insights/artificial-intelligence/the-promise-and-
challenge-of-the-age-of-artificial-intelligence
Van Ranst, W. Real World Applications of Artificial
Intelligence on Constrained Hardware. 2019. Web.
ANDREW PERRIN, May 2019, Digital gap between rural
and nonrural America persists, https://www.
pewresearch.org/fact-tank/2019/05/31/digital-gap-bet-
ween-rural-and-nonrural-america-persists/
Neil Sahota and Michael Ashley, Own the A.I. Revolution:
Unlock Your Artificial Intelligence Strategy to Disrupt
Your Competition, McGraw-Hill © 2019, ISBN-13:
978-1260458374
Kai-Fu Lee, October 22, 2018, The Four Waves of
A.I.,https://fortune.com/2018/10/22/artificial-
intelligence-ai-deep-learning-kai-fu-lee/
Devin Coldewey, November 21, 2016, “Overclocked
smartwatch sensor uses vibrations to sense gestures,
objects and locations”, https://techcrunch.com/
2016/11/21/overclocked-smartwatch-sensor-uses-
vibrations-to-sense-gestures-objects-and-locations/
Simon Segars, “The Fifth Wave of Computing Is Built on
AI, 5G and a Secure IoT”, April 17, 2019 , URL:
https://www.arm.com/blogs/blueprint/the-fifth-wave-
of-computing-ai-5g-iot, Access Date: Sep 18, 2019
Devii R. Rao, “Small Farmers Make Big Contributions:
Dairy Production in India”, Published on: February 7,
2017, URL: https://ucanr.edu/blogs/blogcore/
postdetail.cfm?postnum=23184
Robert T. Watson, “Industrial Agriculture and Small-scale
Farming”, Publish Date: 2009, URL:
https://www.globalagriculture.org/report-topics/
industrial-agriculture-and-small-scale-farming.html
Bormann, Ersue and Keranen, May 2014, “Terminology for
Constrained-Node Networks”, URL: https://tools.
ietf.org/html/rfc7228
Sanjeev Sharma, Nov 28, 2018, How AI can increase the
reach of India's public welfare programmes and make
them efficient, https://economictimes.indiatimes.com/
tech/software/how-ai-can-increase-the-reach-of-indias-
public-welfare-programmes-and-make-them-
efficient/articleshow/66841527.cms?from=mdr
C. K. Prahalad, Stuart L. Hart, 1999, Strategies for the
Bottom of the Pyramid: Creating Sustainable
Development, http://pdf.wri.org/2001summit_hart
article.pdf
Anitha Ilapakurti, Jaya Shankar Vuppalapati, Santosh
Kedari, Sharat Kedari, Chitanshu Chauhan,
Chandrasekar Vuppalapati. "iDispenser — Big Data
Enabled Intelligent Dispenser", 2017 IEEE Third
International Conference on Big Data Computing
Service and Applications (BigDataService), 2017
Santosh Kedari, Jaya Shankar Vuppalapati, Anitha
Ialapakurti, Sharat Kedari, Rajasekar Vuppalapati,
Chandrasekar Vuppalapati. "Chapter 99 Adaptive Edge
Analytics - A Framework to Improve Performance and
Prognostics Capabilities for Dairy IoT Sensor",
Springer Nature, 2018
Jiawei Han, Micheline Kamber and Jian Pei, Data Mining:
Concepts and Techniques, Morgan Kaufmann; 3
edition (July 6, 2011)
Anand Rajaraman and Jeffrey David Ullman, Mining of
Massive Datasets, Cambridge University Press
(December 30, 2011)
Democratization of Artificial Intelligence (AI) to Small Scale Farmers: A Framework to Deploy AI Models to Tiny IoT Edges That Operate
in Constrained Environments
657