COMPARING THE PERFORMANCE OF SEMANTIC IMAGE RETRIEVAL USING SPARQL QUERY, DECISION TREE ALGORITHM AND LIRE

The ontology based framework is developed for representing image domain. The textual features of images are extracted and annotated as the part of the ontology. The ontology is represented in Web Ontology Language (OWL) format which is based on Resource Description Framework (RDF) and Resource Description Framework Schema (RDFS). Internally, the RDF statements represent an RDF graph which provides the way to represent the image data in a semantic manner. Various tools and languages are used to retrieve the semantically relevant textual data from ontology model. The SPARQL query language is more popular methods to retrieve the textual data stored in the ontology. The text or keyword based search is not adequate for retrieving images. The end users are not able to convey the visual features of an image in SPARQL query form. Moreover, the SPARQL query provides more accurate results by traversing through RDF graph. The relevant images cannot be retrieved by one to one mapping. So the relevancy can be provided by some kind of onto mapping. The relevancy is achieved by applying a decision tree algorithm. This study proposes methods to retrieve the images from ontology and compare the image retrieval performance by using SPARQL query language, decision tree algorithm and Lire which is an open source image search engine. The SPARQL query language is used to retrieving the semantically relevant images using keyword based annotation and the decision tree algorithms are used in retrieving the relevant images using visual features of an image. Lastly, the image retrieval efficiency is compared and graph is plotted to indicate the efficiency of the system.


INTRODUCTION
The present World Wide Web (WWW) stores the huge amount of data and the capacity of data is increasing in an exponential fashion. Searching the useful information from the huge data is a tedious task in the current Web which is mostly depends on keyword based search. The vector space model is used to retrieve the data stored in the Web. The performance of the system depends on matching the keyword within the available data. Such a model does not consider the semantic information presented in the textual Web pages. Current search engines use an inverted index method for indexing a particular Web page. The textual information about a particular Web page is extracted by crawler. They are simply keywords. The keyword based search Science Publications JCS techniques lacks meaning and relationships among data and thus machines are not able to understand the data.

Drawbacks of Today's Web
The Web contents are stored in Web pages in an unstructured manner. The search engine retrieves the Web pages using the degree of relevance. Most of the results produced by the search engine are irrelevant to the user. The computers are not able understand the data maintained on the Web. In Google and Yahoo search engines, image search is still a problem due to lack of meaning and relationship of the images stored in the Web. Presently, the image is retrieved by using the keyword based search. Therefore, efficient methods are required for image indexing and image retrieval. It can be achieved by means of ontology based image representation and retrieval methods. Hence, the Semantic Web provides the platform for representing the data in a structured way and is used to eliminate the above drawbacks.

Methods to Overcoming the Drawbacks
The search engines simply perform the string comparison operation to find a keyword. It does not have any knowledge to retrieve and display more relevant data to the user. The Web pages are displayed by using the degree of relevance and are not considering the semantic relationship among data. The image search and retrieval is still a great difficulty in the present Web. These problems are rectified when using an ontology structure for the representing the images. This study proposes the method to compare the performance of image retrieval by combining SPARQL query language (Lehmann and Buhmann, 2011) and decision tree algorithm (Gallego et al., 2011) and evaluate the image retrieval performance using precision-recall graph.

Problem Statement
An ontological structure is created for the natural image domain. The images and its high level features are annotated to the ontology along with relationships. The aim of this study is to develop an ontology for image representation and devise a method to retrieve the images using SPARQL query and a decision tree algorithm. The performance is evaluated by means of SPARQL query, decision tree algorithm and Lire system.

Ontology Based Image Retrieval (OBIR)
Ontology is a knowledge representation method. It uses classes and properties for organizing the knowledge and represents the data or image in a structured way. The present search engines represent the image in an unstructured way except XML representation. The images and its features are represented as instances of the classes. The image ontology is constructed by using textual features and relationship among data. The objects present in the image are extracted and these are annotated as keywords (Chih-Fong and Hung, 2008). It is called as keyword based indexing. The high level features of an image are represented as keywords like Name, Creator, Date and Location. The user is allowed to search the image by selecting one, or more, keywords. The visual retrieval (low level) involves retrieval of basic features such as color, texture, shape and object location. Content Based Image Retrieval (CBIR) is an efficient technique when considering visual features of the image and Text Based Image Retrieval (TBIR) is efficient when considering high level data. Both representations do not consider the gap present in human perception of an image. This gap is called as semantic gap which remains as a challenge to be overcome. One possible way to overcome this problem is to represent the image by using the combinations of TBIR and CBIR along with the relationship between the data. This can be done by using ontology structure. The ontology considers the semantic relationship (Gallego et al., 2011) present in the image by using RDF and RDFS. There is still a large semantic gap existing between the visual level and high level image representation. The ontology based image representation is used to reduce the semantic gap exist between visual and high level image representation and used to retrieve images whose content is complicated and partly unknown to the user.
The image ontology construction and semantic search methods are described in section 2. The section 3 discuss about results, discussion and comparative analysis. The conclusion and future work are given in section 4 and section 5 gives the references.

THE ONTOLOGY CONSTRUCTION AND SEMANTIC SEARCH
Image ontology is constructed using class, properties and instances. A class hierarchy is created using a tree structure as shown in Fig. 1. The PROTÉGÉ is used in building a perfect ontological hierarchy and can be used to represent exact interconnection relationships between the classes and properties. The image ontology (Chih-Fong and Hung, 2008) is constructed by using various classes and properties. The class may have a number of subclasses and instances. The instance may belong to one or more classes. All classes are subclasses of owl: Thing which is the root class in the tree hierarchy. The ontology based semantic annotation manages (Magesh and Thangaraj, 2012b) three main elements, namely, ontologies (metadata), documents (image data, or content in unstructured form) and annotations (links between the data and the metadata). The image ontology has two components, namely, the class hierarchy of a domain and the textual description of the domain. The text is further divided into text description (keywords) and visual text description (numerical data for features). The ontology model is made for providing shared semantic interpretation of image contents (Kara et al., 2010). This is used to hold all the necessary information about the images in the ontological database. Figure 2 shows the annotation of the elephant image in the ontological structure (Magesh and Thangaraj, 2011). The labels are used for denoting additional information such as high level features and relationship among data within the image (Pagare and Shinde, 2012). An image and its values are annotated to one or more class by using slots and labels. The class hierarchy enriches the annotations. The image with the same category is easily identified and retrieved by using the features. The mathematical operations like union, intersection, cardinality are applied in the ontology. The semantic image indexing (Zhai and Zhou, 2010) is done by annotating the image to the class. The RDF/XML codes are automatically generated by the protégé. Internally, the annotations are represented as XML/RDF graph structure. The SPARQL query language is applied to the XML/RDF graph (Kara et al., 2010).

Semantic Search
The semantic search is different from ordinary keyword based search. The semantic search (Harish et al., 2011) consists of the construction of a query engine that receives requests in an ontology query language (such as SPARQL), executes them on the ontological structure and returns tuples of values that satisfies the conditions in the query. This method is a Boolean search on RDF graph. Since it is a formal ontological structure, it avoids ambiguity and redundancy. The semantic meaning is identified by performing backtracking on the class hierarchy. The reasoner is used in checking the consistency of data in an ontology and performs semantic reasoning in the ontology (Fadzli and Shi, 2010).
The existing query languages are OntoQL, SPARQL, SeRQL, TRIPLE, RDQL, N3 and Versa. The SPARQL query language has been adopted by the W3C (World Wide Web Consortium) as the means to query ontologies built by using RDF and has been extended to support OWL format (Antoniou and Harmelen, 2004). The ontology guided reasoning is done by using the reasoner like Pallet, FaCT using SPARQL (Fadzli and Shi, 2010).   Fig. 3 shows the image retrieval using two methods. The SPARQL is used to perform text based pattern search and able to retrieve intermediate and high level data. The visual features are not compared by using a text based search process. Moreover, the users don't have the knowledge of visual feature. So the visual features are extracted by using image processing tools. Here, the color and texture features are extracted by using MATLAB and stored in feature vector. These are processed by using a decision tree algorithm.

Semantic Image Retrieval using SPARQL
The SPARQL (Harish et al., 2011) is a query language for ontologies. Semantic searching is done with the help of SPARQL (Kara et al., 2010) query language. SPARQL is an RDF query language which is able to retrieve and manipulate data stored in RDF format. The SPARQL contains capabilities for querying graph patterns along with their conjunctions and disjunctions (Quellec et al., 2010). The results of SPARQL queries can be result sets or RDF graphs (Lassila et al., 2000). The query is specified by using subject, object and predicate which are used in expressing the semantic relationship.
The queries are used to extract high level features stored in the ontology. Each query written in English is to be converted into equivalent SPARQL syntax. It is very difficult to write the SPARQL query manually for expressing visual features of an image.

Semantic Image Retrieval using Decision Tree Method
There are various image retrieval methods that have been applied in various applications. Figure 4 shows the proposed semantic image retrieval system using the decision tree learning method. The statistical properties like mean and standard deviation are taken for representing the low level features since they are invariant to scaling and rotation. The features like color and texture are taken for analysis (Jagtap, 2012).
First, a set of sample attributes is collected for the 20 frequently used concepts as training data. These concepts are used in extracting the images when a partial match occurs. The Poisson distribution is used to convert the visual data to normalized data.

Fig. 4. Semantic image retrieval system
Normalization is used to reduce the depth of the decision tree. The decision tree is trained to remember (Liu, 2008) the set of values. Secondly, the query image is given and it is also trained to the existing values. The training generates tree which is the decision tree classifier. The topmost node in the tree contains the values whose information gain is more. Thirdly, the few classifiers starting from the root are taken. The features of image stored in the ontology are compared with the classifier to find the similarity. The images are retrieved from ontology. The matching produces the relevant images and eliminates the irrelevant images. Finally, the relevant images are displayed after ranking. The search efficiency is improved by using minimum depth and breadth of the tree. This can be achieved by means of balanced splitting of the tree. The operations such as data discretization, pre pruning and post pruning are used to improve the efficiency of decision tree learning (Chary et al., 2011).

Decision Tree Training
The human beings are able to identify a bird or train because they have knowledge of the particular object in their mind. Hence, training is required for adding knowledge to the decision tree. It is called as training the tree. The C 4.5 decision tree algorithm is used in giving the training. The frequently used images such as water, sea, sky, forest, snow, sand, are taken for training. Decision trees can handle high dimensional data. The data splitting is done by using Entropy, Gini index and Information gain. Minimizing the depth of the tree leads to optimum search (Patheja et al., 2012).
By giving an image as a query, the extracted features are added to the training vector and the existing decision tree is trained. The querying image is placed among the existing categories. If there are any ambiguous images, the query image is placed in the closest category of images in the decision tree. The query may be in the form of an image, text-based or combination of two or more categories. The representation of acquired knowledge in the tree form is intuitive and generally easy to assimilate by humans (Ramamurthy and Chandran, 2011).
The final output of the tree is one of 20 images. The nodes which are having large gain value are taken for the analysis. The training generates the classifier. The output of decision tree training is classification rules in the form of if then else structure. The decision tree produces the output which is a logical formulation of Boolean symbols. The SPARQL query is merged with JENA (Iskandar et al., 2008) code, so that it can easily retrieve and process the RDF/XML code stored in OWL file (Huang et al., 2011).

RESULT, DISCUSSION AND ANALYSIS
The semantic ontology model together with image instance data can be used in finding out the relation

JCS
between the selected image and other images in the repository. These images are recommended to the user. Simply, the image retrieval is done by using JENA along with SPARQL.

Querying
The ontological image database is created with a high level and visual features as annotation values. The owl file stores the image and its high level features in RDF form which represent the RDF graph. The similar images from the owl file are retrieved by using two methods. The first method used SPARQL query and the second method uses a decision tree algorithm which also uses SPARQL to retrieve the results.

SPARQL Query to Get The Results
Simpler SPARQL queries are given by using the user interface. The output of the semantic search is shown below: The present Web is not able to answer the queries such as Find red car or Find white bird, since they are lack in understanding the meaning of data or image. The ontology based search is able to give the more relevant answers to the queries because the ontology maintains the knowledge of an image in its background. The inference engine performs back tracking operation on the RDF graph. Hence, it is possible to retrieve background information related to the particular image.

Querying using Decision Tree
Given an unknown image or keyword is given as input to the system. The image attributes are extracted and normalized. The input image is trained through a decision tree algorithm (Magesh and Thangaraj, 2012a). The SPARQL query is merged with JENA code, so that it can easily retrieve the RDF/XML code from the protégé tool. The input and output design was done by using JSP. The result is obtained in string format and it is displayed in another Java server page (JSP). The input is given as image and keyword. The JSP interface design is shown in Fig. 6. The sample output obtained after applying the decision tree algorithm C 4.5 is given in Fig. 7.
The image ontology constructed for 2 000 images. It has 56 concepts (classes and properties) and 19 high level features. The decision tree is trained by using 20 general images.
Since the SPARQL query does not take the image as input, the user interface is designed to get the image. The low level features are extracted and stored in the feature vector. Some normalization is done on the data. The decision tree is trained by using the normalized data (Vashishta and Jain, 2011). Finally the decision tree output is given to SPARQL query.

Integration of SPARQL and Decision Tree
The text-based image search engine and the semantics based system are integrated to improve the performance of pure text-based image search. This proposed algorithm is named False Filtering (FF). A few practical ways are proposed by which FF can be hierarchically integrated with contemporary text-based search engines. In all scenarios, text-based image search results for a given query are obtained first. Then, FF is used to filter out those images which are semantically 'irrelevant' to the query. Figure 5 shows this integration scenario as a block diagram. If the outputs of first five images are given as input to the decision tree algorithm, the image retrieval efficiency is improved (Pushpa and Kokare, 2011).

Precision Vs Recall
In the field of information retrieval, precision is the fraction of retrieved documents that are relevant to the search. Recall in Information Retrieval is the fraction of the documents that are relevant to the query that are successfully retrieved.

Precision Equation 1 and 2:
Number of retrievedimages relevant to thequery precision Total number of images retrieved =

ANALYSIS
Lire (Lucene image retrieval system) is an open source image search system user for comparing the efficiency of the search process. Using equation 1 and 2, the precision and recall values for the query image are calculated for the proposed method. The values in Table 1 represent the Precision and Recall value when using the SPARQL query for text as input. The values in Table 2 represent the Precision and Recall values when using the decision tree algorithm and Lire system for the query image as input. Both precision and recall are based on an understanding and measure of relevance. Figure 8a shows precision and recall graph of SPARQL query. Figure 8b shows the precision and recall graph of a decision tree method and Lire. Specifically, the keywords Red Car and White Bird are identified by the SPARQL using semantic relationship. The keyword based retrieval has achieved the precision as 100% when using the SPARQL query for text data as input.
The decision tree based retrieval has achieved the average precision value as 57% and recall value of 50%. The Lire system has achieved the average precision value of 52% and average recall value of 42%. The precision value has been improved by using ontology because it eliminates the irrelevant images by well defined relationship. Hence, the decision tree based method gives the best performance for low level image retrieval.

CONCLUSION
This study proposes the semantic image retrieval system using SPARQL query and a decision tree algorithm. The domain specific image ontology is created. The high level, semantic based relationships and visual features are taken for analysis. The semantic and high level features are handled by means of the SPARQL query language. The visual features are handled by using a decision tree algorithm. The decision tree algorithm is used to classify the image data in perfect manner. As for as the decision tree algorithm is concerned for visual features, there is improvement in precision and some increase in recall values. The SPARQL gives the best efficiency for keyword based input. The decision tree is more suitable for processing the query image. The combined approach is used to retrieve the relevant images in an accurate manner. The implementation results illustrate, that this type of image retrieval, effectively retrieves the images that are very close to the query image from the ontological database, this could be visualized from the precision and recall plots determined from the retrieval results.
The proposed work can be extended to include time and space complexities algorithms. The decision tree algorithm can be extended to the handling of missing Science Publications JCS data. The pre pruning and post pruning operation on the decision tree can reduce the tree depth to a certain level. If the histogram is used for color representation, the performance can be improved. The ontology can be extended to handle multimedia data. The semantic gap is further reduced by using spatial and temporal relationship present in the objects of the image.