## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Annotating images through command line tools ## multi-line description to be displayed in search ## description = The tutorial demonstrates cv_mech_turk2 command line tools - the easiest way to annotate images in bulk. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link=[[mech_turk_ros/Tutorials/Annotating images through action|Annotating images through ROS action]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = mturk, images #################################### <<IncludeCSTemplate(TutorialCSHeaderTemplate)>> <<TableOfContents(4)>> == Prerequisites == * This tutorial requires existing [[mech_turk_ros/Tutorials/Installing annotation server| 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 [[mech_turk_ros/Tutorials/Installing annotation server| 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". ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE