<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sotirios Alpanis on Medium]]></title>
        <description><![CDATA[Stories by Sotirios Alpanis on Medium]]></description>
        <link>https://medium.com/@sotiriosa?source=rss-2790b2d17309------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nM60fSeIxsblY4a0MKiabA.jpeg</url>
            <title>Stories by Sotirios Alpanis on Medium</title>
            <link>https://medium.com/@sotiriosa?source=rss-2790b2d17309------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:11:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sotiriosa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Primary source ransom note generator]]></title>
            <link>https://medium.com/cogapp/primary-source-ransom-note-generator-f9e8031c78e0?source=rss-2790b2d17309------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9e8031c78e0</guid>
            <category><![CDATA[iiif]]></category>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[multilingual]]></category>
            <dc:creator><![CDATA[Sotirios Alpanis]]></dc:creator>
            <pubDate>Wed, 08 Jun 2022 11:17:17 GMT</pubDate>
            <atom:updated>2022-06-08T11:17:17.037Z</atom:updated>
            <content:encoded><![CDATA[<p>During a Friday afternoon Slack conversation over an expresso with Cogapp’s Director of Fun, Tristan Roddis, I made the following off-hand comment:</p><blockquote>“IIIF newspaper ransom notes would be cool”</blockquote><p>…and with that our fate for CogHack 19 was sealed. We decided to make a fully IIIF-compliant ransom note generator. <a href="https://cogapp-psrng.netlify.app/">Try it yourself</a> or read on for more details.</p><p>After some further brain-storming we came up with the following brief: a web app that allows a users to type a demand and then return a composite image of virtual “newspaper clippings” that spelled out the message. These clippings are derived from images made available with IIIF manifests and search capabilities. We also agreed that we wanted to make the web app multi-lingual.</p><figure><img alt="Pencil sketch of the screen layout" src="https://cdn-images-1.medium.com/max/1024/1*fL6g1yLc8x8VvNcMITfHJQ.jpeg" /><figcaption>Sketch of the interface we were aiming for</figcaption></figure><p>Our application was built using the JavaScript library React: mostly because it allowed us to get up and running quickly, provided the tools to grab and manipulate the data we needed from the various IIIF API endpoints and has great options for hosting on various platforms (we have used Netlify).</p><p>By way of preparation, we gathered a list of IIIF manifests that also listed a IIIF Content Search service, and organised them by language (more on that below).</p><h4>The IIIF Content Search API, with an example</h4><p>Perhaps the most under-utilised of the IIIF APIs is the <a href="https://iiif.io/api/search/1.0/">Content Search specification</a>. This adds an extra layer to the Presentation API, aiming to help make textual resources more discoverable. For example, text-rich resources are often subject to OCR and the Content Search API provides a format to make the results of this available, matching each word identified to regions within an image. Here’s an outline of the process, with an example from the Arabian Gulf Digital Archive (AGDA) to better illustrate how it works:</p><ul><li>Each digitised file on AGDA has a IIIF Presentation manifest that describes the make up of the file, including a list of image canvases and URLs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TjumTFAC_Q8EBjn8yBf_fQ.png" /><figcaption>A snippet showing a Canvas, taken from this IIIF manifest: <a href="https://www.agda.ae/en/catalogue/tna/fo/371/109817/iiif/manifest">https://www.agda.ae/en/catalogue/tna/fo/371/109817/iiif/manifest</a></figcaption></figure><ul><li>The Presentation manifest also crucially contains a link to the Content Search API endpoint, which can be suffixed with a query e.g. ?q=best</li><li>If there are any matches for the search term then another list of canvases will be returned. Each Canvas will match an entry in the Presentation manifest, appended with some coordinates e.g. <a href="https://www.agda.ae/en/catalogue/tna/fo/371/109817/iiif/canvas/31#xywh=1818,801,87,41">https://www.agda.ae/en/catalogue/tna/fo/371/109817/iiif/canvas/31#xywh=1818,801,87,41</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*lUJbxzR3NULlGvMrtSQ73g.png" /><figcaption>Snippet showing the beginning of list of the canvas returned by <a href="https://www.agda.ae/en/catalogue/tna/fo/371/109817/iiif/search?q=best">https://www.agda.ae/en/catalogue/tna/fo/371/109817/iiif/search?q=best</a></figcaption></figure><ul><li>By searching for the matched canvas in the Presentation, and amending the image URL to include the coordinates an image of the matched word is returned e.g. <a href="https://images.agda.ae/iiif/tna/fo/371/109817/c9e2fa6a-d76f-471a-8350-1ec64a041d91.jp2/full/full/0/default.jpg">https://images.agda.ae/iiif/tna/fo/371/109817/c9e2fa6a-d76f-471a-8350-1ec64a041d91.jp2/1818,801,87,41/full/0/default.jpg</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/89/1*n8CCfsQw6G2fp7xk6Edz2A.png" /></figure><p>That four step process is the engine that powers our application: a user enters a message and the app looks for each word and returns any matches that are found. Once we had established that, we added a few extra features:</p><h4>1. Fallback options</h4><p>Where a word can’t be found, there’s a fall back option which searches each letter individually and attempts to create a composite image from the results. In practice this can often look a bit discombobulated. However, the beauty of IIIF means that by simply adding more manifests to search, allows the coverage to easily be extended.</p><figure><img alt="Screenshot of the word ‘Sotirios’ accompanied by an image of each letter" src="https://cdn-images-1.medium.com/max/284/1*cqE6G1j72w0f91koccaVcw.png" /><figcaption>Searching for each letter individually can match unusual words</figcaption></figure><h4>2. Find an alternative match</h4><p>Sometimes the images returned might not be a perfect match, for example sometimes a word like ‘all’ might return a match within a longer word such as ‘<a href="https://iiif.wellcomecollection.org/image/b28047771_0042.jp2/1151,2759,150,60/full/0/default.jpg">gallop</a>’. Therefore, where more than one match is found, the app allows the user to request a randomised replacement.</p><figure><img alt="Screenshot of the word ‘all’ matching a variety of other words" src="https://cdn-images-1.medium.com/max/600/1*5vkxdVTSrAEmTX5eiAZKMg.png" /><figcaption>‘all’ can match lots of things, but you can choose an alternative</figcaption></figure><h4>3. The first ‘I’ is for International</h4><p>We were keen to try and honour the international-ess central to the IIIF ethos. So using the React i18next framework (<a href="https://www.i18next.com/">https://www.i18next.com/</a>) we added the facility to switch languages. As well as updating the text displayed in the browser, it also updates the manifests that are being searched to the appropriate language subset. This meant we were able to offer both French and Arabic language interfaces and documents to search.</p><figure><img alt="Screenshot of the French phrase for ‘give me money’" src="https://cdn-images-1.medium.com/max/460/1*8aifAgcf8p7wBuCUBGLVYg.png" /><figcaption>En français</figcaption></figure><figure><img alt="Screenshot of the Arabic phrase for ‘happy ramadan’" src="https://cdn-images-1.medium.com/max/306/1*rR5KsrXaR38_F7YRUQnYMA.png" /><figcaption>بالعربية</figcaption></figure><h4>Further features/improvements</h4><p>Here’s some things we might do to extend and/or improve the application:</p><ul><li>complete the IIIF loop and create a Presentation manifest from your results, so that you can share your ransom demands safe in the knowledge they’re fully standards-compliant</li><li>add more languages and manifests to improve the vocab coverage.</li><li>allow users to add their own manifests to search</li></ul><p>You can <a href="https://cogapp-psrng.netlify.app/">try out the primary source ransom note generator</a> online or <a href="https://github.com/CogappLabs/psrng">download and adapt the source code</a> for your own nefarious ends.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*HMY8FV8rdCP0bSyS-CfU0Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9e8031c78e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/primary-source-ransom-note-generator-f9e8031c78e0">Primary source ransom note generator</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Good Neighbours]]></title>
            <link>https://medium.com/cogapp/good-neighbours-2525e59a0b82?source=rss-2790b2d17309------2</link>
            <guid isPermaLink="false">https://medium.com/p/2525e59a0b82</guid>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[heritage-connector]]></category>
            <dc:creator><![CDATA[Sotirios Alpanis]]></dc:creator>
            <pubDate>Thu, 02 Dec 2021 10:51:25 GMT</pubDate>
            <atom:updated>2026-10-26T15:04:23.080Z</atom:updated>
            <content:encoded><![CDATA[<p>For this hack day project, I was inspired by the <a href="https://www.sciencemuseumgroup.org.uk/project/heritage-connector/">Heritage Connector</a>’s ability to make new and interesting links between museum objects. This also brought to mind social media (and more specifically, Twitter), which has great potential to connect people, but in practice can often be an alienating experience.</p><p>You can <a href="https://hc-twitter-neighbours.herokuapp.com/">try out the app for yourself</a> or read on for more details.</p><p>Taking some inspiration from the excellent <a href="https://twitter.com/VandA_Bot">V&amp;A bot</a> from a previous Cogapp hack day, I set about making an app that would find Twitter users who had shared items from the Science Museum, then invoke the power of the Heritage Connector to offer them the chance to explore more objects that neighboured the one that they had shared.</p><p>The basis of the app is a lightweight flask app which retrieves information from Twitter, the Science Museum and the Heritage Connector and makes it available to the React-based front end. Initially, I had hoped to get away with doing everything from the React app front-end. However, the Twitter API does not support calls made from a browser. I had never used Flask before, but because of my familiarity with Python I was eager to give it a go, and thankfully its clear documentation and quick start guide allowed me to get up and running with relative ease.</p><p>The React app part made up of two main pages:</p><blockquote>1. Home</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*u9srqNqf_PYmcTKQcuwrpA.png" /></figure><p>A page that displays all the most recent Tweets that contain a link to an object from the Science Museum. Each tweet is a link that launches you onto the second type of page in the app…</p><blockquote>2. Tweet page</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*ABSaMoYiRgEWCn4madYTNA.png" /></figure><p>This page takes the selected tweet as the basis for a journey to explore the Science Museum ‘neighbourhood’. To begin with, the page shows information retrieved from the Science Museum, via its api, about the object linked to.</p><h3>Welcome to the neighbourhood</h3><p>The page provides three options for visiting neighbouring items of the object:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/147/1*3Zf8eP-unbsrYasBlFKRzg.png" /></figure><p>These options are built off the back of the Heritage Connector’s <a href="https://d0rgkq.deta.dev/docs#/default/get_neighbours_neighbours_post">neighbours API</a>. This endpoint returns a specified number of neighbouring items, along with a ‘distance’ score, which indicates how closely related the neighbour is to the original item. For this app, I requested up to 500 neighbours, and sorted the result by distance. I then mapped the closest, median and furthest neighbours to the three buttons above.</p><p>Each time one of the buttons is pressed the page reloads, re-processes and re-presents the three options for the neighbouring object selected. This offers the opportunity for a virtually infinite wander through the vast neighbourhood of objects. You can see a demo video of the final system below:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Flivid.com%2Fembed%2F7ebTXDPV28Zw&amp;display_name=Livid&amp;url=https%3A%2F%2Flivid.com%2Fwatch%2F7ebTXDPV28Zw&amp;image=https%3A%2F%2Fapi.livid.com%2Fv1%2Fthumbnails%2Fthumbnails%252Fa843fbee-51da-40f8-b4fe-df304d832578%252F0b429115-1eb1-4d59-bdc9-dd2c0fb33e72.jpg&amp;type=text%2Fhtml&amp;schema=livid" width="800" height="450" frameborder="0" scrolling="no"><a href="https://medium.com/media/8560468a309955c58252a0a10b09bab1/href">https://medium.com/media/8560468a309955c58252a0a10b09bab1/href</a></iframe><h3>Potential for future development</h3><ol><li>Send some tweets: I had hoped to square the circle, and automate a response to those people sharing Science Museum objects that would include a link to the app inviting them to explore their object’s neighbourhood.</li><li>Make links more explicit: no, not in that way. Try to give a better and clearer insight into what it is that links the selected neighbour and its parent object.</li><li>Include V&amp;A objects: at the moment the tweets returned on the home page of the app are all related to objects from the Science Museum. The Heritage Connector includes material from the V&amp;A, so it would be great to include objects from their collection too.</li></ol><p><em>For more technical details, see the source code at </em><a href="https://github.com/CogappLabs/hc_twitter-neighbours"><em>https://github.com/CogappLabs/hc_twitter-neighbours</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2525e59a0b82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/good-neighbours-2525e59a0b82">Good Neighbours</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Colorising historical material using AI]]></title>
            <link>https://medium.com/cogapp/colorising-historical-material-using-ai-7069d6996f26?source=rss-2790b2d17309------2</link>
            <guid isPermaLink="false">https://medium.com/p/7069d6996f26</guid>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[deoldify]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[iiif]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Sotirios Alpanis]]></dc:creator>
            <pubDate>Thu, 29 Jul 2021 14:40:32 GMT</pubDate>
            <atom:updated>2021-07-29T14:40:32.972Z</atom:updated>
            <content:encoded><![CDATA[<h4>Can a machine convert black and white photos into colour?</h4><h3>Introduction</h3><p>During my previous life at the British Library, I worked on the <a href="https://www.bl.uk/projects/british-library-qatar-foundation-partnership">BL/QFP</a> and helped to oversee an end-to-end digitisation project that made primarily British colonial records from the Persian Gulf available online, on the <a href="http://qdl.qa/">Qatar Digital Library</a> (QDL). It was while I worked here that some of my colleagues had undertaken some ‘manual’ digital colorisation of material from the QDL. This involved <a href="https://www.danielloveday.com/">Dan Loveday</a>, a member of the imaging team taking advice from one of the subject specialists, and using his photoshop skills to add historically accurate colour to pictures that were originally captured in black and white.</p><p>Here’s the original image as displayed on the QDL (links to this and all other digitised images are in the captions):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*zsiF8LwewImwRxBYkwSK2g.png" /><figcaption>Original image- <a href="https://www.qdl.qa/en/archive/81055/vdc_100023619120.0x000028">https://www.qdl.qa/en/archive/81055/vdc_100023619120.0x000028</a></figcaption></figure><p>Here’s the manually colorised version, which took at least a couple of hours to get looking so good:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*wilxu1aEaZK9Nynu9PlJ3g.png" /><figcaption>Colorised image: <a href="https://blogs.bl.uk/.a/6a00d8341c464853ef022ad3968d6b200c-500wi">https://blogs.bl.uk/.a/6a00d8341c464853ef022ad3968d6b200c-500wi</a> which is taken from this <a href="https://blogs.bl.uk/digital-scholarship/2019/02/the-british-library-qatar-foundation-partnership-imaging-hack-day-part-2.html">blog post</a>.</figcaption></figure><p>Around the same time, I became aware of the <a href="https://deoldify.ai/">Deoldify project</a>. The project took colour photographs, made them black and white and used this data set to train a machine learning model, so that it would be able to accurately reverse the process, i.e. to colorise pictures that were originally black and white.</p><p>This provided the inspiration for my hack day project. I set out to build a process that would use the deoldify AI model and apply it to any image that we at Cogapp might work with during our day jobs of making so many wonderful collections available online.</p><h3>Cogapp Refinery Services</h3><p>Over the past couple of weeks I have been working on <a href="https://www.cogapp.com/refinery">Cogapp Refinery Services</a>. In the course of doing so, I have been utilising the Serverless framework and applying it within an Amazon Web Services (AWS) environment. As a result, I saw the opportunity to add another string to the CRS bow: automated AI colorisation.</p><p>Here is an overview of the proposed new operation:</p><ul><li>an image is added to AWS, which triggers a script written in Python</li><li>this script makes a call to the <a href="https://deepai.org/machine-learning-model/colorizer">deeperai.com colorisation API</a> that Deoldify helped to build</li><li>the API returns a colorised image, which is downloaded to AWS and a ptif is generated</li></ul><p>Throughout my initial testing I used images taken from the Art Institute of Chicago (ArtIC). Mostly because I liked their recently relaunched site, and the quality of their cataloguing meant that it was really straightforward to find black and white photos. Here is a selection of some of the pictures I put through the new operation, with some comments on why.</p><p>Many of the results were really impressive, particularly those with human figures:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*etCsFFXrSsBGMcbz_LNURA.png" /><figcaption><a href="https://www.artic.edu/artworks/67958/identical-twins-roselle-n-j">https://www.artic.edu/artworks/67958/identical-twins-roselle-n-j</a></figcaption></figure><p>The deoldify project had been particularly keen to address any potential bias in their training sets to help ensure that the results were accurate for people of all races. An area that many machine learning models has failed under-represented and marginalised people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9KuD6gT8hUT8FST8ayw8qA.png" /><figcaption><a href="https://www.artic.edu/artworks/239053/untitled">https://www.artic.edu/artworks/239053/untitled</a></figcaption></figure><p>Some of the results were presumably accurate, but the colourised version failed to add any new perspective:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E9zogIrdqE286HHLhKqBOg.png" /><figcaption><a href="https://www.artic.edu/artworks/101017/untitled">https://www.artic.edu/artworks/101017/untitled</a></figcaption></figure><p>Other results were thankfully more visually striking:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1_A5QJJCpXxbIpNxSgAPA.png" /><figcaption><a href="https://www.artic.edu/artworks/184293/352-kashimagawa">https://www.artic.edu/artworks/184293/352-kashimagawa</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ZutbYFybCxfJfbKikSx2g.png" /><figcaption><a href="https://www.artic.edu/artworks/205224/frederick-sommer">https://www.artic.edu/artworks/205224/frederick-sommer</a></figcaption></figure><p>I was also interested in seeing how the AI would interpret pieces that were never intended to have colour added to them, including these two pencil drawings by Andy Warhol:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oVtmFJrRFjAj_WC9zFjVVg.png" /><figcaption><a href="https://www.artic.edu/artworks/181189/flowers-black-and-white">https://www.artic.edu/artworks/181192/flowers-black-and-white</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*maJ4CR9gpaIo3erMKn-BzQ.png" /><figcaption><a href="https://www.artic.edu/artworks/181189/flowers-black-and-white">https://www.artic.edu/artworks/181189/flowers-black-and-white</a></figcaption></figure><p>In addition to the examples taken from ArtIC, I picked a couple from the Arabian Gulf Digital Archive, here is a royal visit to Al Ain in 1979:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SjjA5Fj5Iksfiz7LbiiJzg.png" /><figcaption><a href="https://www.agda.ae/en/catalogue/na/na/0042/00001039">https://www.agda.ae/en/catalogue/na/na/0042/00001039</a></figcaption></figure><p>Here is a picture of the hospital in Abu Dhabi from 1967</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yYKrgtMLhAXwqsURHxUOhA.png" /><figcaption><a href="https://www.agda.ae/en/catalogue/na/na/0042/00000653">https://www.agda.ae/en/catalogue/na/na/0042/00000653</a></figcaption></figure><h3>Man Vs Machine</h3><p>Finally, to square the circle, I used the QDL image that helped to inspire this project in the first place. As can be seen below the results are largely comparable to the ‘original’ colorised version. Although there is the notable and visually striking exception of the gold detailing which wasn’t picked out by the AI model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gIWp6df1PwDQ00fpzmPm1Q.png" /></figure><h3>What Next?</h3><p>Following on from the hack day, I plan on building this out into a fuller application. I see an opportunity to utilise IIIF compatibility, and build a web interface that allows users to link to a black and white IIIF compliant image, and then view it side-by-side with its newly colorised counterpart. Inevitably, I’ll call it the Coloriiiser.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7069d6996f26" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/colorising-historical-material-using-ai-7069d6996f26">Colorising historical material using AI</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>