Inspiration Palm oil is a cornerstone of Malaysia's economy and a vital global commodity. However, estate managers and smallholder farmers face constant, evolving threats: devastating diseases like Ganoderma Basal Stem Rot, unpredictable weather patterns driven by climate change (such as El Niño), and the rising costs of fertilizers. We realized that while large corporations have access to expensive agronomic consultants, many farm managers lack real-time, actionable data. We were inspired to build Smart Palm Oil Farm AI to democratize precision agriculture, putting an expert agronomist in the pocket of every farm manager.
What it does Smart Palm Oil Farm AI is a comprehensive, centralized dashboard designed specifically for the nuances of Malaysian agriculture. It features four core modules:
Disease Detection: Users can upload photos of palm fronds, trunks, or fruit bunches. The AI analyzes the image to detect visual symptoms of nutrient deficiencies or diseases, providing an instant diagnosis and recommended actions.
Fertilizer Optimizer: By inputting soil test results (pH, NPK levels) and soil type (e.g., peat vs. mineral), the system generates a customized fertilizer application plan to maximize yield while minimizing chemical runoff.
Harvest Prediction: It analyzes historical yield and rainfall data alongside current weather forecasts to predict upcoming harvests, helping estates plan logistics and labor.
Drone Monitoring: A live telemetry interface for monitoring autonomous drone fleets that survey the estate for water stress and canopy health.
How we built it We built the frontend using React and Tailwind CSS to create a clean, professional, and highly responsive dashboard that works just as well on a tablet in the field as it does on a desktop in the office. For data visualization, we integrated Recharts to render historical trends and forecasts.
The core intelligence of the application is powered by the Gemini API (gemini-2.5-flash).
Multimodal Analysis: We utilized Gemini's vision capabilities for the Disease Detection module, allowing the model to process base64-encoded images alongside specific agronomic prompts.
Data Synthesis: For the Fertilizer Optimizer and Harvest Prediction, we engineered structured prompts that feed raw data (soil metrics, historical yields) into the model, instructing it to act as a Malaysian agronomist and return structured, localized advice.
Challenges we ran into One of the main challenges was ensuring the AI provided localized advice rather than generic agricultural tips. Palm oil grown in Malaysian peat soil requires vastly different nutrient management than crops grown in standard mineral soil. We had to carefully refine our system prompts to ensure the model accounted for these specific environmental variables.
Additionally, designing an interface that surfaces complex data—like drone telemetry and NPK ratios—without overwhelming the user required multiple iterations of UI/UX design.
The Math Behind the Agronomy While the AI handles the complex pattern recognition, the underlying principles of our predictive models rely on established agronomic formulas. For instance, when the AI evaluates canopy health from drone imagery, it conceptually processes vegetation indices like the Normalized Difference Vegetation Index (NDVI):
Where is the near-infrared reflectance and is the visible red reflectance.
For harvest forecasting, the baseline expected yield () can be modeled as a function of historical rainfall (), fertilizer application (), and disease prevalence ():
Our AI models abstract this complexity, analyzing the non-linear relationships between these variables to output a simple, readable tonnage prediction.
What we learned We learned a tremendous amount about prompt engineering, specifically how to constrain a Large Language Model to output highly structured, domain-specific advice. We also gained deep insights into the palm oil industry and the specific pain points that estate managers deal with daily.
What's next for Smart Palm Oil Farm AI In the future, we plan to:
- Integrate real-time IoT soil sensors to automatically populate the Fertilizer Optimizer, removing the need for manual data entry.
- Connect the Drone Monitoring module to actual DJI SDKs for live video feed analysis.
- Add multi-language support (Bahasa Melayu and Tamil) to make the tool accessible to a wider range of plantation workers.
Built With
- api
- cloud
- clsx
- css
- gemini
- lucide
- react
- recharts
- typescript
- vite
Log in or sign up for Devpost to join the conversation.