DOI: 10.5061/dryad.x3ffbg7wj
title: Automatic titration detection method of organic matter content based on machine vision

description: This article proposes an automatic titration algorithm for organic matter
 content detection based on machine vision, which addresses the
 disadvantages of high risk factor, strong odor, significant pollution to
 laboratory environment, and slow efficiency of manual titration in organic
 matter detection. Firstly, by analyzing the color change characteristics
 during the titration process, machine learning techniques are used to
 classify the titration speed, and a titration experiment state recognition
 model is constructed to divide the titration speed into four categories
 and improve titration efficiency; Secondly, through a large number of
 titration experiments to collect relevant data and extract key feature
 parameters, an efficient titration algorithm based on histogram similarity
 was designed to accurately identify titration endpoints and improve
 detection accuracy. This study not only solves the limitations of manual
 operation in traditional titration methods, but also provides new ideas
 and methods for the automation and intelligence of chemical titration. The
 test results show that the titration error of the device is less than
 0.2ml, and it has higher efficiency than manual titration, with good
 recognition rate and control accuracy.
description: # Automatic titration detection method of organic matter content based on
 machine vision ### Project Overview This project aims to optimize the
 titration speed through machine learning models and establish an automatic
 titration algorithm by setting up an HSV model to accurately determine the
 endpoint. We used three different machine learning models: Decision Tree,
 K- K-nearest neighbor ( KNN ) , and support vector machine ( SVM ), and
 compared their performance. The specific instructions for how to reproduce
 are included in the README in each model folder. ### Target -Train and
 evaluate the performance of decision tree, KNN and SVM models on the
 titration state prediction task. Compare the accuracy, precision, recall,
 and F1 score of these models. -Select the best model to use for the HSV
 model in the automatic titration algorithm . ### method 1. Data
 preparation : * Collect and preprocess titration experiment data. * Split
 the dataset into training and testing sets. * In this project, a file
 named “rgb_values.csv” (titration features labeled by titration
 speed/state, possibly indicating how fast the titration reaction is
 progressing (e.g., Fast Speed, Slow Speed, Medium Speed or End Point))
 serves as an example of data collection. This file contains RGB values and
 related information obtained during titration experiments. 1.  Model
 training : * Train decision tree, KNN and SVM models using training set
 data . 1. Performance Evaluation : -Evaluate the performance of each model
 on the test set. * Compare the models’ accuracy, precision, recall, and F1
 score. 1. Model selection : -Select the best performing model based on the
 evaluation results. ### In conclusion By training and evaluating the three
 machine learning models, we found that [ Decision Tree ] performed best on
 the titration state prediction task, with better accuracy, precision,
 recall, and F1 score than other models. Therefore, we will choose
 [Decision Tree] for the HSV model in the automatic titration algorithm .
 Future Work -Further tune the parameters of the selected model to improve
 performance. -Explore the possibilities of other machine learning
 algorithms. -Collect more data to improve the generalization ability of
 the model.