Christina foliage
Syzygium campanulatum sample used for species overview and field context
Overview
This university project classifies Christina (Syzygium campanulatum), Maadan (Syzygium cumini), and Mee (Madhuca longifolia) using an artificial neural network on leaf morphometrics. We collected a balanced 450-sample dataset from the university garden (150 per species), engineered three features (length/width ratio, front angle, back angle), and trained a Dense Keras model with BatchNorm, Dropout, and Softmax. Test accuracy landed around 96.7% in the report (Colab eval ≈ 95.6%). The work is practical training in field data collection, feature design, and supervised multi-class learning.
- Role
- ML engineer / team member
- Team
- Team Nexus Titans (3), Rajarata University of Sri Lanka
- Timeline
- University coursework · ICT neural-network assignment
- My contribution
- Built the morphometric dataset workflow, Keras multi-class ANN, training/evaluation notebooks, and project report with Team Nexus Titans.
Problem
Christina and Maadan are easy to confuse by eye. Overlapping leaf shape and berry color make visual ID unreliable in a garden or mixed canopy, so the team needed measurable features and a model that could separate three classes consistently.
- Christina, Maadan, and Mee share glossy elliptical leaves that look similar in the field
- Manual botanical ID needs repeatable measurements, not just photos
- A small tabular feature set still has to generalize across samples
- Misclassifications concentrate where leaf-angle ranges overlap
Field dataset
We measured leaves on campus instead of downloading a ready-made image set. Each sample stores three numbers and a species label. The set is balanced at 150 Christina, 150 Maadan, and 150 Mee rows (450 total).
- Feature 1: leaf length/width ratio
- Feature 2: leaf angle on the front side
- Feature 3: leaf angle on the back side
- LabelEncoder for class indices; StandardScaler before train/test split (80/20)
ANN architecture
The classifier is a compact fully connected network for three numeric inputs. Hidden layers use ReLU with BatchNormalization and 20% Dropout. The output layer is Softmax over three species. Training used Adam and sparse categorical crossentropy in Google Colab.
- Input dim 3 → Dense(24) + BatchNorm + Dropout(0.2)
- Second Dense(24) + BatchNorm + Dropout(0.2)
- Softmax output with 3 neurons (Christina, Maadan, Mee)
- EarlyStopping on val_loss (patience 5) during longer runs
Results
The report lists about 96.7% accuracy with 0.13 loss. The Colab notebook evaluation printed 95.6% on the held-out test split. Accuracy and loss curves show validation metrics stabilizing while train loss continues to fall. Remaining errors are mostly Christina ↔ Maadan swaps where angles sit near shared ranges.
- Report: accuracy ≈ 0.9667, loss ≈ 0.1321
- Notebook evaluate(): test accuracy ≈ 0.9556
- Correct cases often hinge on distinctive ratio + angle combinations
- Confusion analysis pointed to adding more morphological features later
What I learned
This project is early, deliberate ML practice: collect your own data, choose features that survive field noise, regularize a small network, and read the mistakes. That habit carried into later vision work where dataset quality and class confusion still decide whether a model is useful.
- Field measurement and balanced class design before model tuning
- Feature engineering for multi-class botanical separation
- Keras training loop with scaling, callbacks, and metric plots
- Error analysis on overlapping classes instead of chasing accuracy alone
Stack
Python, TensorFlow/Keras, scikit-learn, NumPy, Pandas, Matplotlib, and Google Colab.
More projects
Explore other work in the portfolio






