Skip to content
All projects
iden

01Undergraduate thesis · 2026

Rice Harvest Readiness from Drone Imagery

Raw drone photos in, a field map and a harvest verdict out. A three-tier system that runs fully offline on a single field laptop, with no cloud service.

GitHub · WebGitHub · APILive demo(new tab)
Rice field classification map over OpenStreetMap: ripe plots in yellow, unripe in green

Overview

My thesis is titled "Detecting and Mapping Rice Harvest Readiness from Drone Imagery with Edge Computing and a Geographic Information System (GIS)". Drone photos of a paddy are processed on a single laptop into a map of which parts are ripe, with a harvest verdict and downloadable GeoTIFF files.

Stitching, segmentation, and export run offline from start to finish. The internet is only used to load OpenStreetMap tiles behind the map, and without it the orthophoto and classification layers still show.

I used HSV segmentation rather than deep learning: rice ripeness shows clearly as the canopy shifts from green to yellow, it runs fast on a laptop without a GPU, and every decision can be explained from the threshold values.

per pixel
5 cm
REST endpoints
12
harvest threshold
60%

Main stack

  • Python
  • OpenCV
  • RRasterio
  • FastAPI
  • SQLite
  • Docker
  • NNodeODM
  • Next.js
  • Leaflet

Processing pipeline

  • Drone photos (JPG with GPS in EXIF, 70–80% overlap) are stitched by NodeODM into a georeferenced GeoTIFF orthophoto, targeting 5 cm per pixel.
  • Gaussian Blur and CLAHE preprocessing, then RGB to HSV conversion.
  • HSV thresholds produce a yellow (ripe) and a green (unripe) mask, cleaned with morphology. The two hue ranges deliberately do not overlap.
  • The yellow share of all rice pixels is compared against a 60% threshold, across the whole orthophoto. The threshold can be changed per request.
  • Outputs: orthophoto and classification GeoTIFFs (they open in QGIS as-is), PNG overlays for Leaflet, a 300 DPI PNG map for reports, and a JSON result.

Backend (FastAPI)

  • 12 REST endpoints: stitching, job status, classification, manual upload, result list, file download, per-field history, health check, and NodeODM status.
  • Stitching runs as an asynchronous job because it can take 10 minutes to several hours. Classification usually finishes in under a minute.
  • Detection history is stored per field in SQLite.
  • The same pipeline runs without the server through a CLI, with an install check and an endpoint smoke test.
  • A research notebook keeps the threshold calibration: hue sensitivity tests, hue histograms, and a two-field case study.

Frontend (Next.js)

  • 7 pages: home, upload, stitching progress, result list, result detail on a map, per-field history, and system status.
  • Two upload modes: raw drone photos, or results already processed outside the system.
  • A Leaflet map over OpenStreetMap that zooms to the field bounds. The orthophoto and classification layers toggle separately, with an opacity slider.
  • Next.js 15, React 19, TypeScript, Tailwind CSS, and Leaflet.

Screenshots

Result detail page: classification layer over the map, a READY TO HARVEST verdict at 74.23%, and a statistics panelOpen full-size image
Result detail: verdict, statistics, and GeoTIFF downloads over the map
Upload page with two modesOpen full-size image
Upload: raw drone photos or a manual result
Paddy orthophoto stitched from drone photosOpen full-size image
Orthophoto stitched by NodeODM
The same orthophoto with yellow over ripe rice and green over unripe riceOpen full-size image
Per-pixel classification: yellow ripe, green unripe
READY TO HARVEST verdict map: 74.2% yellowOpen full-size image
Ready: 74.2% yellow, 14.2 points above the threshold
NOT READY verdict map: 19.8% yellowOpen full-size image
Not ready: 19.8% yellow, most plots still green
Result cards with verdict and percentageOpen full-size image
All classification results
Detection history table with a field filterOpen full-size image
Detection history per field

The system reads canopy colour, not grain moisture. Its result supports a decision; it does not replace a farmer walking the field.

Previous projectDiscord Lyrics SpotifyNext projectRABmate AI
© 2026 Ryan Muhammad HildanContact