Object Recognition through Machine Learning in Beekeeping. Part 2
SoftTeco continues to explore machine learning technology and the possibility of object detection in beekeeping. In the first part of our article, we talked about objects classification, ways of model training, and the whole architecture of the application. Testing of the model showed excellent results.
Not so long ago, we got successful results and solved another machine learning task – object detection. The process of achieving this success will be described below.
Before we get into the details of the model’s creation, let’s first define what object detection is. Object detection is a computer vision task. This term is mentioned in the article “Eyes and Ears of a Computer” by Oliver Selfridge. Object detection is the processing of images or video files under certain conditions. In daily life, people usually solve the same problems. For example, when crossing an intersection, drivers are guided by a set of knowledge and conditions – they recognize the color of the traffic light or road signs.
For a computer, such tasks are more complicated. First of all, the algorithm for detecting objects in images or video should have high accuracy and speed in the object location definition, as well as its classification. Considering this, we chose the best materials for our experiment.
You Only Look Once
To date, algorithms have been proposed that achieve good performance according to these criteria – R-CNN and Fast R-CNN. The YOLO algorithm was developed specifically for object detection and object recognition. It allows fast image processing (about 1000 times faster than R-CNN and 100 times faster than Fast R-CNN). In this algorithm, a minimum loss of accuracy was achieved with the help of high performance both in image recognition and in video streaming. We also chose this image processing method because of its simple integration with PyTorch.
The quality of the datasets directly affects the accuracy of the model. Our dataset needed processing to solve the object detection problem. The main task was to obtain detection accuracy above 60% in a small dataset. Using Data Mining algorithms and subsequent filtering, we obtained a dataset with 1500 low-resolution images and a test set of images. The image markup was made in a cross-platform GUI tool to annotate images. For the learning process, we used the most powerful GPU that exists at the moment.
The accuracy of predictions was about 60-75% on groups of bees. During the model testing, we realized that our dataset can be improved for more accuracy. On a dataset with 7000 labeled images, the accuracy of prediction will be 85-98%. We continue working on application development taking into account the modifications which will help us to improve the dataset for more accuracy.
Soon we will tell you about the last stage of product development and app release, so stay tuned for that!