The invention discloses a watermelon maturity detection method and
system based on acoustic analysis and
machine learning, and the method comprises the steps: obtaining knocking sound signals and weight of watermelon samples to form a
data set, classifying the watermelon samples according to maturity, and dividing the
data set into a
training set and a
test set; constructing a maturity detection model to calculate the maturity of the target watermelon sample; training the maturity detection model by using the
training set, then testing the maturity detection model by using the
test set, finally calculating and recording the accuracy, continuing to execute the step of training the maturity detection model by using the
training set until the accuracy is the highest, and obtaining the trained maturity detection model; and obtaining a knocking sound
signal and weight of the watermelon
test sample, and inputting the knocking sound
signal and weight into the trained maturity detection model to obtain the maturity of the watermelon
test sample. According to the method, the requirement for watermelon maturity detection is met, the detection accuracy is improved, model training and testing can be completed in a
small sample data set, and the applicability is improved.