Boar spermatozoa classification using local invariant features and bag of words. Mar´ ıa Teresa Garc´ ıa-Ord´ as, Laura Fern´ andez-Robles, Oscar Garc´ ıa-Olalla, Diego Garc´ ıa-Ord´ as, Enrique Alegre Universidad de Le´ on, {mgaro, l.fernandez, ogaro, enrique.alegre}@unileon.es, diego.ordas@gmail.com Abstract In this work a comparison of different descriptors and classifiers was carried out in order to classify boar spermatozoa acrosome in intact or damaged using the method called Bag of Words (BOW), which allows a dictionary-based modelling. In our case, each image is described by some local points from the dictionary, without taking into account the spatial information. We test this method us- ing SVM, kNN, QDA, LDA and the dictionary was obtained in two ways: using a k-means al- gorithm and a fuzzy clustering method obtaining better results with the first one and SVM classifi- cation. This method was tested using two local in- variant descriptors: SIFT, with a success rate of 64.88%, and SURF with a success rate of 71.75%. Keywords: bag of words, invariant local features, SVM, image classification. 1 Introduction Semen quality assessment is a really important factor in the porcine industry, where it is applied in order to obtain the best individuals for human consumption. In the last years, the Computer-Assisted Semen Analysis (CASA) systems have been used with this aim [3] but these systems have some draw- backs. The evaluation of the acrosome integrity is carried out manually using stains and it has some disadvantages such as the high cost in terms of time and specialized staff and the lack of objectiv- ity. For those reasons, it would be very interesting to use an automatic classification of the acrosomes as intact or damaged. There are few computer vi- sion works which deal with boar sperm analysis in the field of texture analysis and classification like the one developed by Alegre et al. [2] using Learn- ing Vector Quantization (LVQ) method to classify the spermatozoa acrosome and the one developed by Suarez et al. [11] in which statistic texture descriptors are used to classify boar sperm. The segmentation process in this kind of works is a critical factor in order to obtain accurate results, but this is a really difficult task and the preci- sion of the method depends on this factor. Conse- quently, we have considered using invariant local features rather than texture analysis because we can avoid segmentation process which represents by itself an unsolved problem. The development of image matching by using a set of local inter- est points was definitively efficient when Lowe [8] presented SIFT, introducing invariance to the lo- cal feature approach. Later, more methods using local features were developed such us SURF [4] and Ferns [10]. SIFT and SURF output is a set of points descrip- tors, so directly using classical classifiers is not possible because these ones take into account only one descriptor but not a set of them. A way to solve this problem is the use of “Bag of Words” method in which each image descriptor looks like a bag which contains some local points from a dic- tionary, so the order is not considered. In 2011, Li et al. proposed a novel contextual Bag-of-Words (CBoW) representation to model two kinds of typ- ical contextual relations between local patches: a semantic conceptual relation and a spatial neigh- bouring relation [6]. Some authors like Aldavert et al. used Bag of Words method in order to solve the real-time object segmentation [1] and there are many works using Bag of Words for multiple pur- poses like the one developed by Yang et al [13] in which it is used in scene classification or the one developed by Li et al [7] in which a 3D shape re- trieval method is carried out investigating the ca- pabilities of the Bag of Words method in the 3D shape retrieval field while Hyman et al [5] used it for document retrieval. Authors like Wu et al [12], used the Bag of Words method applied to moving objects. It is possible to reduce the dimensionality of the bag of words representation too. Martins et al [9] developed a method with this purpose using learning algorithms. The rest of the paper is organized as follows: Sec- tion 2 describes the Bag of Words method used with SIFT and SURF. The classification methods used are introduced in section 3. Results achieved with the different classifiers and methods to cal- culate the dictionary of the Bag of Words are pre- sented in section 4. Finally, section 5 shows our