Ismail Adeleke, Nnamdi Nwulu, Oluwafemi Ayodeji Adebo
Maintaining precise fermentation control in dairy products such as amasi is essential for consistent quality, yet conventional testing is labour-intensive and unsuitable for real-time control. We present an integrated digital twin platform that combines non-invasive computer vision, IoT sensors, and machine learning with closed-loop PID temperature and stirring control. A Raspberry Pi captured 7666 time-synchronised images and continuous sensor streams (pH, total titratable acidity (TTA), and electrical conductivity (EC)) fused with metadata (temperature, inoculation, pasteurization). Eight feature extraction strategies: four image-only [convolutional neural network (CNN)-based deep embeddings, local binary patterns (LBP) + Gabor texture, LAB (where L represents lightness, a denotes the green-red axis, and b indicates the blue-yellow axis) colour histograms, and edge detection] and four hybrids were evaluated with a fully connected neural network, XGBoost and Random Forest regressors. Ensemble models on the fully integrated feature set delivered the best performance (Random Forest: R 2 = 0.9537, MSE = 0.0708, MAE = 0.1256). Temperature-compensated EC was calibrated as a continuous proxy for TTA, yielding R 2 = 0.9279, RMSE = 0.1889 mL/g, and MAE = 0.1445 mL/g. An ablation analysis showed that CNN embeddings, colour histograms, and sensor metadata are critical to accuracy; texture provides modest additional gains when fused, while edge features offer limited standalone value. This approach enables continuous, non-invasive acidity monitoring and reduces reliance on frequent manual titrations by supplying calibrated EC-based estimates with quantified uncertainty. Its modular, low-cost hardware and cloud-hosted digital twin makes the approach also scalable to other fermented dairy products. • Computer vision + IoT + ML enable non-invasive real-time fermentation monitoring. • CNN, LAB colour, texture, edge, sensor metadata were used to predict pH, TTA, EC. • Fully integrated hybrid feature set achieved R 2 > 0.95. • Ensemble models (Random Forest, XGBoost) outperformed deep learning variants. • Digital twin includes closed-loop PID for temperature and stirring control.