Fruit Recognition – Continuing Research

27 May 2014
By Natalia Krysenko, .Net Developer

DataArt Research Lab continues to publish the results of fruit recognition using the Color Distance method.

The Color Distance method showed good result as an engine for fruit recognition. Just for testing purposes, we took 15 classes of fruits (10 ‘ideal’ samples for each class) and a simple classifier of Euclidian distance. But such an approach has serious disadvantages:

  • in everyday life we do not deal with ideal pictures: the photos may contain different distortions, irregular brightness etc.;
  • the classifier of Euclidian distance cannot provide us with real time work, particularly if we have a lot of classes and etalons.

So our next step is to use a more complicated real time working classifier and increase the sample set with new ‘real’ images.

To obtain images that are more alike to a working environment, we created a HSV-filter. The filter changes the values of Saturation (S) and Brightness (V) and generates dark, light, more and less ‘gray’ images:

As a result, we generated over 800 samples for 15 classes.

Classifier selection – this is a very important step for recognition system development.

The main requirements for the classifier in our system are:

  • ability to detect nonlinear relationships between dependent and independent variables;
  • simple training and retraining procedures;
  • realtime results.

All these features can be provided for by a simple neural network: a multi-layer perceptron. In our system the neural net has 3 layers: input, hidden and output, that contains a corresponding 72, 12 and 15 nodes. The network learns with a back propagation algorithm with 10000 iterations and an error of 0.147.

The results of the neural net is shown in the picture:

Note: the numbers in the circles represent the amount of correctly recognized samples; the numbers –on the arrows represent the amount of incorrectly recognized samples; the pointers lead from the class which they were incorrectly recognized as to the correct class.

Some of the classes (Gooseberry, Grapefruit, Kiwifruit, Lemon, Lingonberry, Orange-mandarin, Pear, Persimmon, Plum, Raspberry, Strawberry) are recognized quite well, some of them (Apricot, Banana, Blackberry, Blueberry) quite badly. More detailed results for each class are given below.

The poor results are probably obtained because using only a Color Distance method is not enough for parameterization. To improve the suituation we need to implement another parameterization method, for instance, a texture analyzer. But this is the next step in our investigation and topic for the next post.

Banana (5/20)

Blackberry (12/26)

Apricot (3/17)

Blueberry (22/73)

Gooseberry (48/55)

Grapefruit (32/34)

Lemon (37/38)

Pear (21/30)

Lingonberry (67/69)

Plum (28/34)

Raspberry (50/54)





Add Comment

Name Mail Website Comment