{'fraction_non_alphanumeric': 0.02906150988746859, 'fraction_numerical': 0.013492843876324703, 'mean_word_length': 4.697790227201992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Radon Features and Barcodes for Medical Image Retrieval via SVM

For more than two decades, research has been performed on content-based image retrieval (CBIR). By combining Radon projections and the support vector machines (SVM), a content-based medical image retrieval method is presented in this work. The proposed approach employs the normalized Radon projections with corresponding image category labels to build an SVM classifier, and the Radon barcode database which encodes every image in a binary format is also generated simultaneously to tag all images. To retrieve similar images when a query image is given, Radon projections and the barcode of the query image are generated. Subsequently, the k-nearest neighbor search method is applied to find the images with minimum Hamming distance of the Radon barcode within the same class predicted by the trained SVM classifier that uses Radon features. The performance of the proposed method is validated by using the IRMA 2009 dataset with 14,410 x-ray images in 57 categories. The results demonstrate that our method has the capacity to retrieve similar responses for the correctly identified query image and even for those mistakenly classified by SVM. The approach further is very fast and has low memory requirement.


I. Introduction
Content-based image retrieval (CBIR) aims at searching for similar images in a database when a user provides a query (input) image. CBIR algorithms are supposed to work with measures derived from the images themselves instead of accompanied text or metadata [1]. In recent years, CBIR has been investigated for different fields such as education, electric commence, Internet and bio-medical area.
CBIR systems rely on analysis of the content of the query image and efficient methods to describe the visual features extracted from the image. Early CBIR systems were based on the descriptions of visual characteristics, such as color, texture, and shape, and advanced features representing the vital regions with significant details [2], [3], [4], or in more recent works the semantic content [5], [6], [7]. In the medical field, CBIR systems have been examined with the hope that they can assist clinicians in diagnostic fields by retrieving similar cases.
In [8], authors extract the center-symmetric local binary pattern (LBP) from image and compute co-occurrence of pixel pairs in local pattern map using gray-level co-occurrence matrix, which is assumed to be more robust than frequency of patterns (histogram). Dubey et al. [9] propose a new feature descriptor named local diagonal extrema pattern (LDEP) for CT image retrieval. By using the first order local diagonal derivatives, the values and indexes of the local diagonal extremes are obtained, and the descriptor is generated on the basis of the indexes and the relationship between the center pixel and local diagonal extremes. Greenspan et al. present a localized statistical framework based on Gaussian mixture modelling and Kullback-Leibler (KL) matching for medical image retrieval. It combines a continuous, probabilistic and region-based image representation scheme, along with an information-theoretic image matching measure to categorize and retrieve x-ray images [10]. Camlica et al. used two methods to retrieve x-ray images: an autoencoder to reduce the size of the image for feature extraction [11], and a SVM classifier trained with LBP features derived from saliencybased image regions. [12].
It is worth noting that most current medical CBIR systems are limited to the images with specific modality, organ, or diagnostic studies, and usually cannot be applied directly to other medical applications [13]. Moreover, although CBIR can theoretically be applied to several medical cases, the existence of "semantic gap" between the extracted image features on one side and the doctors' interpretation of the images on the other side limits its application. This is because generic features of images may not be suitable for the analysis of medical image similarity of a specific modality [1].
Inspired by the barcodes embedded in many products and attached to many services we encounter on a daily basis, a novel Radon barcode for medical image retrieval system was proposed in 2015 [14]. The Radon barcode is a binary code generated based on Radon Transform with selected projection angles and projection binarization operation that can tag/annotate a medical image or its regions of interest. Depending on the Radon barcode, large image archives can be efficiently searched to find matches via Hamming distance, e.g., kNN search, or hashing-based methods, e.g., locality sensitive hashing.
In this paper, IRMA benchmarking dataset containing 14,410 x-ray images are used to test an approach based on SVM and Radon transform. By using Radon transform, the medical images in database are described by a set of features to train support vector machines using corresponding image labels representing their categories or classes. Radon barcodes of all images in database are also generated for the actual retrieval. When new query (input) images are encountered, SVM classifier first assigns them a class by classifying their arXiv:1604.04675v1 [cs.CV] 16 Apr 2016 Radon projections. Within the class determined by SVM, the most similar images are then retrieved by using the k-nearest neighbor (KNN) search method that compares Radon barcode of query image with the barcodes of all other images already indexed.
This paper is organized as follows: Section II provides a brief overview of SVM, Radon transform and Radon barcodes. The proposed approach is described in III. The experiments and results will be reported in section IV. The paper will be concluded in section V.

II. Brief Review of SVM and Radon Barcodes
In this section we briefly review SVM, Radon transform and Radon barcodes.

A. Support Vector Machines (SVM)
Given a set of separable training samples which belong to two different classes, a linear SVM constructs a hyperplane which contains the largest number of samples of the same class on the same side, while achieving the largest distance to the nearest training-data point of any class by the hyperplane [15], [16]. The general form of linear SVM can be denoted as where b is a bias, x i is the training samples (i = 1, · · · , N) and y i = {−1, 1} is the class label where the sample x i belongs. The distance from the closest point to the hyperplane is 1/w. Finding the maximal distance to the closet point, which is called optimal separating hyperplane (OSH), amounts to minimizing w and the objective functions is subject to When the training set is not linearly separable, a set of "slack variables" e and a penalization C for misclassified cases are introduced and the objective function can be written as [17] min under the constraints Given a new sample, the label g can be predicted without explicitly computing w: where α is the Lagrange Multiplier. For multiple classes, the multi-class classifier can be obtained by combining the result of each classifier that denotes a discrimination function f i that delivers positive values to the samples in the same class and negative values for the ones belong to different class. The discrimination function can be written as where w i and b i are the normal in and bias of the hyperplane in the i-th SVM, respectively. For the input new case x, its label can be predicted by multi-class SVM classifier as where K is the number of classes.

B. Radon Transform
The Radon transform is the integral transform which computes the projection of the image along various directions. The Radon transformation was introduced by J. Radon in 1917 [18] as a way of reconstructing a function with the values of its projections in R n space [19]. It is widely applicable to many areas such as computed axial tomography, reflection seismology, barcode scanners and computer vision. The Radon transform of a two-dimensional image f (x, y) can be defined as its line integral along a line inclined at an angle θ and at a distance ρ from the origin [20]: where δ(·) is the Dirac Delta function which is non-zero only on s axis and its integral, and −∞ < ρ < ∞,0 ≤ θ < π. The Radon transform has the capacity to accentuate straightline features from an image by integrating the image intensity over the straight line to a single point [21].

C. Radon Barcodes
As proposed in [14], one can threshold all projection values for individual angles based on a "local" threshold for that angle [22]. Subsequently, one can assemble a barcode of all thresholded projections as depicted in Figure 1 [14]. A simple way for thresholding the projections is to calculate a typical value via median operator applied on all non-zero values of each projection. Algorithm 1 describes how Radon barcodes (RBC) are generated 1 . In order to receive samelength barcodes Normalize(I) resizes all images into R N × C N images (i.e. R N = C N = 2 n , n ∈ N + ). Figure 2 show some sample images from IRMA dataset and their Radon barcodes with 4, 8, 16 and 32 projections applied on input images resized to 64 × 64.

III. The Proposed Method
In this section, the proposed image retrieval procedure is described. Basically, the proposed method is composed of two stages: classification and retrieval. During a training stage, each image in the dataset is normalized to the same dimension and the Radon transform is used to extract the Radon features. SVM classifier is then trained by using the extracted Radon features together with their corresponding class labels. The  Training Stage -Combining with the label that defines the image class, the Radon features are used to train C-support vector multi-class SVM 2 . The multi-class SVM used in this procedure implements the "one-against-one" approach [23], which has been shown to be a very robust and accurate method by Hsu and Lin [24]. The SVM kernel is set to Radial Basis Function. The setting of other parameters is empirical. In the training stage, the Radon projections are binarized to generate a Radon barcode. Algorithm 2 shows the generic overview of the training stage with IRMA dataset.
Retrieval Stage -In the retrieval stage, the query image is normalized by the same approach as applied to training samples, and is processed to generate its corresponding Radon projection and Radon barcode. The Radon projection is then used to assign a class to the image by the multi-class SVM classifier. According to the classified image label, the images within the same category are selected from the database, and the Radon barcode generated from the query image is compared with all images within that class by using the

IV. Experiment and Discussions
In this section we describe the details of the benchmarking data and the error calculation to report the experiments for both classification using SVM with Radon features and retrieval using Radon barcodes.

A. Image Test Data
The IRMA database with a collection of 14,410 x-ray images taken arbitrary form medical routine is used for training and testing [25], [26], [27]. The images represent different ages, genders, view positions and pathologies, which have been classified in 57 categories by scanning body position. A total of 12,677 x-ray images are collected in the training dataset and the other 1,733 images are considered as testing data. For each image in the IRMA dataset, a string of 13 characters with 4 axes named IRMA code is annotated (TTTT-DDD-AAA-BBB) which describes the image modality, body orientations, body region examined and its biological system.

B. Error Measurements
Based on the IRMA code, the error score computation approach which evaluates the retrieval performance is defined as [25] where b i is the number of the possible labels for position i and δ is the Delta function delivering 0 if l i =l i , otherwise 1.

C. Classification Performance
In the IRMA database, some images both in training and testing datasets have missing labels. Thus, the data without labels are ignored. Then, the remaining 12, 631 images in training data (42 non-labeled training images) and 1, 639 images for testing (94 non-labeled testing images) are used in our experiments.
In this paper, we choose k(x, y) = e −ρ x−y 2 2 as the kernel in the experiments and the parameter ρ and the penalization coefficient C of Eq.(4) are set empirically to 0.0359 and 16, respectively. To evaluate the performance of the classifier, the classification accuracy of SVM is defined as Accuracy = |correctly predicted data| |total testing data| × 100%.
The results of classification applied on IRMA dataset with various image sizes and different numbers of projection angles are shown in Table I. The results suggest that the classification accuracy is improved with the increase in the number of Radon projection angles, a result that is consistent with general knowledge in image reconstruction (the more projections the more accurate the image reconstruction). Figures 4 and 5 display the number of images in each class and the classification accuracy for each category, respectively. For some special classes, SVM classifier attains 100% accuracy. However, it can be seen that a high classification accuracy cannot be achieved for every class. Generally, an increase in number of classes may lower the classification accuracy of SVM. Although some images are in the same class, they may still be very difficult to distinguish even for specialists (a consensus may be difficult unless large number of experts evaluate the same images). Figure 6 shows an example for such cases (the first four images are from the training dataset whereas the last four images are from testing). It can also be observed that for some specific classes the classification accuracy is zero or close to zero because there are only a few wrongly classified images in that category or even no image of that class is present in the testing data.   Table I indicating that the increase in the number of projection angles generally leads to a better performance; the relatively better performance can be achieved by 32×32 downsampling and 16 projection angles. Table II provides an overview of reported results in literature [25]. The proposed approach belongs to methods with lower error rates. Of course, a more comprehensive comparison should include speed, memory and implementation ease. The running time for retrieval stage was 51.5 milliseconds per image in our case. Most papers applied on IRMA dataset do not provide any detail in this regard.

D. Image Retrieval Results
Although Camlica et al.'s method [12] rank the first with an error score 146.55 in Table II, their method is rather timeconsuming both for training and retrieval procedure. As this method should create a saliency map from input query and extract the multi-scale LBP features from the created saliency image. The generation of this saliency map, based on our experiments with the original code 3 is quite expensive and takes several seconds for each image.  The method that ranks the second in Table II, is described in [29] and [28]. The method uses many techniques such as dictionary learning, PCA and SVM training, making the algorithm quite complex. It takes approximately 90 minutes for the whole system (training and classification), and 400 milliseconds per query for retrieval on a dual quad-core Intel Xeon 2.33 GHz. Most approaches only report their total error without any specific information about time complexity and memory requirements of their methods. The proposed approach, with a total error of 294.83, ranks in the middle of reported errors for IRMA dataset. However, we have to mention that: 1) We only use one technique (Radon transform) to build the SVM classifier and generate the Radon barcode, which makes our method simple and easy to implement; 2) The memory and storage requirement is very low for our method. For instance, only 80 bytes is needed to store Radon barcode for 32 × 32 normalized image with 20 Radon projections (123 bytes in Matlab due to zeropadding of Radon projections). That is 80 MB for one million images and 80 GB for one billion images; 3) The proposed method only needs 84.49 seconds (parallel Fig. 8. Results of query-by-example experiment for correctly identified query Fig. 9. Results of query-by-example experiment for wrongly identified query computing with 4 workers) for retrieval task for all 1,639 testing images (51.5 milliseconds per image) on a dual quad-core Intel i7 4790 3.60 GHz.

E. Visual Examples
Some query-by-example experiments are implemented in this part. Figure 8 illustrates some samples with correctly classified categories. The images on the left hand side in each row are the original query images and on the right hand side are top 5 retrieved images based on the Hamming distance of the Radon barcodes. The results demonstrate that the proposed method has the ability to retrieve similar images from the same category as long as the class of the query image is identified correctly.
The query-by-example experiment with regard to the wrongly classified samples by SVM are presented in Figure  9. The results show that even if the class of the query images cannot be correctly identified by SVM, the retrieved responses may still be visually similar to the input image. Some of the retrieved images shown in Figure 9 are supposed to be in the same category as the query ones, which implies that more accurate labeling of the dataset will improve the performance of the proposed approach. Therefore, we can conclude that our method depends on the a performance of the classifier but not limited by it.

V. Conclusion
In this work, based on SVM classification and Radon barcodes, a content-based image retrieval method is proposed. The extracted Radon features are used to train a multi-class SVM classifier in order to categorize query images. Radon barcodes which represent the image in a binary format, make it efficient for k-nearest neighbors method to search for similar images. Experimental results demonstrate that the proposed method is able to retrieve similar responses to the correctly identified query and even for the incorrectly classified ones. A better classifier or the improved version of current one will be studied in the future work.