<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Gathering Photos from Social Networks using Semantic Technologies</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>M.B. Alves</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>C. V. Damásio</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>N. Correia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CENTRIA, Universidade Nova de Lisboa</institution>
          ,
          <addr-line>2829-516 Caparica, Portugal. ESTG</addr-line>
          ,
          <institution>Instituto Politécnico de Viana do Castelo 4900-348 Viana do Castelo. CITI, Universidade Nova de Lisboa</institution>
          ,
          <addr-line>2829-516 Caparica</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present a system based on a Semantic Web approach to retrieve photos from events, organizations or even related to semantic concepts using context and social information, without require extra annotation work by the publishers. We make use of the knowledge of the system, represented in ontologies and semantic rules, to allow users search using its own terminology.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The motivation of our work is moving towards an easy searching and browsing
of photos collections as is required by the huge amount of digital photo
collections made available on the web by the photographers in different repositories,
like Facebook, Picasa or Flickr. The gap between the photo information and
the users desire is addressed by us through a Semantic Web approach, namely
by a) associating photo metadata with precisely defined semantics, represented
through ontologies [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and b) through reasoning over this information. In this
work, we describe a system that searches for photos on the web, that can be
tailored to a specific domain like events, organisations, sports. We combine
information that we have in ontologies with the information about the photos,
either photo metadata or contextual information, to retrieve photos of a given
event, from a given person, or in a given place. This system acts as a semantic
mashup of photos collection, in other words, as a personal collection, but in
reality these photos are spread in the web, social networks and photo databases.
Our system requires a knowledge model of the domain, represented by a domain
ontology and by rules. This information model gives to the system knowledge
about the domain, allowing queries in a terminology recognised by the user. As
a result, we are dealing with the semantic gap that exists in multimedia
content [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], the lack of coincidence between the information that can be extracted
from the photo and the meaning of that photo to the human.
      </p>
      <p>This document is organised as follows. In section 2 we present our approach
and we explain how a semantic web approach can meet our purposes in photo
retrieval. In section 3 we detail our system architecture and we explain each
component of the architecture and we finish with the conclusions where we analyze
our work and we present some benchmarking in section 4.</p>
    </sec>
    <sec id="sec-2">
      <title>Semantic Web approach for multimedia retrieval</title>
      <p>
        In our Semantic Web approach we use ontologies to formally describe the
domain. Upper-level ontologies, describing very general concepts that are the same
across all domains, are used to modelling concepts such as Events, Photos, Time,
etc. In this work we have used: Ontology for Media Resources [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], to describe
media resources; LODE [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], ontology for Linking Open Descriptions of Events;
Time ontology [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], FOAF [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for describing persons. Each domain, for which we
want to implement a photo retrieval engine with the approach described in this
work, requires a particular domain ontology to represent the domain-specificities.
We will model the domain ontology using OWL 2 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. To overcome some of the
OWL limitations [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], we also use semantic rules to add expressivity and expertise
to our model, giving support to some object properties, which link individuals
to individuals.
      </p>
      <p>Now, we will illustrate how our Semantic Web approach is used to support
photos retrieval, giving meaning to the content. To simplify reading we will use the
well known prefixes of the used ontologies and the prefix don is our domain
ontology. In our domain ontology, we define an objectProperty isPhotoOfEvent
having as domain ma:Image and as range lode:Event to make the relationship
between photos and events instances. We define some rules to deduce, in our
system, when a given Photo can belong to a given Event. These are general rules
independent of the specific domain. Rule 1 is one of these rules, present using
the syntax Conclusion &lt;- Premises(body atoms).</p>
      <p>Rule 1: (?Photo don:isPhotoOfEvent ?Event)
&lt;(?Photo don:wasTakenAtTimeOf ?Event), (?Photo don:wasTakenInSamePlace ?Event),
(?Person don:isTaggedIn ?Photo), (?Person don:participates ?Event).
With Rule 1, we declare that a given Photo belongs to a given Event if: s1 )
the Photo was taken at the same time of the Event ; s2 ) that Photo was taken
in the same place of the Event ; s3 ) there is at least one Person that was tagged
in the Photo; s4 ) who participated in the Event. The first statement, s1, makes
use of the objectProperty wasTakenAtTimeOf which is supported by rules
to define if a given photo was taken while the event occurred. The isTaggedIn
and participates are also object properties that define if a Person is tagged in a
Photo and if a Person participates in a Event. Notice that Rule 1 cannot be
captured by OWL 2 role inclusion chain axioms.</p>
      <p>In our system, we allow to give a confidence to a relation (real number between
0:0 and 1:0). The RDF reification vocabulary is extended to associate a
confidence to each inferred triple used in search dimensions/values, according to the
following pattern stating that a given Relation between a Subject and an Object
has a given Confidence:
?bn rdf:subject Subject . ?bn rdf:predicate Relation .</p>
      <p>?bn rdf:object Object . ?bn don:confidence Confidence .</p>
      <p>As we can define queries with confidence we can define weaker relations, for
instance between photos and events, and give a confidence to them. This confidence
will be used in ranking the photos.</p>
    </sec>
    <sec id="sec-3">
      <title>System Architecture</title>
      <p>In figure 1 is represented the architecture of our tool. Our system uses the APIs
of Facebook, Flickr and Picasa to retrieve the photos, the information
associated with the photo and the context information. We simply use the
information that we can obtain with the photo and the normal operations that the
users usually perform: tagging photos, with text tags or people, indicate the
place where the photos were taken, or give a name to an album. The
information is extracted from the multimedia databases and is kept in a knowledge
base to support the inference engine. The photos are available to the users
through a web interface that retrieve the photos that answer to the users queries.
ETL process - The Extract,
Transform and Load process (ETL), acts
like a web crawler. The metadata that
we can get from these new photos is
extracted and saved using the
vocabulary specified by the Ontology for
Media Resources. The transform task can
make use of the semantic model and Fig. 1. System architecture of the photos
the rules to do inference and materi- retrieval engine
alize some of the consequences in the
pre-processing task due to performance issues.</p>
      <p>Semantic Model and rules - Each domain has its own vocabulary, the terms
that are recognised by the users. Therefore, a domain ontology must be
developed to represent the application domain, providing the knowledge of the domain
that allows us to achieve a higher precision in the retrieval process. Without a
domain ontology, we couldn’t use these terms as a search dimension/facet.
The query process and the interface - The users make queries through the
Web interface. The system returns the links to the photos that are related to
the queries. These queries are answered using the information kept in the
knowledge base, making inferences from the semantic model and the rules. We have a
semantic model to support the querying. This semantic model is a meta-model
within which the classes of search dimensions are defined in the web interface.
This meta-model, that must be tailored to each different domain, allows the
system to know what must be searched. With this approach, we do not need
any change in code in a new system. Everything is knowledge provided to the
system and everything is kept outside in simple configuration files. As we can
give a confidence to a relation, we can rank the images using the confidence value
of inferred triples.</p>
      <p>
        System details - Our implementation is based on Jena framework1, which offers
an “all-in-one” solution for Java, OWL reasoning, inference and rule engine. We
use Pellet [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] together with Jena to make OWL 2 inference. The TDB component
of Jena is used for RDF storage and query.
1 https://jena.apache.org
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>In this work, we presented a system to retrieve photos using a Semantic Web
approach. Our system uses the context information of the photo or annotations
done by the user and other metadata that can be retrieved from social networks
to combine with the knowledge of the system to classify the photos. The user
can search for photos using its own terminology, creating dynamically its owns
personal collections despite these photos are distributed along the web. . We can
perform this because we have knowledge of the domain and, in this way, we try
to overcome the problem of the semantic gap between the photos information
and the means of that photo to the user.</p>
      <p>The precision and the recall of our system it is an open question, and depends of
each new implemented domain and the requirements. If we want to give relevance
to the precision, we define rules that represent exactly one relationship or, at
most, with a high probability of occurrence. If we want to give relevance to the
recall, we define rules to represent how relationships may happen, even if those
rules bring some fake positive results. As we can introduce a confidence factor
in our rules, we can give relevance to the recall but improving the F1-Score, a
measure that combines precision and recall. Even though precision and recall be
an open question, we performed some benchmarking with a small example using
a Facebook account of a swimming club with 3599 friends. The system focused
on 49 albums and 1148 photos. It were retrieved 431 photos, 425 of which were
distributed over 9 albums. We had 100% precision in the retrieved photos. We
inspected the photos of the swimming club events that were published but that
were not retrieved, achieving a recall of 95,5%. An implementation in a real
situation is on-going work that can be tried at http://www.estg.ipvc.pt/
~mba/SemanticPhotosSearch/.</p>
      <p>The system presented in this work was tailored to be enhanced at production
time. The semantic model and the rules are kept in configuration files. Any
change to these files only requires an re-initialisation of the system. Thus, we
can readily improve our semantic model or our rules, adding new knowledge to
our system or refining the existing one.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Time ontology in OWL. Electronic,
          <year>September 2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>D.</given-names>
            <surname>Brickley</surname>
          </string-name>
          and
          <string-name>
            <given-names>L. Miller. FOAF</given-names>
            <surname>Vocab</surname>
          </string-name>
          .
          <source>Spec</source>
          .
          <volume>0</volume>
          .97. Namespace doc.,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Cuenca</surname>
          </string-name>
          et al.
          <article-title>OWL2: The next step for OWL</article-title>
          .
          <source>Web Semantics</source>
          ,
          <volume>6</volume>
          (
          <issue>4</issue>
          ):
          <fpage>309</fpage>
          -
          <lpage>322</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>T.</given-names>
            <surname>Hofweber</surname>
          </string-name>
          .
          <article-title>Logic and ontology</article-title>
          .
          <source>In The Stanford Ency. of Phil. Spring</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lee</surname>
          </string-name>
          et al.
          <source>Ontology for Media Resources</source>
          <volume>1</volume>
          .0,
          <string-name>
            <surname>Feb</surname>
          </string-name>
          .
          <year>2012</year>
          . W3C Recommendation, http://www.w3.org/TR/mediaont-10/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>B.</given-names>
            <surname>Parsia</surname>
          </string-name>
          et al.
          <source>Cautiously approaching SWRL</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>R.</given-names>
            <surname>Shaw</surname>
          </string-name>
          et al.
          <article-title>Lode: Linking open descriptions of events</article-title>
          .
          <source>In Proc. of the 4th Asian Conf. on The Semantic Web, ASWC '09</source>
          , pages
          <fpage>153</fpage>
          -
          <lpage>167</lpage>
          , Berlin, Heidelberg,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>E.</given-names>
            <surname>Sirin</surname>
          </string-name>
          et al.
          <article-title>Pellet: A practical OWL-DL reasoner</article-title>
          .
          <source>Web Semantics: Science, Services and Agents on the World Wide Web</source>
          ,
          <volume>5</volume>
          (
          <issue>2</issue>
          ):
          <fpage>51</fpage>
          -
          <lpage>53</lpage>
          , jun
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Smeulders</surname>
          </string-name>
          et al.
          <article-title>Content-based image retrieval at the end of the early years</article-title>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>