(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Annotating images through command line tools

Description: The tutorial demonstrates cv_mech_turk2 command line tools - the easiest way to annotate images in bulk.

Keywords: mturk, images

Tutorial Level: BEGINNER

Next Tutorial: Annotating images through ROS action

Prerequisites

  • This tutorial requires existing annotation server

  • We need a user account on the server. The user must be in mt-api-users group.
  • We need an existing session on the server (e.g. my-first-session).

You can get these by following the server installation tutorial or by asking the server manager for a user account.

Building

To compile all necessary tools, simply make cv_mech_turk2 package.

rosmake cv_mech_turk2

Creating auth.txt

Create "~/.ros/.mech_turk/auth.txt" file and put the user credentials for the "default" server:

default: {
  server: SERVER_URL,
  user: my_user,
  pwd: MY_USER_PASSWORD
}

This auth file will allow us to use --server=default (or omit the --server) in all command line tools.

Submitting images

Choose a folder with jpeg images. Call cv_mech_turk2/submit_images and submit them to the annotation server:

cd MY_IMAGE_FOLDER
rosrun cv_mech_turk2 submit_image.py --session=MY_SESSION *.jpg

The images will be uploaded to the server and immediately posted on Mechanical Turk. They will appear in the sandbox or production depending on the setting of the session.

We can wait for the annotations to come back or do the annotations ourselves. After some of the annotations are available, we can download them:

rosrun cv_mech_turk2 session_results.py --session=MY_SESSION --filter=none

By default, only verified results are downloaded. By setting filter=none, we request that all results are retrieved.

The data will be stored in "results/MY_SESSION/images" and "results/MY_SESSION/annotations".

Wiki: mech_turk_ros/Tutorials/Annotating images through command line tools (last edited 2010-02-22 19:19:38 by AlexSorokin)