Git Product home page Git Product logo

flickr30k-image-viewer's Introduction

Image Annotation Tools

For the Flickr30k dataset

This repository contains all the code you need to look through the Flickr30k images and write notes about them, right in your browser. There are two separate tools: one general tool that I made for the annotation of unwarranted inferences (but that you can also just use to page through the data), and one tool that I made to quickly add tags to a subset of the images. Both tools were made using Flask.

If you use this tool in your research, I'd appreciate it if you cite this paper.

@inproceedings{miltenburg2016stereotyping,
Author = {Emiel van Miltenburg},
Booktitle = {Proceedings of Multimodal Corpora: Computer vision and language processing (MMC 2016)},
Date-Added = {2016-05-15 16:08:52 +0000},
Date-Modified = {2016-05-15 16:11:58 +0000},
Editor = {Jens Edlund and Dirk Heylen and Patrizia Paggio},
Keywords = {ulm2},
Pages = {1-4},
Title = {Stereotyping and Bias in the Flickr30k Dataset},
Url = {http://www.lrec-conf.org/proceedings/lrec2016/workshops/LREC2016Workshop-MCC-2016-proceedings.pdf},
pdf = {http://www.lrec-conf.org/proceedings/lrec2016/workshops/LREC2016Workshop-MCC-2016-proceedings.pdf},
Year = {2016}}

Requirements

  • Flask
  • Python 3 (the code may also work on Python 2, but I only tested it on 3)
  • The Flickr30kEntities dataset (images + descriptions)

Set-up

  • Clone this repository
  • Copy the Flickr30k data to the relevant folders in ./static/
  • Install Flask

General tool

The general tool is very versatile. It features navigation (so you can go to the first, previous, random, next, and last image), and several text boxes for annotation.

The top four input fields are easily modifiable through Javascript (see templates/image_page.html). I made them so that the annotations get written to the larger text area in a standardized (machine-readable) format. Just write down your thoughts in any of the four categories and press Enter. The text area contains everything that will be saved to an external file called comments.txt. When you're done annotating an image, press 'submit' and your annotations are appended to the comments file.

Screenshot of the image viewer tool

Start this tool by running python image_viewer.py on the command line. Python will then serve the image viewer at http://127.0.0.1:5000/.

Subset tagger

This tool is useful if you want to quickly tag a portion of the data, for example a sample of the files that contain the word 'baby'. Here is how to use this tool:

  1. Write all the relevant file IDs to a .txt file in the noun_files directory. E.g. baby.txt.

  2. Start this tool by running python annotate_selection.py on the command line. Python will then serve the image viewer at http://127.0.0.1:5000/.

  3. Enter the file name in the 'Submit file' window:

Screenshot of the subset annotation tool

  1. Start tagging. The tool will automatically add new tags that you enter in the 'other' text box.

Screenshot of the subset annotation tool

flickr30k-image-viewer's People

Contributors

evanmiltenburg avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.