
A coconut is not a nut, botanically speaking, but a fruit, and like other fruit it has a maturity that matters. A young coconut is for drinking, a mature one for its meat, and an over-mature one for its husk and copra. Sorting them after harvest is done by experienced workers who tap the shell and listen. A paper by Caladcad and colleagues, published in Computers and Electronics in Agriculture in 2020, asked whether a machine could learn to do the same thing from the sound.
How the data was collected
The researchers tapped each coconut on three different sides and recorded the three resulting audio signals. The recording and processing was done through a purpose-built application the post shows a screenshot of, which captured the knock, generated the waveform, and converted it to a table of values. Each recording is a time series of the frequencies produced by the tap, which carry information about the density and water content of the fruit.
A subset of the recordings was used to train three machine learning classifiers: an artificial neural network (ANN), a random forest (RF), and a support vector machine (SVM). The remaining recordings were held back to test the trained models on coconuts they had not heard.
Results
Random forest performed best of the three. Its classification accuracy was 90.98 percent on the training set and 83.48 percent on the test set, with F-scores of 91.41 and 81.35 percent. The support vector machine came next (88.35 and 80.00 percent), and the neural network last (79.32 and 81.74 percent).
The errors were not random. All three models classified the over-mature coconuts perfectly. Where they slipped was in the direction of assigning too much maturity: mature coconuts were sometimes labelled over-mature, and premature ones sometimes labelled mature.
What the authors suggest next
Caladcad and co-authors present the result as a demonstration that audio signal processing and machine learning can be combined to solve a real post-harvest problem, and as a starting point rather than an end. They suggest the models could improve with additional statistical features or more sophisticated methods, and that the same acoustic approach might extend to detecting fruit damage or judging overall coconut viability. For an industry as large as coconut farming in the Philippines, a cheap, consistent sorting method would be worth having.