Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Computer Vision Model

Daniel Ecer edited this page Jul 27, 2017 · 17 revisions

Overview

The following sections describe the computer vision model and current results in more detail.

Problem Description

For the computer vision task, we've prepared an image of the PDF page, as well as the annotated areas.

From the input (image of PDF page):

Example Input

We expect the model to learn the 'annotated' image:

Annotated Areas

That is problem is typically referred to as 'semantic segmentation' (or sometimes just image segmentation).

Training Data

So far we have used the PMC_sample_1943 dataset, containing a manuscript for 1943 different journals. A copy is available from the GROBID End-to-end evaluation.

We have trained the model on about 600 of those manuscripts and tested the model on other manuscripts of the same dataset.

These are PDFs from publishers, i.e. been through production, so are more structured already than author versions. Good to start training model on these as well-structured and we have the publisher’s XML. Ultimately, for pipeline to be useful for converting author PDFs, such as on preprint server, into XML for text mining, we will need to continue to train the model on author-submitted PDFs. These have more variety in their structure, plus the accompanying metadata are more variable. First, we need a good model from the best data we have (publisher side).

Current Model

The model is currently based on the pix2pix model (and it's TensorFlow Model).

Treating the annotation as a regular RGB image, we already get fairly good results on first samples: Training computer vision to predict PDF annotation using RGB images

Here, pink is used for ‘main paragraph’ (with preceding section header), whereas purple is used for ‘section paragraph’ (with preceding section header). The model works noticeably better for the first test sample.

To find the manuscript title, we would look for the blue coloured area. One issue we might encounter is that the blue (and other colours) will be shaded and sometimes mix with other colours.

But while mixing red (abstract) and blue (manuscript title) would result in purple (paragraph), that relationship doesn’t make any sense for the annotation (abstract + manuscript title != paragraph) itself.

To address this issue, we could use separate output channels. For example we could assign the R, G, B channels each a class, as follows: red for abstract, green for doi (identifier), and blue for title.

RGB as output channels

The alternative is to use more channels, and assign each channel to a specific tag.

separate output channels

The model itself is not limited to RGB but can also handle say 20 channels.

In preliminary tests comparing this multi-channel method against the RGB method, it is not clear which method is preferable. But using separate channels allows us to get probabilities out of the model.

The multi-channel method has been able to learn the manuscript title block fairly well, here coloured in blue, for this first sample, but it is predicting a larger area than is accurate for the second sample.

Results for the 'manuscript title' channel

In the case of the ‘abstract’ channel, here identified with red, we can see that the multi-channel method still wrongly identifies the first paragraph in sample two as an abstract, as it did for the RGB method too.

Results for the 'abstract' channel

The ‘author’ channel also proves difficult. In this case, the RGB method was better than the multi-channel method. It may be that we need to use a higher resolution input image.

Results for the 'author' channel

Combining all the channels together gives us a general overview. This image isn’t useful for further processing, however, as individual channels are required to identify separately tagged blocks.

Combined results for separate channel

Next Steps

The model requires further adjustments to work better with the separate channels, as it is now a pixel classification task.

We also need to measure the model quantitatively.

Similar Work

SegAN: Adversarial Network with Multi-scale $L_1$ Loss for Medical Image Segmentation paper which uses a similar approach. It appears to be using separate discriminators (which may not scale so well). Instead we may want to share weights.

Semi and Weakly Supervised Semantic Segmentation Using Generative Adversarial Network may also be interesting. Although it doesn't use the term discriminator in the traditional sense (as detailed in the paper itself).

Clone this wiki locally