Skip to content

LankaSmartFarm/CocoFusion

Repository files navigation

CocoFusion

Combining AI and IoT to Revolutionize Coconut Farming in Sri Lanka

Overview

CocoFusion is a platform-agnostic, open-source research and development project that combines Artificial Intelligence (AI) and the Internet of Things (IoT) to improve coconut farming practices in Sri Lanka. The goal is to fuse cutting-edge technology with traditional agriculture to help coconut farmers increase yields, use resources more efficiently, and make data-driven decisions in the field. By deploying smart sensors and AI models on coconut plantations, CocoFusion aims to provide farmers with real-time insights – from optimal irrigation scheduling to early pest detection – in a user-friendly way. Ultimately, the project seeks to boost sustainable coconut production in Sri Lanka while bridging the gap between IT and agriculture through collaborative innovation.

Current Project Team as of 20th April 2025

  • Research Team
    • @damithkothalawala - Cloud / IoT
  • Repo Management Team
    • @madurapa
  • PM Team
    • @lochana-d

We Are Looking For

  • AgriTech Doctors/Professor(s) – Research
  • IT Doctors/Professor(s) – Research
  • Volunteer Project Managers with GitHub Projects Experience
  • DPI/DPG Advisor to validate and set guidelines to align with Sri Lanka Standards
  • Agriculture Extension Officers with Coconut Field Experience
  • Soil Scientists specialised in tropical/humid climate conditions
  • IoT / Embedded Systems Engineers familiar with precision agriculture
  • Cloud Engineers / DevOps Experts for backend infrastructure
  • Data Scientists or Analysts with interest in agri-yield optimisation
  • Technical Writers to support multi-language documentation (Sinhala, Tamil, English)
  • Translators / Language Volunteers for accurate localisation
  • Agribusiness Consultants with knowledge of market linkages
  • University Students (Agriculture / IT) willing to contribute towards research and field validation
  • Open Source Contributors familiar with GitHub collaboration practices
  • Community Moderators to manage issue threads and discussions
  • Legal Advisors familiar with data licensing, open-source policies, and Sri Lankan research ethics

Please join the introduction thread to introduce yourself and share your work or interests.

🧑‍🌾 CocoFusion Project – Participant Directory (will be moved to a different location as a file later)

This section contains contributors who expressed interest in the CocoFusion initiative, their affiliations, and key expertise areas.

GitHub Username Affiliation Area of Interest
@isum03 University of Westminster
@roshanRishantha2004 Esoft Collage of Engineering and Technology (Pearson)
@sozibalmamun THT Space Electrical Company Ltd. IoT and embedded Systems
@HirushaNaveen University of Kelaniya IoT and embedded Systems
@DamithraFdo Rajarata University of Sri Lanka
@AnsarMahir UoM - IT fac
@ahmedstki Rajarata University / BCS AgriTech
@Rathnamalala General sir john kotelawala defence university - KDU. AI/ML SE
@pradeeep1999 IoT and embedded Systems
@ilsam99 SLIIT IoT and embedded Systems / Cloud
@Sumindu Esoft Metro Campus AI/ML SE
@thilinapremachandra Rajarata University AI/ML SE / IoT
@JithmiKumarasingha University of Moratuwa Embedded Systems, C, Java, Python
@kailash3590 Agripreneur Agro Techniques, Irrigation Systems

Aligning with Sri Lanka's National DPI/DPG Standards

Sources Credits Goes to: @dasunhegoda

Our goal is to align and support national DPI/DPG Initiative while not doing another duplicate research.

Future State of Sri Lanka DPI/DPG

So the contributors should carefully refer following documents hosted at Ministry of Agriculture in Sri Lanka

Document Name Link
Inclusive Digital Agriculture Transformation (IDAT) in Sri Lanka Download
AGRICULTURE ENTERPRISE ARCHITECTURE Download
AGRICULTURE INTEROPERABILITY FRAMEWORK FOR AGRICULTURE Download

Background: Why Coconut Farming in Sri Lanka?

CocoFusion Project

Coconut farming is central to Sri Lanka’s economy and culture. The country produces about 2.8–3.0 billion nuts per year, yet demand is around 4 billion nuts – indicating a significant shortfall (Coconut and Coconut Based Products - Industry Capability Report) (Coconut and Coconut Based Products - Industry Capability Report). Coconut products make up roughly 12% of Sri Lanka’s agricultural output, supporting the livelihoods of approximately 700,000 people (Coconut and Coconut Based Products - Industry Capability Report) (Coconut and Coconut Based Products - Industry Capability Report). Most coconuts are grown by smallholder farmers (about 75% of plantations) who contribute ~70% of production, but many of these farms are managed below optimal levels (Coconut and Coconut Based Products - Industry Capability Report). This gap between current yields and potential capacity highlights the need for innovative solutions.

Recent studies have shown that introducing IoT and smart farming techniques can significantly benefit coconut cultivation. For example, using IoT-based irrigation control has improved ROI and yield efficiency for coconut farms while reducing water and energy usage (The Investigation of Benefits and Challenges of Using IoT Technology to Enhance the Irrigation Method of Coconut Farming in Sri Lanka by Sathiyamoorthy M, Sarathchandra A.W.C.K. :: SSRN). At the same time, AI-powered sensors can monitor soil conditions, humidity, and tree health in real-time – helping farmers optimize irrigation and detect pest infestations early (Leveraging AI and GPT to Drive Sustainable Innovation in Coconut-based Agriculture Manufacturing). These insights reduce the reliance on guesswork and can lead to higher yields and more sustainable practices. However, challenges such as limited technology awareness and poor internet connectivity in rural areas remain (The Investigation of Benefits and Challenges of Using IoT Technology to Enhance the Irrigation Method of Coconut Farming in Sri Lanka by Sathiyamoorthy M, Sarathchandra A.W.C.K. :: SSRN). CocoFusion is designed to address these challenges by developing an open, adaptable system that is easy for local farmers and stakeholders to use. By focusing on Sri Lanka’s coconut sector, where the need and impact are high, we hope to demonstrate how technology can uplift traditional farming communities.

Project Goals

CocoFusion’s goals are centered on empowering coconut farmers and modernizing agricultural practices. Key objectives include:

  • Increase Coconut Yield and Quality: Use data-driven insights (e.g. predictive analytics for crop health and growth) to help farmers produce more nuts and improve crop quality, narrowing the gap between current production and the 4 billion nuts/year demand (Coconut and Coconut Based Products - Industry Capability Report) (Coconut and Coconut Based Products - Industry Capability Report).
  • Optimize Resource Usage: Implement smart irrigation and fertilization schedules based on real-time field data, ensuring efficient use of water, soil nutrients, and electricity (preventing waste and reducing costs) (The Investigation of Benefits and Challenges of Using IoT Technology to Enhance the Irrigation Method of Coconut Farming in Sri Lanka by Sathiyamoorthy M, Sarathchandra A.W.C.K. :: SSRN).
  • Early Pest and Disease Detection: Deploy sensors and AI models to monitor for signs of pest infestations or diseases (such as coconut rhinoceros beetle or leaf rot) so that farmers can intervene early (Leveraging AI and GPT to Drive Sustainable Innovation in Coconut-based Agriculture Manufacturing). This helps protect coconut palms and reduces heavy chemical use by targeting issues precisely.
  • Support Smallholder Farmers: Develop solutions that are affordable and platform-agnostic – able to run on various hardware (from Arduino/Raspberry Pi to commercial sensor kits) and on local or cloud servers. This flexibility means even farmers with limited resources or connectivity can benefit.
  • Interdisciplinary Collaboration: Promote active collaboration between Information Technology and Agriculture communities. CocoFusion brings together software developers, data scientists, agronomists, and coconut farmers to co-create technology that is grounded in real agricultural needs. Through this, IT students and faculty work alongside agricultural students and experts, fostering knowledge exchange and innovative thinking.
  • Open Knowledge and Sustainability: Make all findings, data, and tools openly accessible. The project will document best practices in smart coconut farming, creating a knowledge base that educators and policymakers can use to drive wider adoption of precision agriculture in Sri Lanka and beyond.

Project Plan (Phases)

CocoFusion will be executed in well-defined phases to ensure a structured approach. Each phase involves both tech and agriculture stakeholders working together:

  1. Phase 1: Site Assessment & Planning – We begin by understanding the coconut farm environments where CocoFusion will be piloted. This phase involves field visits to coconut plantations to identify local needs and constraints. The team (including agriculture experts and students) will survey the land and current farming practices: soil types, climate patterns, common pests/diseases, and farmer pain points. We will also assess practical factors like internet connectivity, power availability, and the farmers’ familiarity with technology. By the end of this phase, we’ll have a clear requirements outline and a tailored plan for each pilot site (e.g. which metrics to monitor, where to place sensors, and what AI insights would be most valuable). Building relationships with the farmers and getting their input is a key part of this phase to ensure the technology addresses real problems.

  2. Phase 2: IoT Setup (Hardware Deployment) – Based on the site assessment, we will deploy a network of IoT sensors and devices on the farm. This includes selecting appropriate sensors for environmental and crop data – for example, soil moisture probes, temperature and humidity sensors, rainfall gauges, light sensors, and possibly camera traps or drone imaging for monitoring tree health. Each sensor node will be strategically placed to get good coverage of the farm (Paper Title (use style: paper title)). We’ll use robust, low-cost hardware (e.g. Arduino or Raspberry Pi with wireless modules) and ensure connectivity (such as setting up a long-range LoRaWAN network or using 4G where available) so that data can transmit to a central system. The IoT setup will be platform-agnostic and modular, meaning farmers can use different brands or types of sensors as available. During this phase, we also create the data pipeline – e.g. a gateway device that collects sensor readings and sends them to a cloud database or local server. Importantly, we will train the local farmers or field staff on basic device maintenance (like charging a solar battery or resetting a device) so they feel comfortable with the equipment. By the end of Phase 2, the farm will be “online,” continuously collecting real-time data.

  3. Phase 3: Data Collection & Integration – Once the sensors are in place, CocoFusion will collect data over a period of time (weeks to months) to build a rich dataset for analysis. All sensor readings (soil moisture, temperature, humidity, etc.) stream into a central database where they are time-stamped and stored. We will also integrate external data sources that impact coconut farming – for instance, weather forecasts, satellite imagery, or drone aerial photos of the coconut canopy. Additionally, farmers and agronomists will help collect ground truth data: examples include recording the actual yield from each harvest, noting occurrences of pests or disease symptoms, and logging farm management activities (watering, fertilizing, etc.). This combined dataset will give a 360° view of the farm’s conditions and outcomes. Throughout this phase, we verify data quality and make adjustments – if a sensor is not reliable or placed incorrectly, we fix it. By Phase 3’s conclusion, we’ll have a well-organized dataset that links environmental conditions to coconut plant performance. This data is the foundation for building AI models in the next phase (Enhanced Coconut Yield Prediction Using Internet of Things and Deep Learning: A Bi-Directional Long Short-Term Memory Lévy Flight and Seagull Optimization Algorithm Approach) (Paper Title (use style: paper title)).

  4. Phase 4: AI Modeling & Analysis – With real farm data in hand, the project’s focus shifts to analysis and developing intelligent models. Our data science team (which can include university students and researchers) will explore the data to find patterns and insights. We’ll use a combination of machine learning (ML) and simple heuristic approaches to address key questions: Can we predict the optimal irrigation schedule to maximize yield? Can we detect early warning signs of pest infestation or nutrient deficiency from sensor trends or images? In practice, this might involve training models – for example, a predictive model using environmental sensor data to forecast soil moisture levels and recommend when to irrigate, or a computer vision model to analyze drone images for spotting discoloration on coconut palms that indicates disease. We plan to start with interpretable models (like threshold alerts or regression models) for quick wins, and gradually introduce more advanced techniques (like neural networks for pattern recognition) as data grows. The AI models will be evaluated rigorously: we’ll split data into training and test sets, measure accuracy of predictions (e.g. did the yield prediction match actual yield?), and refine accordingly. Crucially, agronomists in the team will validate whether the model outputs make practical sense. The outcome of Phase 4 will be a set of prototype AI tools – for instance, an alert system that texts the farmer “Soil moisture low in north field, consider watering tomorrow,” or a dashboard showing a health score for each coconut tree. These tools harness the data to provide actionable recommendations (Paper Title (use style: paper title)). All algorithms and code will be open-source in this repository, inviting peer review and improvements.

  5. Phase 5: Field Trials & Feedback – Having developed initial IoT and AI solutions, we will test them in the real world through field trials. In this phase, the CocoFusion system (sensors + AI software) will be actively used by volunteer pilot farms or experimental plots. For example, one trial might involve a smart irrigation experiment: one section of the coconut farm uses CocoFusion’s AI-driven irrigation alerts, while another section is managed normally, and we compare the soil moisture and yield outcomes. Another trial could test the pest detection system by seeing if the AI alerts catch an infestation earlier than farmers normally would. Throughout the trials, we will gather feedback from the farmers and field personnel using the system. We want to know: Are the recommendations clear and useful? Is the mobile app or interface easy to understand? Does the technology fit into daily farming routines without hassle? Any issues (false alarms, sensor failures, etc.) will be documented. Agronomy students and faculty may conduct surveys or interviews with the farmers to formally evaluate the system’s impact on decision-making and farm outcomes. At the same time, we’ll measure objective results – such as changes in yield, reduction in water used, or quicker pest control responses – to quantify benefits. This phase is iterative: if problems are found, we go back and improve the hardware or tweak the AI model, then trial again. By the end of Phase 5, we aim to have proven the concept: concrete evidence of CocoFusion’s effectiveness (like a percentage increase in yield or resource savings) and a refined system that incorporates user feedback.

  6. Phase 6: Refinement, Expansion & Knowledge Sharing – After successful field trials, CocoFusion will refine the prototypes into a more robust deployable solution. Any remaining bugs will be fixed, and the system will be made more user-friendly based on farmer feedback (for instance, local language support in the interface or adding any features farmers suggested). We will update documentation so that others can set up the system more easily. At this stage, the project transitions from pilot to broader deployment: we plan to expand to more farms in different regions of Sri Lanka to test CocoFusion in varied conditions (different climate zones or soil types) and ensure it generalizes well. Meanwhile, the team will actively share knowledge gained. This includes publishing results and guides in this repository (and possibly research papers or blog posts), conducting workshops or seminars for local farming communities, and reaching out to Sri Lanka’s Coconut Research Institute or agriculture ministries to disseminate findings. We will also encourage other universities (IT and agriculture faculties) to adopt CocoFusion as a student project, thereby scaling the collaboration. The ultimate goal is for CocoFusion to become a self-sustaining open-source initiative that communities can adopt and adapt. By Phase 6’s end, we hope to see a growing community of users and contributors, beyond the original pilot, using CocoFusion to make coconut farming smarter and more sustainable.

(Note: The above phases are a roadmap and may evolve. We anticipate overlapping some phases in practice – for instance, continuing data collection and minor field testing while modeling is ongoing. The project is iterative and will incorporate lessons learned at each step.)

Contributing

We warmly welcome contributions from anyone who is interested in CocoFusion’s mission! This project thrives on interdisciplinary collaboration, bringing together people with different skills – you do not have to be a software developer to contribute. In fact, one of CocoFusion’s core values is to unite tech enthusiasts with agricultural practitioners. Whether you’re a seasoned coder, a student, or a coconut farmer, there are many ways you can get involved:

  • 🌐 Software Developers & IT Students: Help build and improve the CocoFusion platform. This can include coding the firmware for sensor devices, developing the backend data pipeline, or creating user-friendly mobile/web applications for farmers. Even if you’re new to coding, you can assist in writing scripts to analyze data or visualize sensor readings. We use open-source tools and will gladly mentor newcomers. Check the issue tracker for software feature requests or bugs to fix, or propose your own enhancements!
  • 🤖 AI/ML Engineers & Data Scientists: If you have skills in data analysis or machine learning, join us in crafting the AI models that drive CocoFusion’s insights. You can contribute by cleaning and labeling data, experimenting with algorithms for predictions (e.g. rainfall forecasting, yield prediction), or improving the accuracy of our pest detection models. We encourage sharing new model ideas – for example, maybe you want to try a computer vision approach to count coconuts from tree images, or use deep learning to optimize irrigation scheduling. Your expertise will help turn raw farm data into meaningful guidance for farmers.
  • 📡 IoT Enthusiasts & Hardware Experts: CocoFusion involves setting up hardware in the field, so we need people who love tinkering with gadgets. You can contribute by designing and testing sensor circuits, improving the durability of devices (weather-proof enclosures, solar power setups), or integrating new types of sensors (e.g. a coconut tree trunk borer detector). If you’re familiar with technologies like Arduino, Raspberry Pi, or networking protocols (LoRaWAN, MQTT), your knowledge is invaluable. Non-coders can help assemble devices or deploy them on-site. Documenting hardware assembly steps is another great way to contribute.
  • 🌱 Agronomists & Agriculture Students: We heavily rely on domain experts to ensure the project’s success. If you have a background in agriculture or plant science, you can guide what data is important to collect and help interpret the results. For instance, you might advise on the signs of nutrient deficiency in coconut palms or validate that our pest alerts make sense biologically. You can also conduct field experiments in collaboration with the tech team and suggest improvements from an agricultural perspective. Your contributions ensure CocoFusion’s solutions are scientifically sound and truly practical for farmers.
  • 🚜 Coconut Farmers & Field Data Collectors: Farmers are the heartbeat of CocoFusion. If you are a coconut grower or work with farmers, your participation is extremely valuable. You can contribute by hosting pilot tests on your farm, providing feedback on the technology (what works, what doesn’t), and suggesting features that would make your life easier. Even simply sharing your day-to-day farming challenges can help the developers tailor the solution better. Additionally, you can assist in data collection by keeping logs of farm activities or helping to ground-truth sensor data (for example, confirming that a high soil moisture reading corresponds to recent rain). No technical experience is needed – just your willingness to try new tools and tell us honestly how they perform.
  • 🛰️ Drone Operators & Remote Sensing Specialists: If you have access to a drone or expertise in remote sensing, you can contribute by capturing aerial images or videos of coconut plantations. These images can be used to assess tree health, count coconut yields, or detect patterns (like irrigation coverage or pest damage) that ground sensors might miss. You could help build maps of the pilot sites or even contribute to developing drone-based surveys. This is a great way for tech hobbyists (e.g. drone enthusiasts at universities or local clubs) to support the project.
  • ✍️ Documentation Writers & Educators: You don’t need to be on a farm or writing code to help CocoFusion. We need people to improve our documentation, create tutorials, and translate materials for farmers. If you enjoy writing or teaching, you can ensure that our README, setup guides, and user manuals are clear for everyone – including non-technical users. Creating infographics or video demos explaining how CocoFusion works in simple terms is another wonderful contribution. By helping with documentation and outreach, you make the project more accessible and friendly to newcomers.

How to Get Started: If you’d like to contribute, please check out our Contributing Guidelines (if available) or simply reach out by opening an issue/discussion on this repository. You can also contact the project maintainers directly if you have questions or want to discuss an idea. New contributors are always welcome – don’t hesitate to introduce yourself and share how you’d like to help. We strive to maintain a positive and inclusive atmosphere. Mentorship can be provided for students or anyone new to open source. Every type of contribution, no matter how small, is appreciated. 💚

By contributing to CocoFusion, you’re not just writing code or collecting data – you’re becoming part of a community that bridges tech and agriculture for social good. We believe that together, we can co-create solutions that make a real difference for coconut farmers and set an example of interdisciplinary innovation.

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code and materials in accordance with the license. (See the LICENSE file for details.)

Disclaimer

Disclaimer: The initial project plan for CocoFusion (including much of the content in this README) was generated by ChatGPT based on input from Damith Rushika Kothalawala, who is a cloud technology expert not an agricultural expert. This plan is a starting point and may contain assumptions that need validation in the real world. As the project progresses, we expect and welcome contributions from coconut farming specialists, agronomists, and domain experts to refine and improve the plan. CocoFusion is a community-driven effort – the ideas here will evolve with feedback from those with on-the-ground agricultural experience, ensuring that the project remains realistic and beneficial to its intended users. Thank you for your understanding and for helping us improve CocoFusion with your expertise!

About

A Cross-Disciplinary R&D on Smart Coconut Farming

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •