A selection of applied machine learning projects spanning agriculture, remote sensing, structural modelling, and edge deployment: from peer‑reviewed research to systems in active development.
Cotton Crop Disease Detection System
Field demo from the original Master’s research: a point‑of‑care, IoT‑based system for real‑time cotton crop disease detection, funded by the Sindh Higher Education Commission.
Cotton is one of the world’s most economically important crops, and disease outbreaks can wipe out entire harvests. This project built an end‑to‑end AI system that identifies Bacterial Blight and Cotton Leaf Curl Virus directly from leaf images, with no lab equipment needed, running on a Raspberry Pi so farmers in remote areas can use it in the field with a standard camera.
The challenge: early disease detection normally requires expert agronomists who are expensive and unavailable in rural areas; existing solutions needed high‑end hardware smallholder farmers don’t have; the dataset was limited and imbalanced; and the model had to run in real time on a 1GB‑RAM device.
Approach: compared InceptionV4, EfficientNetB7 and InceptionV3 via transfer learning on an indigenous, in‑field dataset of 3,200+ cotton leaf images, with rotation/flip/brightness augmentation to handle class imbalance. The final model was exported to TFLite and deployed on a Raspberry Pi 4, paired with a mobile Android app (MIT App Inventor) and a MySQL database for GPS‑tagged disease logging.
Results: 98.6% classification accuracy on the test set, outperforming prior published benchmarks on the same task, with real‑time inference (~1.2s/image) on Raspberry Pi 4. Published in IEEE IPAS 2022 and Engineering, Technology & Applied Science Research (2023).
Tech stack: Python, TensorFlow, Keras, TFLite, InceptionV4, EfficientNetB7, OpenCV, Raspberry Pi, Android / MIT App Inventor, MySQL.
Vineyard Condition Detection via Satellite Imagery
Climate change is forcing wineries across Europe to adapt: abandoned vineyards, drought‑stressed crops, and shifting growing zones are now major economic concerns. This project built a satellite imagery ML pipeline that automatically detects vineyard condition (active, abandoned, stressed) across the Oltrepò Pavese wine region in Northern Italy, using freely available Google Earth imagery and YOLOv8.
The challenge: manual vineyard surveys are expensive and can only cover small areas; no labelled dataset existed for the target region; satellite imagery introduces noise from cloud cover and seasonal variation; and outputs needed to be interpretable by agronomists with no ML background.
Approach: built a custom dataset from Google Earth Engine multi‑temporal imagery, manually annotated in QGIS, and fine‑tuned YOLOv8 (comparing v5/v8 variants) with image tiling and seasonal compositing to reduce cloud‑cover noise. Outputs are suitability maps overlaid on GIS layers for direct use by agronomists.
Results: successfully mapped vineyard conditions across Oltrepò Pavese, generating suitability maps used to target field interventions. Presented as a poster at the EGU General Assembly 2025 in Vienna, with an extended cross‑regional analysis at TERRAENVISION 2025 in Granada, Spain, and a related co‑authored publication on olive grove abandonment detection in Soil Systems (MDPI, 2025). Funded jointly by the VINO project and Italy’s NODES initiative.
Tech stack: Python, YOLOv8 (Ultralytics), Google Earth Engine, QGIS, PyTorch, OpenCV, GeoJSON/Shapefile, Pandas, NumPy.
NIR Spectroscopy ML Pipeline for Nutrient Prediction
Traditional lab analysis of silage and milk for nutrient content (protein, fat, fibre, moisture, minerals) takes days and costs hundreds of euros per sample. Near‑infrared (NIR) spectroscopy can scan a sample in seconds, but requires ML models to translate spectral signals into nutrient values. This project, part of the FORMIDABILÆ initiative, built and validated the full pipeline from raw spectral data to calibrated nutrient predictions used by dairy farms and biogas plants.
The challenge: NIR spectral data is high‑dimensional with limited training samples; spectral collinearity causes standard regression to overfit; each nutrient behaves differently across crop types; and stakeholders needed interpretable outputs, not just predictions.
Approach: applied Standard Normal Variate and Savitzky–Golay preprocessing, PCA/PLS dimensionality reduction, and compared PLS Regression, Ridge, Lasso, Random Forest, SVR and XGBoost across crude protein, NDF, ADF, dry matter, fat and ash targets, with SHAP values for feature‑level explainability.
Results: delivered validated models for macro and micro nutrient prediction across three crop types (maize, dairy, biogas feedstock), presented at an internal University of Pavia research seminar (November 2024) and integrated into FORMIDABILÆ project reporting used by partner farms for feed management decisions.
Tech stack: Python, Scikit‑learn, XGBoost, SHAP, PLS Regression, Pandas, NumPy, Matplotlib, Seaborn, Jupyter.
3D Structural Modelling of Olive Trees for Automated Pruning
Robotic pruning research has so far worked almost entirely on dormant, leafless trees, where the branch structure is easy to see. Olive is evergreen and is always pruned in full leaf, so the field’s usual approach does not apply. This ongoing project, carried out as a visiting researcher at Universidad Loyola in Seville, asks how much structural fidelity survives when a tree’s biomechanics are modelled from a low‑cost stereo depth camera (a €770 ZED 2i) instead of the terrestrial laser scanners (€20,000–100,000) used in prior work.
The challenge: dense foliage conceals the wood a pruning decision depends on; no published method reconstructs olive at branch level; and cheap depth sensors are known to struggle most exactly where branch diameter, not topology, must be measured accurately.
Approach: a six‑stage pipeline turns a single ZED 2i recording into a fused point cloud, an isolated and denoised tree cloud, a skeleton and branch graph (Laplacian contraction), per‑branch length and diameter estimates, and a beam finite‑element structural model solved for self‑weight and wind load. Current work is developing a taper‑consistency check, a validation test that flags physically implausible diameter estimates without needing any ground truth, and is planned for direct validation against caliper measurements on real Sevilla orchard trees (Manzanilla, Gordal Sevillana and Hojiblanca cultivars).
Status: the pipeline runs end to end in real metric units, producing a connected 387‑node branch graph and a solved structural model. Diameter estimation and physical validation are the current focus, ahead of moving from a single potted specimen to real orchard trees this winter’s dormant season.
Tech stack: Python, ZED SDK, Open3D, CloudCompare, pc‑skeletor, PyNite, point cloud processing.
Machine Learning Prediction of Energy and Biogas Quality in Full‑Scale Biogas Plants
Biogas plants depend on microbial communities that are sensitive to temperature, pH and feedstock, but the reference methods for tracking that microbial state are slow and expensive. This project builds machine learning models directly on operational data from a full‑scale anaerobic digestion plant (two reactors, 205 process features) to predict methane, carbon dioxide, hydrogen sulfide and energy yield, and to flag reactor instability before it happens.
Approach: operational parameters (temperature, pH, volatile fatty acids), NIR measurements and microbial community composition are combined and reduced with PCA, then used to train and compare Random Forest, XGBoost, Support Vector Machines and neural network models, with feature importance analysis identifying which microbial taxa and process variables drive performance.
Results so far: Random Forest achieved the strongest accuracy for biogas quality prediction (R² = 0.85, RMSE = 0.06), and a separate classification model built to flag developing performance issues (sudden drops in biogas quality or energy output) reached 88% accuracy, with rising volatile fatty acid concentrations identified as an early warning signal.
Tech stack: Python, Scikit‑learn, XGBoost, PCA, Random Forest, SHAP, NIR spectroscopy data.
Additional Projects
Bacterial Blight & Leaf Curl Detection (Inception V4)
CNN‑based detection of two cotton diseases using an Inception V4 architecture, published at IEEE IPAS 2022.
Greenhouse Monitoring System over IoT
Sensor‑driven environmental monitoring system for greenhouse conditions using Arduino and wireless communication.
Lung Cancer Classification using CNN
Convolutional neural network for classifying lung cancer imaging data.
Custom Object Detection with YOLOv5
Custom‑trained YOLOv5 object detector for a domain‑specific dataset.
Universal Wireless Charger
Hardware project that placed 2nd position at IBA Startups competition.
AI Content Generation Pipeline
Automated content generation using the ChatGPT API with autoposting via Selenium.
