New tool for IIIF relative position, in Wikimedia images, via Wikidata

170 views
Skip to first unread message

Andy Mabbett

unread,
Oct 21, 2018, 5:07:21 PM10/21/18
to iiif-d...@googlegroups.com
My friend Lucas Werkmeister writes, on Wikidata's project chat' page:

https://www.wikidata.org/wiki/Wikidata:Project_chat#New_tool:_Wikidata_Image_Positions
[1]

I built a tool to show image areas indicated by relative position
within image (P2677)
qualifiers: Wikidata Image Positions. It shows you the image (P18)
of a given item
along with all the elements it depicts (P180), according to their
relative position within
image (P2677). Two examples:

The Coronation of Napoleon [2]
Situation Room [3]

[...]


[1] Permalink =
https://www.wikidata.org/w/index.php?title=Wikidata:Project_chat&oldid=769690831#New_tool:_Wikidata_Image_Positions

[2] = https://tools.wmflabs.org/wd-image-positions/item/Q1231009

[3] = https://tools.wmflabs.org/wd-image-positions/item/Q2915674

--
Andy Mabbett
@pigsonthewing
http://pigsonthewing.org.uk

Tom Crane

unread,
Oct 22, 2018, 5:49:22 AM10/22/18
to IIIF Discuss
That's really cool!

A small amount of proxying of the API, and you have Wikidata image content surfaced as IIIF Presentation API, with descriptive annotations for regions of interest.
Is that likely to happen in the codebase itself at some point?

Tom
 

Andy Mabbett

unread,
Oct 22, 2018, 9:21:06 AM10/22/18
to iiif-d...@googlegroups.com
On Mon, 22 Oct 2018 at 10:49, 'Tom Crane' via IIIF Discuss
<iiif-d...@googlegroups.com> wrote:

[New_tool:_Wikidata_Image_Positions]
I know of no plans for that; but we could request it - please see my
email to this list sent 30 August, titled "Wikimedia Foundation
Community Wishlist Survey and IIIF"

https://groups.google.com/forum/?hl=en#!topic/iiif-discuss/lM2G6gacDCU

to which, as yet I have had no replies :-(

I will post a reminder, once I have sent this email.

James Heald

unread,
Oct 22, 2018, 1:24:38 PM10/22/18
to iiif-d...@googlegroups.com
My guess would be yes, but not just yet.

The current big project for the WMF multimedia team is "Structured Data
for Commons" -- integration of a Wikidata-style editable triplestore
database dedicated to describing Commons images, accessible from Commons
file description pages, and also a SPARQL query service.

Once that is in place, a significant following milestone will be to move
existing annotation information to the new system, with new presentation
and editing tools reading/writing from/to it directly.

At the same time, Brion Vibber has been looking at the IIIF annotation
system particularly in the area of audio and video description. This
may be the first area that will go integrated-IIIF, with the media
servers offering an IIIF-compliant multimedia service, and the
structured data system storing media annotations in a way that can be
easily extracted to fill in the relevant blanks in an IIIF manifest.

Whether the resultant player user-interface for the multimedia content
would be IIIF-based, or would access the relevant data and files more
natively I wouldn't know; but I am pretty sure that the hooks would be
in place so that if somebody else wanted to integrate the multimedia
content and its descriptive annotations into an IIIF manifest, that
shouldn't take too much bridging to get to work.

It's unclear at this stage how far out an official Commons IIIF service
for static 2d images may still be. It's certainly on the agenda,
together with bringing in-house the existing image-zoom service,
currently based on a user-space IIP server as back-end (which also
supplies a pilot IIIF image service, but which has been down for at
least a month now). People were talking about that maybe coming perhaps
in the next 12-18 months, but then again it might not.

So probably that makes it unlikely that the new annotation presentation
and editing facility (at least the next generation) will be based on an
IIIF service layer.

But (once some form of IIIF image-service is back up again) it should be
relatively easy to create a service that looks up relevant annotation
information for an image on CommonsData, and sends it back formatted as
a IIIF presentation manifest.

Indeed, for the images that are of artworks that have items on Wikidata
with this information, it should be possible to write such a service
right now, to take a Wikidata ID, and return a IIIF manifest containing
everything with an annotated position within the image.

To be useful, though, that would depend on the WikiCommons IIIF test
service coming back up sometime. And also, this is probably code that
an interested user would need to write for themselves, to demonstrate
the concept and its usefulness, rather than expecting anyone from WMF to
create it -- they're all a bit busy at the moment.

But it would be a good thing to see.

All best,

James.

---
This email has been checked for viruses by AVG.
https://www.avg.com

Tom Crane

unread,
Oct 22, 2018, 4:35:36 PM10/22/18
to IIIF Discuss
Many thanks James.

> it should be possible to write such a service right now, to take a Wikidata ID, and return a IIIF manifest containing everything with an annotated position within the image. 

I'll see what I can do this weekend... :)

> To be useful, though, that would depend on the WikiCommons IIIF test service coming back up sometime.

I think having full level 1 or higher image services would be great: it gives you tiled deep-zoom and arbitrary region derivatives. But I disagree that without that, they are not useful. For example:


This is a proxied hi-res wikimedia image, so takes a few seconds to load. But the source images are available at smaller sizes and could be described in a level 0 image service with a sizes array, as described here: https://gist.github.com/tomcrane/70e879884a744ce69d329cc6a33a34ac#static-image-api

With the available sizes exposed like that, viewers using OpenSeadragon for deep zoom will be able to use the smaller sizes to load more quickly.

In that form and without requiring any new image server infrastructure, these images will work in annotation tools and viewers right now. Another Wikimedia example: https://annotation-studio.digirati.com/examples/generic/custom/#?manifest=https://tomcrane.github.io/wikipedia-to-iiif/Jan_Vermeer_van_Delft_-_Young_Woman_with_a_Pearl_Necklace_-_Google_Art_Project.jpg.json

I think I just need to extend the code I've already written to proxy the annotation information (position) too. So I'll take a look at that this weekend.

Tom

James Heald

unread,
Oct 22, 2018, 4:44:54 PM10/22/18
to iiif-d...@googlegroups.com
On 22/10/2018 21:35, 'Tom Crane' via IIIF Discuss wrote:
> Many thanks James.
>
>> it should be possible to write such a service right now, to take a
> Wikidata ID, and return a IIIF manifest containing everything with an
> annotated position within the image.
>
> I'll see what I can do this weekend... :)

That would be very nice indeed, as are your examples of what can be done
even without a proper IIIF service.

As a stretch goal, a very nice feature on many of Magnus's tools is the
ability to give the text of a SPARQL query as input.

This is then sent off to the Wikidata WDQS sparql service, to return a
list of wikidata items, (conventionally in a column headed ?item), which
the tool then processes accordingly.

To be able to turn a general Wikidata WDQS query into a IIIF manifest
would be very nice. (& would be a very nice present for Wikidata's 6th
birthday).

Cheers,

Tom Crane

unread,
Oct 27, 2018, 12:36:20 PM10/27/18
to IIIF Discuss

Tom Crane

unread,
Oct 27, 2018, 12:57:06 PM10/27/18
to IIIF Discuss
This is a bit rough and could do with some error handling:


That adds enough IIIF support to allow an item to be loaded into Mirador and for Mirador to show the region annotations.

Tom

Tom Crane

unread,
Oct 27, 2018, 1:14:56 PM10/27/18
to IIIF Discuss

Christopher Johnson

unread,
Oct 28, 2018, 7:07:26 AM10/28/18
to IIIF Discuss
Hi,

This is great work.  For reuse, however, one significant aspect is missing from these Wikidata image annotations, provenance.  For example, "User:Shonagon" created the annotations on the Napolean painting.  The web annotation data model provides properties for this.  I would really like to know who made the assertion in Wikidata (or alternatively with a "derivedFrom" reference) and when it was made, so appropriate attribution can be assigned in downstream consumption (i.e. the viewer interface).  "creator" and "created" however are problematic deficiencies in the Wikidata RDF serialization which does not provide statement level provenance from the WIki history (for various technical reasons).  Anonymous annotation assertions are far less useful for scholars than ones that can be sourced with provenance, even if they may be accurate.

Christopher Johnson
Scientific Associate
Universitätsbibliothek Leipzig
Reply all
Reply to author
Forward
0 new messages