Digitalia at summer school of document analysis & recognition (SSDA2018-TC10/TC11)

Digitalia project participated to the #SSDA2018 conference, where aim was to gather up researchers who work with document analysis of various materials, and this time the seminar consisted of roughly 40 people, from all over the world.

Summer school was started with Jean-Marc Ogier, who set the table with interesting examples of past and present in document analysis and how the change in media cause new research fields to appear. From digitized materials to born-digital, from physical signatures to online signatures and so forth, which enable also capturing new information. presented the International Association for Pattern Recognition (IAPR) working groups. There IAPR TC-10 is Technical Committee on Graphics Recognition  and IAPR TC-11 is about Reading Systems. Finland is part of the IAPR via the Pattern Recognition Society of Finland.

There was also an introduction round to the L3i laboratories, where various researchers gave us bit of time and presented their work via demos. We got a glimpse of equipment that was used in the lab, and various research done at the lab.

One demo was about segmentation and text capturing of comics , i.e. recognition of individual panels and then the text and also characters who is speaking in the comic. The material for which it was developed were various online comics and some digitized ones. It was patterns all the way, first detecting contours of the panel, then the characters, and also the speech balloons, which were also then processed in order to get the text from the balloons.

Second demo was about transcribing video, the system picked 1 frame from each second of the given input video, and it then transcribed both the content on the captured image and also the audio. Then with help of search engine it was possible to find certain text just via search.

One demo was done as an experiment to monitor the traffic in the harbor. The system detected the moving ships coming or leaving : it detected the boat from the moving image and thusly enabled creation of statistics, how many boats arrived and how many left. This worked in real-time, highlighting boat in the video feed, but also mapping them to the map of the harbor area, which could be very useful in a dashboard. Second live video feed system recognized faces, and aimed to capture sentiments, for example : surprised, content . There were 6 basic feelings, which the system gave ‘bars’ based on the probability.

Bart Lamiroy from University of Lorain talked about familiar concern “Honest, Reproduciple Reporting of Results is Difficult … an Analysis and some Good Practices” about how to do good research and how to spot it when you see it. There the familiar issues, which software, various modules and how fast things change, make it harder for the next researcher to reproduce the results – there are many tiny details, which the publication might not include and there also the tenet of “publish and perish” can create pressures for the researchers, which make them unable to use enough time to documentation, which could be invaluable for the next reader.

Andreas Fischer from University of Fribourg, Switzerland then took the participants to the structural methods of handwriting analysis. Their research team had worked e.g. with George Washington’s letters from Library of Congress. In the Lab the Diva Services http://divaservices.unifr.ch/data attempted to create a platform where a researcher could give data/methods for other researchers to use, thus easing the amount of software needed to be installed to own machine. Diva Services enable processing remotely via specified APIs, first researcher can upload documents (i.e. page images) to the service and then call API of a method and to get results via that api. Very nifty idea of a system and one more implementation for these analysis systems for researchers. Currently can be used for small experiments as the service is currently powered by one machine at the moment. Anyhow enough so that one participant could use its methods to distinct between different Japanese script characters, which in the end won her the excellence award of the summer school.

Poster session

Poster session was also eye-opening – so different kinds of problems where machine learning was used when possible. There were OCR issues, very fragile materials like palm leaves, script and languages for which there does not even exist unicode fonts. Also team sizes varied, some were alone in their university, but then in one lab there was 25 people doing research. In any case, hearing about research done elsewhere was interesting, and some things need to be followed later on, too.

 

Deep Neural Networks and data

Seiichi Uchida from Kyushu University (Japan) walked us in to the deep neural networks in document analysis and actively promoted the thinking to go beyond 100% accuracy. His slides can be viewed from below:

 

Vincent Poulain-d’Andecy from YOOZ (France) gave the industrial talk with multitude of examples of all kinds of document types and formats we actually live with. For example IAPR’s TC10 and TC11 has a number of datasets, which researchers can use as a baseline to check the capabilities of own algorithm, against given data set , thusly giving a joint baseline and benchmark which can help in evaluating how well a specific algorithm works.

David Doermann from University of Buffalo (USA) talked about the Document Forensics in document analysis, and about the current situation, where images, videos and audio can be created in such a way, that a real thing can be impossible to distinct from a fake. He defined the terminology, and gave various examples from different centuries how forgeries and tamperings have been tried, and on the other hand how they are and were being prevented. A comporting thought anyway was that :

“It only takes one piece of inconsistent evidence to prove something is not authentic”

 

He highlighted also how unique each persons handwriting actually is, as each writer has hard time to change ingrained habits, as he mentioned that letter design, spacing and proportions rarely change, and for untrue cases, there are properties which experts can follow.

Marçal Rusiñol from CVC, Universitat Autònoma de Barcelona,Spain told the details of Large-scale document indexing, going bit deeper how the indexing actually works. He had good points on how to make things work to the end-user, i.e. how to improve human computer interaction, and how to rank documents about semantic similarity for a query which goes bit beyond just the search word given by the user.

Dimosthenis Karatzas from CVC, Universitat Autònoma de Barcelona,Spain then talked about urban world and the scene text understanding – how to detect text from noisy and vibrant environment, which is important as he said that over 50% of urban imaginery contains text in some form.  Turned out that trick is in a way in a context, text has some typical features like alignment and characters, which make them distinct even if the observer would not necessarily know the language in question. Many machine-learning algorithms are suitable for the word and object spotting, but the desire was to get to higher level to the true information spotting. There the idea is that machine could answer questions like “what is the price of a 1 litre of milk” from any shop. For this they had generated simulated 3D traffic environment where the autonomous cars can be immersed to various weather, and traffic simulations to test it and now the idea was to create simulated “supermarket” where before mentioned information spotting could be trained upon.

Jean-Yves Ramel, Lifat, University of Tours (France)  talk was titled “Interactive approaches and techniques for Document Image Analysis” compared the computer vision and the document image analysis problems and solutions, which turned out to have quite a many similarities. He highlighted the service aspect of a tool or algorithm, it would be beneficial to let domain experts to fine-tune the algorithms and define parameters, which are meaningful in certain context. By introducing the user, which in fact is the other researcher, would enable them to do more, in a limited time, with a given dataset. In short, researcher should be part of the defining of services which are meant for them to ensure that the features and data is available as needed.

Jean-Christophe Burie from University of La Rochelle kept then the last talk and a workshop where the idea was to experiment with comics, and their segmentation to the speech bubbles. This was one of the demos of the tour of the L3i laboratory of the university so it was interesting to experiment with it even for a short while. Python, opencv, were in use for the image segmentation, and Tesseract was used for then extracting the text part from the speech balloons in the comics.

 

OCR:n korjauksen testiaineistoa

Tekstintunnistus https://digi.kansalliskirjasto.fi – palvelussa pohjautuu ALTO XML tiedostoihin, jotka digitoinnin jälkikäsittelyohjelmisto luo digitoiduista sivukuvista. OCR eli Optical Character Recognition, on menetelmä jolla tekstintunnistusta tehdään. Aina välillä saamme kyselyitä siitä kuinka sivuja tehdään, korjataan ja pääsisikö sivutekstejä  korjaamaan. Alta näet esimerkin kuinka korjaus onnistuisi käsin.

OCR:n korjausta

Erityisesti fraktuurasivut, joita on tehty aiemmilla ohjelmistoversioilla sisältävät virheitä johtuen monimaisista syistä. Ilman automaattista korjausta, käsin korjaaminen menisi näin:

Etsi haluamasi sivu, esim. https://digi.kansalliskirjasto.fi/sanomalehti/binding/431884?page=1&ocr=true ja tallenna sivun oikeasta laidasta ALTO XML-linkistä XML-muotoinen sivu.
XML-tiedostossa on rakenteinen tiedostomuoto, jossa kukin sana löytyy riviltään näin, jossa CONTENT-osio kertoo sanan, tai sanan alun jos kyse on taivutetusta sanasta.

Avaa XML-tiedosto sitten koneellasi jollakin tekstieditorilla kannattaa etsiä editori (esim. Visual Studio Code), joka osaa XML-muodosta korostaa eri osat, niin käsittely helpottuu.

Jos alkuperäisessä XML tiedostossa on rivi näin:

String ID="P1_ST00016" HPOS="1975" VPOS="1102" WIDTH="79" HEIGHT="31" CONTENT="Gräs" WC="0.90" CC="3111"/>

Sen korjaus vaatisi, että saisimme tuon XML tiedoston siten, että CONTENT-kohdassa on sana niin kuin sen pitäisi olla, eli esim.

String ID="P1_ST00016" HPOS="1975" VPOS="1102" WIDTH="79" HEIGHT="31" CONTENT="Eräs" WC="0.90" CC="3111"/>

Muina sääntöinä voisi mainita, että XML-tiedoston pitää vastata lehdessä olevaa kirjoitusasua, esim. w-kirjainten käyttö tulee säilyttää, eli pysytään vanhassa kirjoitusasussa. Ja jos lehdessä on kirjoitusvirhe, se tulisi jättää, jotta aineisto pysyy autenttisena ja oikeana.

Jos tällainen kiinnostaisi, laita viestiä tai kokeile itse. XML:n editointiin on myös oma verkkotyökalunsa, jota voisi jatkokehittää jos tällainen kiinnostaisi, esim. kesähupitöinä mahdollisten sadekelien varalta. OCR-korjauksen testiaineistoksi korjatut XML-tiedostot olisi kullan arvoisia ja lisäksi mahdollisesti jo niitä voisi suoraan tuoda jatkossa digiin näytettäväksi alkuperäisen sijasta ja toimisi testiaineistonakin.

Muita avun tapoja.

Digitalkoot-väki voi osallistua myös testaamalla digin seuraavaa versiota https://digi-testi.kansalliskirjasto.fi -osoitteessa, ja lähettämällä palautetta, jos jokin ei näyttäisi toimivan odotetusti. Lisäksi leikkeiden teosta on hyötyä, koska niiden avulla löytyy kiinnostavia teemoja, joita voi jatkaa eteenpäin. Jos käytät palvelua, niin kerro toki siitä eteenpäin muillekin, niin saamme lisää käyttöä ja siten vaikuttavuutta suomalaiselle kulttuuriperinnölle.

Lisäksi jos haluat liittyä Kansalliskirjaston ystäviin, lisätietoja Kansalliskirjaston ystävätoiminnasta löydät verkkosivuiltamme, https://www.kansalliskirjasto.fi/fi/lahjoita

 

Poikkea vapaakappalekirjastoon

Perinteisenä kesäkauden muistutuksena, tiedoksi, että Kansalliskirjaston tallettamia erilaisia kulttuuriperintöaineistoja on saatavissa kuudessa yliopistokirjastossa ympäri Suomen. Näissä kirjastoissa, erityisissä kulttuuriperintötyöasemilla on mahdollista lukea, selata ja hakea kaikkea digitaalista aineistoa: lehtiä, aikakauslehtiä, kirjoja ja myös tv- ja radioaineistoa KAVI:n arkistoista.

 

Digitalia-projekti kävi esittäytymässä vapaakappalekirjastojen päivillä 29.5. ja samalla kerrottiin uusista aineistoista ja toiminnoista, joita mm. Digitalia-projektin tutkimuksen myötä on digi.kansalliskirjasto.fi-palveluun toteutettu. Uusina aineistoina voi mainita esimerkiksi kaikkialla auki oleva Rajamme Vartija-lehti, mutta kävimme myös läpi tämän vuoden digitointilistaa Kansalliskirjaston Digitoimme nyt-sivun avulla. Esimerkiksi jos vaihdat digissä hakutulokset ‘Viimeisimmät ensin’ näet listassa ‘Sosialisti’ -lehteä, joten jos haluat uppoutua uuteen aineistoon johon tutkijat eivät vielä ehkä ole tarttuneet, niin nämä “uusvanhat” lehdet ovat hyvä valinta.

 

Aineistoja esiin tutkimuksen avulla

Tänään sananvapauden päivänä on hyvä muistaa myös mitä hyötyjä tutkimuskäytöstä aineistoille tulee. Tutkimus voi löytää aineistoista, erityisesti suurista kokonaisuuksista, uusia tapoja tulkita historiaamme ja tuoda historiallisia aineistoja paremmin esille. Vaikka tutkimuksella on omat lähtökohtansa, tutkimus yleensä tuo aineistoistakin esille kiinnostavia puolia, joita ehkä itse aineistoa koonnutkaan ei välttämättä huomaa.

Helsingin yliopiston digitaalisten ihmistieteiden kurssin projektityönä on ollut tapana järjestää hackathon, jossa onkin tietojenkäsittelytieteen ja humanististen ja muiden opiskelijoiden yhteistyönä luotukin kiinnostavia kokeiluja ja saatu väitöskirjoja alkuun.

Eräänä vuonna tutkittiin sosialismin tuloa Suomeen, jossa tehtiin kiinnostavia visualisointia sosialistisesti suuntautuneiden lehtien termistöstä suhteessa kaikkiin lehtiin. Tämän ryhmän tuotos sai sen verran huomiotta, että pääsi myös vuoden 2015 Open Finland Challengen finalistiksi

Termin toistuvuuden aikajana – sosialistiset lehdet

DHH16:sta sanomalehtiin löytyi taas kiinnostuneiden ryhmä ja tällöin tutkittiin vuosisadan alun siirtolaisuutta Suomesta Amerikkaan ja verrattiin tätä siirtolaisuuden tilastoihin ja aiempaan tutkimukseen, tutkien sekä artikkeleita että mainoksia.

Sanomalehtiryhmän työn otos DHH16

Vuoden 2017 DHH hackathonissa sanomalehdistä tutki kuinka aineistoista voisi tunnistaa runoutta, jotka olivat 1900-luvun alun sanomalehti- ja aikakauslehtiaineistoissa yleistä, mutta joita ei ole erikseen aineistosta poimittu. Apuna toimi mm. artikkelihakemisto, jossa joitakin runoja oli jo listattuna, jota käytettiin opetusaineistona muiden runojen löytämiseksi.

 

Tämän vuoden hackathon DHH18 on jo suunnitteilla ,joten on jälleen kiinnostavaa nähdä mistä aiheista ja aineistoista osallistujat kiinnostuvat. Ylemmistä esimerkeistä löytää hieman enemmän tietoa DHH15 , DHH16 ja DHH17-blogauksista, joista löytyy myös linkit hackathonin aikana kehitettyihin koodeihin.

Antaisitko sinä aineistojasi louhittavaksi hackathoniin? Mitä aineistoa toivoisit?