Skip to content

Download annotations

Alastair Porter edited this page Nov 10, 2017 · 9 revisions

Download .json files with the annotations into server export folder

To dump the annotations in the DB into files we use a Django management command. In order to run it fist ssh into asplabserver like:

ssh asplab@asplab-web1.s.upf.edu

Then move to the similarity-annotator directory:

cd asplab-configuration/similarity-annotator

And finally run the command:

docker-compose run --rm web python manage.py download_annotations _data_set_name_

This will create the same directories structure of the uploaded data set and will create a .json file per each sound in the following format:

{
  "dimension 1":[
    {
      "start_time": 1,
      "end_time": 2,
      "ref_start_time": 1,
      "ref_end_time": 2,
      "similarity":
      {
        "username 1": 1,
        "username 2": 3
      }
    },
    {
      "start_time": 2,
      "end_time": 3,
      "ref_start_time": 2,
      "ref_end_time": 3,
      "similarity":
      {
        "username 1": 4,
        "username 2": 2,
        "username 3": 2
      }
    }
  ],
  "dimension 2":[]
}

Copy annotation files into your local machine

Finally, if you wan to copy the annotation files into your local machine we recommend you use rsync. As the directories structure is maintained you can move to the directory in your local machine in which you have the data set and run:

rsync -r asplab@asplab-web1.s.upf.edu:/mnt/asplab-web/asplab-shared/similarity-annotator/export/_data_set_directory_name_ .
Clone this wiki locally