340

Detecting and Counting Pistachios based on Deep Learning

Abstract

Pistachios are nutritious nuts that are sorted based on the shape of their shell into two categories: Open-mouth and Closed-mouth. The open-mouth pistachios are higher in price, value, and demand than the closed-mouth pistachios. Because of these differences, it is considerable for companies to precisely count the number of each kind. This paper aims to propose a new system for counting the different types of pistachios with computer vision. We have introduced and shared a new dataset of pistachios, including six videos with a total length of 167 seconds and 3927 labeled pistachios. At the first stage, we have trained RetinaNet, the deep fully convolutional object detector with three different backbones for detecting the pistachios in the video frames. In the second stage, we introduce our novel method for counting the open-mouth and closed-mouth pistachios in the videos. Pistachios that move and roll on the transportation line may appear as closed-mouth in some frames and open-mouth in other frames. Our work's main challenge is to count these two kinds of pistachios correctly and fast with this circumstance. Our algorithm performs very fast and achieves good counting results. The computed accuracy of our algorithm on six videos (9486 frames) is 94.75%.

View on arXiv
Comments on this paper