FarmX Introduction

FarmX is a mobile application-based solution designed to equip contemporary farmers with the necessary tools to make well-informed decisions regarding their agricultural practices. Offering an array of functionalities, including crop recommendation, precision agriculture, and crop disease detection, this innovative tool aims to enhance productivity while simultaneously mitigating the environmental footprint of farming practices. At its core, FarmX addresses some United Nations’ Sustainable Development Goals (SDGs): SDG 02 (Combats food insecurity), SDG 12 (Promotes regenerative agriculture), and SDG 13 (Conserves agricultural resources and reduces greenhouse gas emissions).

IMG-20240502-WA0053

The Team Behind FarmX

Our team consists of students who are well-versed in their respective tech niches. We have:

  1. Victor Olufemi: He is a machine learning engineer and obtained his BSc. Electronic and Electrical Engineering degree from Obafemi Awolowo University (OAU) in 2023.
  2. Oluwaseun Salako: He is a Flutter developer and final year student obtaining his BSc. Food Engineering from OAU in 2024.
  3. Idowu Festus: He is a web developer and final year student obtaining his BSc. Electronic and Electrical Engineering from OAU in 2024
  4. Lekan Adesina: He is a machine learning researcher and second-year student at OAU.

IMG-20240503-WA0004

What Inspired FarmX

Our inspiration for building FarmX comes from the fact that food loss and waste are major contributors to hunger and malnutrition, particularly in Sub-Saharan Africa (SSA) where we are. We believe that by providing farmers with A.I. tools, we can help to reduce food loss and waste, which will ultimately help to alleviate hunger and malnutrition.

1.3 billion tonnes of food lost or wasted each year affects every individual on the planet, particularly impacting nearly 828 million people who disproportionately experience hunger and malnutrition. Unfortunately, this rate of malnutrition, rather than slowing down, has been excruciatingly increasing over the years. Consequently, we are losing 25,000 lives to hunger every single day, according to the United Nations.

Food loss poses a widespread and persistent problem, mainly originating from deficiencies and flaws in food production and distribution systems. These deficiencies lead to the unfortunate disposal of surplus food, the expiration of edible items, and the abandonment of crops. Food loss is a complex and widespread problem that transcends geographical and developmental boundaries, affecting every stage of the food system from production to consumption. It is a universal issue, impacting both developed and developing countries with grave consequences for food security, resource conservation, and environmental sustainability.

In Sub-Saharan Africa (SSA), agriculture is often viewed as the 'poor man's job,' characterized by low productivity and inadequate returns. Smallholder farmers contribute to more than 80% of the total food production in this region, yet they face numerous challenges, including limited access to funding, machinery, and quality inputs. There is also the problem of crop pests, diseases, and weather variability which contribute to food loss for some, while market instability and price volatility add to the uncertainty faced by other farmers who manage to bring their crops to maturity. These barriers restrict their ability to enhance productivity, ultimately hindering their economic prospects, and contributing to high levels of poverty and hunger in the region.

FarmX

FarmX is tailored to the specific needs of smallholder farmers in SSA. The mobile app incorporates crop disease detection technology and goes one step further to provide recommendations for effective cures. The app is adapted to include multiple local languages which ensures accessibility for farmers with diverse linguistic backgrounds. It also provides personalized crop recommendations based on local soil and climate conditions to optimize yield potential.

Furthermore, it includes a marketplace feature that connects farmers directly with buyers, thus mitigating market instability and price volatility concerns. Additionally, our IoT (Internet of Things) technology enables precision agriculture, enhancing resource efficiency and productivity. The app incorporates a wiki-style platform and chatbot dedicated to regenerative farming practices, fostering knowledge-sharing and community-building among farmers.

We strongly believe that our solution has the potential to make a significant impact on food security and sustainable development in Africa, while also contributing to global efforts to address climate change.

FarmX Engineering

Our solution is built using a variety of tools, including Android, Google Cloud, Firebase, Flutter, Google Maps Platform, Kaggle, TensorFlow/Keras, Google Search, Google Colab, Google Translate, and Gemini APIs. The high-level components of our architecture implemented are:

  1. Backend APIs - Deployed as rest APIs: This manages API calls and runs on GCP as a microservice.
  2. Frontend/User interface - Android Application built with Flutter: This enables the user to interact with the services we want to provide. Hence giving the user a wonderful experience. FarmX AI and FarmX Wiki were built with NextJS and incorporated into Flutter
  3. Other Technologies - TensorFlow, MLT, search API, Arduino, TailwindCSS.
  4. Programming Languages - Flutter, Python, Dart, C++, JavaScript (NextJS)

FarmXGemini

The technical architecture of our solution is designed to support scalability and fallbacks. Gemini powers major functionalities in our app. For some of these functionalities, we have model fallbacks for them. Gemini powers the following:

  1. Crop Disease Detection: Gemini Vision with advanced prompt engineering helps to detect crop pests and diseases. With Gemini we are no longer limited by fixed label size in our Tflite model

  2. About Disease and Curing: Implementing a RAG-Architecture, Gemini reads results from the Google search engine and uses that to provide updated information about the latest curing strategies.

  3. Translating with Gemini: We also support some languages aside from English which Gemini can converse in.

  4. Chatbot: We created an agriculture chatbot fully powered by Gemini that helps farmers answer questions when they need farming help and the bot also teaches the farmer regenerative farming practices.

To conclude, our technical architecture is designed to be flexible, redundant, scalable, and can support a larger audience with minor changes. By using microservices, cloud-based technologies, Gemini, and efficient and scalable technologies like Flutter, we can easily scale our app to meet the needs of a growing user base.

Challenges we faced.

  • Prompt engineering the model wasn't so easy, we had to learn how to do that efficiently
  • Gemini has some edge-case prompt constraints which we've reported in the feedback, we had to get around that ourselves.
  • Putting guardrails around our chatbot to avoid answering out-of-scope questions was not also easy to control.

What We Learnt

Technical Learning: We deepened our understanding of various programming languages and frameworks, particularly honing our skills in Prompt engineering, Flutter, and utilizing libraries like TensorFlow for machine learning applications. Also, we rapidly learned a lot about Gemini as this was our first time building an application with it.

Collaboration and Team Dynamics: Effective communication and collaboration were pivotal to our success, as we seamlessly integrated individual contributions into cohesive project implementations. By leveraging each team’s unique strengths and expertise, we fostered an inclusive environment where everyone is totally and freely open to contribute their ideas and skills. And despite encountering occasional challenges in coordinating tasks and managing time constraints due to the different day-to-day schedules of each team member, we remained resilient and learned to be highly adaptable (especially to unforeseen events like power outage, poor internet connectivity, etc).

Problem Solving Skills: Deciding to participate in this hackathon was a big decision at the initial stage because we were not exposed to some technologies we later used in building our solution. But, thanks to the team’s rapid learning adaptability. Furthermore, we had to conduct several online night meetings through Google Meet to discuss and finalize the set of best and timely feasible features we will want to implement during the hackathon and those that will be implemented post-hackathon. Additionally, we experienced some complex technical challenges when integrating the AI components of FarmX into Flutter. But by patiently breaking down these problems into smaller pieces, we were able to detect the main causes of the problems and solve them.

Future Outlooks

  • Post hackathon, we have big plans for FarmX
  • Collaborate with farmers, extension agents, and agricultural organizations to refine and improve the app features based on more feedback cycles. Continuously improve and add new features to the app to keep up with the latest research and trends in agriculture and technology.
  • Partner with soil testing labs to provide more accurate and comprehensive soil analysis to farmers. This could help improve our recommender system, and help farmers farm more regeneratively.
  • Integrate other food waste and food loss mitigation strategies into the app to help farmers reduce waste and improve the sustainability of their operations.
  • Partner with carbon offset organizations to help farmers measure and reduce their carbon footprint.
  • Explore opportunities to expand the app's reach beyond traditional farming communities, to urban agriculture or community gardening initiatives. We plan to promote sustainable and regenerative agriculture practices in non-traditional settings.
  • Implement publicity campaign strategies to proliferate our marketplace for both farmers and buyers.
  • Improve financial transactions between both parties (within the same or different countries) using fintech technologies such as Blockchain solutions, to prevent fraudulent practices and other barriers.
  • Create interactive educational features, which are aimed at sensitizing people (especially children and youths) about the relevance of farming in the society and how they can contribute to the cause. 9) Implement robust data-safeguarding protocols and measures.

Built With

Share this project:

Updates