Code Monkey home page Code Monkey logo

vatic's Introduction

Please Note

Intel has created an excellent annotation tool with the latest technologies. https://github.com/opencv/cvat

The project below is archived, and no further updates are expected.

2009 to 2020

VATIC - Video Annotation Tool from Irvine, California

VATIC is an online video annotation tool for computer vision research that crowdsources work to Amazon's Mechanical Turk. Our tool makes it easy to build massive, affordable video data sets.

INSTALLATION

Note: VATIC has only been tested on Ubuntu with Apache 2.2 HTTP server and a MySQL server. This document will describe installation on this platform, however it should work any operating system and with any server.

Download

You can download and extract VATIC from our website. Note: do NOT run the installer as root.

$ wget http://mit.edu/vondrick/vatic/vatic-install.sh
$ chmod +x vatic-install.sh
$ ./vatic-install.sh
$ cd vatic

HTTP Server Configuration

Open the Apache configuration file. On Ubuntu, this file is located at:

/etc/apache2/sites-enabled/000-default

If you do not use Apache on this computer for any other purpose, replace the contents of the file with:

WSGIDaemonProcess www-data
WSGIProcessGroup www-data

<VirtualHost *:80>
    ServerName vatic.domain.edu
    DocumentRoot /path/to/vatic/public

    WSGIScriptAlias /server /path/to/vatic/server.py
    CustomLog /var/log/apache2/access.log combined
</VirtualHost>

updating ServerName with your domain name, DocumentRoot with the path to the public directory in VATIC, and WSGIScriptAlias to VATIC's server.py file.

If you do use Apache for other purposes, you will have to setup a new virtual host with the correct document root and script alias, as shown above.

Make sure you have the mod_headers module enabled:

$ sudo cp /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled

After making these changes, restart Apache:

$ sudo apache2ctl graceful

SQL Server Configuration

We recommend creating a separate database specifically for VATIC:

$ mysql -u root
mysql> create database vatic;

The next section will automatically create the necessary tables.

Setup

Inside the vatic directory, copy config.py-example to config.py:

$ cp config.py-example config.py

Then open config.py and make changes to the following variables in order to configure VATIC:

signature       Amazon Mechanical Turk AWS signature (secret access key)
accesskey       Amazon Mechanical Turk AWS access key (access key ID)
sandbox         If true, put into Mturk sandbox mode. For debugging.
localhost       The local HTTP address: http://vatic.domain.edu/ so it
                matches the ServerName in Apache.
database        Database connection string: for example,
                mysql://user:pass@localhost/vatic
geolocation     API key from ipinfodb.com for geolocation services

If you do not plan on using VATIC on Mechcanical Turk (offlien mode only), you can leave the signature and accesskey empty.

After saving results, you can then initialize the database:

$ turkic setup --database

Note: if you want to reset the database, you can do this with:

$ turkic setup --database --reset

which will require confirmation to reset in order to prevent data loss.

Finally, you must also allow VATIC to access turkic, a major dependency:

$ turkic setup --public-symlink

ANNOTATION

Before you continue, you should verify that the installation was correct. You can verify this with:

$ turkic status --verify

If you receive any error messages, it means the installation was not complete and you should review the previous section. Note: If you do not plan on using Mechanical Turk, you can safely ignore any errors caused by Mechanical Turk.

Frame Extraction

Our system requires that videos are extracted into JPEG frames. Our tool can do this automatically for you:

$ mkdir /path/to/output/directory
$ turkic extract /path/to/video.mp4 /path/to/output/directory

By default, our tool will resize the frames to fit within a 720x480 rectangle. We believe this resolution is ideal for online video viewing. You can change resolution with options:

$ turkic extract /path/to/video.mp4 /path/to/output/directory
  --width 1000 --height 1000

or

$ turkic extract /path/to/video.mp4 /path/to/output/directory
  --no-resize

The tool will maintain aspect ratio in all cases.

Alternatively, if you have already extracted frames, you can use the formatframes command to format the video into a format that VATIC understands:

$ turkic formatframes /path/to/frames/ /path/to/output/directory

The above command will read all the images in /path/to/frames and create hard links (soft copy) in /path/to/output/directory.

Importing a Video

After extracting frames, the video can be imported into our tool for annotation. The general syntax for this operation is:

$ turkic load identifier /path/to/output/directory Label1 Label2 LabelN

where identifier is a unique string that you will use to refer to this video, /path/to/output/directory is the directory of frames, and LabelX are class labels that you want annotated (e.g., Person, Car, Bicycle). You can have as many class labels as you wish, but you must have at least one.

When a video is imported, it is broken into small segments typically of only a few seconds. When all the segments are annotated, the annotations are merged across segments because each segment overlaps another by a small margin.

The above command specifies all of the required options, but there are many options available as well. We recommend using these options.

MTurk Options
    --title         The title that MTurk workers see
    --description   The description that MTurk workers see
    --duration      Time in seconds that a worker has to complete the task
    --lifetime      Time in seconds that the task is online
    --keywords      Keywords that MTurk workers can search on
    --offline       Disable MTurk and use for self annotation only

Compensation Options
    --cost                  The price advertised to MTurk workers
    --per-object-bonus      A bonus in dollars paid for each object
    --completion-bonus      A bonus in dollars paid for completing the task

Qualification Options
    --min-approved-percent  Minimum percent of tasks the worker must have
                            approved before they can work for you
    --min-approved-amount   Minimum number of tasks that the worker must 
                            have completed before they can work for you

Video Options
    --length        The length of each segment for this video in frames
    --overlap       The overlap between segments in frames
    --use-frames    When splitting into segments, only the frame intervals
                    specified in this file. Each line should contain a
                    start frame, followed by a space, then the stop frame.
                    Frames outside the intervals in this file will be
                    ignored.
    --skip          If specified, request annotations only every N frames.
    --blow-radius   When a user marks an annotation, blow away all other
                    annotations within this many frames. If you want to
                    allow the user to make fine-grained annotations, set
                    this number to a small integer, or 0 to disable. By
                    default, this is 5, which we recommend.

You can also specify temporal attributes that each object label can take on. For example, you may have a person object with attributes "walking", "running", or "sitting". You can specify attributes the same way as labels, except you prepend an ~ before the text, which bind the attribute to the previous label:

$ turkic load identifier /path/to/output/directory Label1 ~Attr1A ~Attr1B
  Label2 ~Attr2A ~Attr2B ~Attr2C Label3 

In the above example, Label1 will have attributes Attr1A and Attr1B, Label2 will have attributes Attr2B, Attr2B, and Attr2C and Label3 will have no attributes. Specifying attributes is optional.

Gold Standard Training

It turns out that video annotation is extremely challenging and most MTurk workers lack the necessary patience. For this reason, we recommend requiring workers to pass a "gold standard" video. When a new worker visits the task, they will be redirected to a video for which the annotations are already known. In order to move on to the true annotations, the worker must correctly annotate the gold standard video first. We have found that this approach significantly improves the quality of the annotations.

To use this feature, import a video to be used as the gold standard:

$ turkic load identifier-train /path/to/frames Label1 Label2 LabelN
  --for-training --for-training-start 0 --for-training-stop 500
  --for-training-overlap 0.5 --for-training-tolerance 0.1
  --for-training-mistakes 1

You can also use any of the options described above. Explanations for the new options are as follows:

--for-training              Specifies that this video is gold standard
--for-training-start        Specifies the first frame to use
--for-training-stop         Specifies the last frame to use
--for-training-overlap      Percent overlap that worker's boxes must match 
--for-training-tolerance    Percent that annotations must agree temporally
--for-training-mistakes     The number of completely wrong annotations 
                            allowed. We recommend setting this to a small,
                            nonzero integer.

After running the above command, it will provide you with an URL for you to input the ground truth annotation. You must make this ground truth annotation as careful as possible, as it will be used to evaluate future workers.

You can now specify that a video should use a gold standard video:

$ turkic load identifier /path/to/output/directory Label1 Label2 LabelN
  --train-with identifier-train

When a not-yet-seen worker visits this video, they will now be redirected to to the training video and be required to pass the evaluation test first.

Publishing Tasks

When you are ready for the MTurk workers to annotate, you must publish the tasks, which will allow workers to start annotating:

$ turkic publish

You can limit the number of tasks that are published:

$ turkic publish --limit 100

Running above command repeatedly will launch tasks in batches of 100. You can also disable all pending tasks:

$ turkic publish --disable

which will "unpublish" tasks that have not yet been completed.

If you have videos that are offline only, you can see their access URLs with the command:

$ turkic publish --offline

Note: for the above command to work, you must have loaded the video with the --offline parameter as well:

$ turkic load identifier /path/to/frames Person --offline

Checking the Status

You can check the status of the video annotation server with the command:

$ turkic status

This will list various statistics about the server, such as number of jobs published and how many are completed. You can get even more statistics by requesting additional information from Amazon:

$ turkic status --turk

which will output how much money is left in your account, among other statistics.

When all the videos are annotated, the last line will read:

Server is offline.

Retrieving Annotations

You can get all the annotations for a video with the command:

$ turkic dump identifier -o output.txt

which will write the file "output.txt" where each line contains one annotation. Each line contains 10+ columns, separated by spaces. The definition of these columns are:

1   Track ID. All rows with the same ID belong to the same path.
2   xmin. The top left x-coordinate of the bounding box.
3   ymin. The top left y-coordinate of the bounding box.
4   xmax. The bottom right x-coordinate of the bounding box.
5   ymax. The bottom right y-coordinate of the bounding box.
6   frame. The frame that this annotation represents.
7   lost. If 1, the annotation is outside of the view screen.
8   occluded. If 1, the annotation is occluded.
9   generated. If 1, the annotation was automatically interpolated.
10  label. The label for this annotation, enclosed in quotation marks.
11+ attributes. Each column after this is an attribute.

By default, the above command will not attempt to merge annotations across shot segments. You can request merging with the command:

$ turkic dump identifier -o output.txt --merge --merge-threshold 0.5

The --merge-threshold option is optional, but it is a number between 0 and 1 that represents much the paths must agree in order to merge. 1 specifies a perfect match and 0 specifies no match. In practice, 0.5 is sufficient. Merging is done using the Hungarian algorithm.

You can also scale annotations by a factor, which is useful for when the videos have been downsampled:

$ turkic dump identifier -o output.txt -s 2.8

or force it to fit within a max dimension:

$ turkic dump identifier -o output.txt --dimensions 400x200

or force it to fit within the dimensions of the original video:

$ turkic dump identifier -o output.txt --original-video /path/to/video.mp4

The command can also output to many different formats. Available formats are:

--xml       Use XML
--json      Use JSON
--matlab    Use MATLAB
--pickle    Use Python's Pickle
--labelme   Use LabelMe video's XML format
--pascal    Use PASCAL VOC format, treating each frame as an image

The specifications for these formats should be self explanatory.

Visualizing Videos

You can preview the annotations by visualizing the results:

$ turkic visualize identifier /tmp --merge

which will output frames to /tmp with the bounding boxes with the file name as the frame number. The visualization will contain some meta information that can help you identify bad workers. You can remove this meta information with the option:

$ turkic visualize identifer /tmp --merge --no-augment

If you want to make a video of the visualization (e.g., with ffmpeg), it is useful to renumber the frames so that they start counting at 0 and do not have any gaps:

$ turkic visualize identifier /tmp --merge --renumber

If you wish to display the class label and their attributes next to the box, specify the --labels option:

$ turkic visualize identifier /tmp --labels

Compensating Workers

When you are ready, you can compensate workers:

$ turkic compensate --default accept

which will pay all workers for all outstanding tasks. We strongly recommend paying all workers regardless of their quality. You should attempt to pay workers at least once per day.

Finding Jobs

If you have found a small mistake in a video and want to make the correction yourself, you can start an annotation session initialized with the MTurk workers annotations:

$ turkic find --id identifier
$ turkic find --id identifier --frame frame

where identifier is the identifier for the video and frame is the frame number that the error occurs. In most cases, this command will return one URL for you to make the corrections. If it outputs two URLs, it means the frame number occurs in two overlapping segments, and so you may have to make changes to both of the segments. You can also omit the frame argument, in which case it will output all URLs for that video.

If you want to find the HIT id, assignment ID, or worker ID for a particular video, specify the --ids parameter to the vet command:

$ turkic find --id identifer --ids
$ turkic find --id identifer --frame frame --ids

will print a list of all the IDs for the video. If the corresponding segment has been published and completed, it will list three strings: the HIT ID, assignment ID, and the worker ID. If the job has been published but not finished, it will just list the HIT ID. If the job has not yet been published, it prints "(not published)".

Additionally, if you want to find the job that corresponds to a particular HIT ID, you can use the find command:

$ turkic find --hitid HITID

Quality Control

The gold standard does a "pretty good" job of weeding out bad workers. Nonetheless, there will always be bad workers that we must identify and invalidate. Our tool provides a method to sample the annotations provided by workers, which you can then manually verify for correctness:

$ turkic sample /tmp

which by default will pick 3 random videos that the worker has completed, and pick 4 random frames from each of those videos, and write visualiations to a file in /tmp. You can tweak the number of videos and the number of frames with the options:

$ turkic sample /tmp --number 3 --frames 4

Moreover, you can only look at work from a certain date:

$ turkic sample /tmp --since "yesterday"

The filename will follow the format of WORKERID-JOBID.jpg. Once you have identified a mallicious worker, you can block them, invalidate ALL of their work, and respawn their jobs with the command:

$ turkic invalidate workerid

The options are also available:

--no-block      invalidate and respawn, but don't block
--no-publish    block and invalidate, but don't respawn

You can also invalidate and respawn individual jobs with the command:

$ turkic invalidate --hit hitid

Listing all Videos

You can retrieve a list of all videos in the system with:

$ turkic list

If you want just the videos that have been published:

$ turkic list --published

If you want just the videos that have been worked on:

$ turkic list --completed

If you instead want the videos that are used for gold standard:

$ turkic list --training

Finally, if you just want to count how many videos are in the system, use the --count option, in combination with any of the above:

$ turkic list --count
$ turkic list --published --count

If you want statistics about each video, then give the --stats option:

$ turkic list --stats

Managing Workers

You can list all known workers with the command:

$ turkic workers

which will dump every worker with the number of jobs they have completed. You can also use this command to block and unblock workers:

$ turkic workers --block workerid
$ turkic workers --unblock workerid

You can also search for workers by the first few letters of their ID:

$ turkic workers --search A3M

Deleting a Video

You can delete a video at any time with:

$ turkic delete identifier

If the video has already been annotated (even partially), this command will warn you and abort. You can force deletion with:

$ turkic delete identifier --force

which will REMOVE ALL DATA AND CANNOT BE UNDONE.

REFERENCES

When using our system, please cite:

Carl Vondrick, Donald Patterson, Deva Ramanan. "Efficiently Scaling Up
Crowdsourced Video Annotation" International Journal of Computer Vision
(IJCV). June 2012.

FEEDBACK AND BUGS

Please direct all comments and report all bugs to:

Carl Vondrick
[email protected]

Thanks for using our system!

vatic's People

Contributors

cvondrick avatar hepek avatar marcovzla avatar nikhil-kasukurthi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vatic's Issues

Installation instructions broken for Ubuntu 14.04 in many ways.

I have burned an entire workday failing to get vatic installed on a virgin Ubuntu 14.04 system.

There are many helpful comments online with solutions to individual problems here and on stack overflow, but once more than a few things are broken, I think someone who knows what they're doing with this python web app stuff needs to go through the whole process on a virgin machine and update the instructions.

Turkic Publish Issue in Vatic Offline mode without using Anaconda Distribution

Hi

I am facing issue to use vatic in offline mode. I am not using any anaconda distribution. The url generated by the command "turkic publish --offline" throws server error message.

The command "turkic status --verify" gives the following output:

Configuration:
Sandbox: True
Database: mysql://root@localhost/vatic
Localhost: http://localhost/

Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing
Testing access to database server... OK
Testing access to web server... OK

One or more tests FAILED!

My /etc/apache2/sites-enabled/000-default.conf file is as follows.

WSGIDaemonProcess www-data
WSGIProcessGroup www-data
<VirtualHost *:80>

ServerName vatic.domain.edu

ServerAdmin webmaster@localhost

DocumentRoot /var/www/html

    DocumentRoot /VA2/vatic/public
    WSGIScriptAlias /server /VA2/vatic/server.py
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

turkic status gives the following output:

Configuration:
Sandbox: True
Database: mysql://root@localhost/vatic
Localhost: http://localhost/

Status:
Available: 253
Published: 0
Completed: 0
Compensated: 0
Remaining: 0

Server is offline.

I will be waiting for any suggestion. Thanks in advance. Regards Arpan Ghose

Smart shot splitting

Is it possible segment the video based on the scene of the video. For example, if the background of one video does not change, your code currently still split the videos into segments with each having about 330 frame, but it would be better to just segment it into one piece, so you don't have to initialize all the objects again and again for all the segments.

This is entirely possible and I think a worthwhile addition. We should be smarter in how we split up videos. I think there is some neat future work in this domain that would be impactful: you could imagine trying to split up each shot so that we each segment is the same amount of work. (We still need to split up shots for constant background, though, for MTurk).

How to request VATIC to not to split a video into multiple temporal-segments

For some reason I do not want video to split up (temporally) into multiple batches -> and then later merge annotations using Hungarian merge.
Therefore my query - How can I request Vatic to not to split up the video into multiple chunks ?
To add to it - I am fine with one worker on one video.
Thanks!

"Gold Standard Training" video not showing up for new turkers

I set up a "worker training" video:

turkic load train_video /path/train_video.mp4 Car
    --blow-radius 1 
    --for-training 
    --for-training-start 0 
    --for-training-stop 300
    --for-training-overlap 70 
    --for-training-tolerance 70 
    --for-training-mistakes 1

...and I annotated train_video in the UI.

Then, I set up an ordinary video for a worker to annotate... and notice that I do --train-with train_video:

turkic load new_video /path/new_video.mp4  Car 
    --length 300
    --blow-radius 1 
    --title "Label the cars in this video (15sec of video). Per-object bonus." 
    --description "Draw boxes around the cars in this video. When the cars move, you move the boxes. See 'show instructions' in the HIT. Feel free to email us with questions." 
    --duration 600 
    --lifetime 604800 
    --keywords "video, tagging, annotation, cars" 
    --cost 0.05 
    --per-object-bonus 0.02 
    --completion-bonus 0.1
    --train-with training_video

In the worker sandbox, I tried 2 things:

  1. Login as myself and look at the HIT. Instead of seeing train_video, I immediately see new_video.
  2. Perhaps I've annotated my own tasks in the worker sandbox before. So, I created a new worker account. With my new account, I still immediately see new_video instead of train_video.
  3. I tried using mturk.com instead of the worker sandbox. The training video does show up here. But, the training video appears with my ground truth annotations on it! This can't be right...

Questions

  • Am I doing something wrong -- how do I get new workers to see the training video first (in the worker sandbox)?
  • I'd like to grep the server.py logs for the output "Swapping actual segment with training segment". I tried initializing the logger in server.py to dump debug info to a file... but this debug file doesn't appear when a user loads a task.
  • On mturk.com, how do I avoid having the turker see the ground truth annotations for my training video?

Truncation flag

Original: is it possible to include the option "truncated" in the software? It is different from "occluded", and which will be a useful annotation information also. I saw PASCAL data has both option. Just some random thought

Specific implementation: allow workers to draw outside of the view frame, and then we can easily generate a truncation flag.

turkic setup --database question

When I run turkic setup --database
It occurs:
vipa@VIPA:~/software/vatic$ turkic setup --database
/usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /home/vipa/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Traceback (most recent call last):
File "/usr/local/bin/turkic", line 4, in
import('pkg_resources').run_script('turkic==0.2.5', 'turkic')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1438, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/EGG-INFO/scripts/turkic", line 16, in
turkic.cli.main()
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 147, in main
handler(args[1:])
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 47, in init
self(parser.parse_args(args))
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 470, in call
self.database(args)
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 455, in database
database.install()
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/database.py", line 45, in install
Base.metadata.create_all(engine)
File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/schema.py", line 3614, in create_all
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1842, in _run_visitor
File "/usr/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1835, in _optional_conn_ctx_manager
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2026, in contextual_connect
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2065, in _wrap_pool_connect
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1395, in _handle_dbapi_exception_noconnection
File "build/bdist.linux-x86_64/egg/sqlalchemy/util/compat.py", line 199, in raise_from_cause
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2061, in _wrap_pool_connect
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 337, in connect
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 644, in _checkout
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 439, in checkout
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 964, in _do_get
File "build/bdist.linux-x86_64/egg/sqlalchemy/util/langhelpers.py", line 60, in exit
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 961, in _do_get
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 284, in _create_connection
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 410, in init
File "build/bdist.linux-x86_64/egg/sqlalchemy/pool.py", line 538, in connect
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/strategies.py", line 89, in connect
File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line 377, in connect
File "build/bdist.linux-x86_64/egg/MySQLdb/__init
.py", line 81, in Connect

File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 187, in init
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: NO)")

Installation issue non-root user on linux

The README specifies "do NOT run the installer as root." Is there any specific reason for this? I do not have root permissions on my system and hence the .sh wont be allowed to run. Thanks for your help.

End of frame lost bug

after I saved my annotation, when I reload the segment, for the last frame of that segment, some bounding boxes which are annotated "lost" still appear, which should not be so.

IOError: cannot identify image file '/tmp/pyvision-ffmpeg-7204250/1.jpg'

I am facing kind of serious error in running
turkic extract /home/bee/Desktop/omnomstori_Dy5g5Vjl.mp4 /home/bee/Documents/VATIC/vatic

Besides giving the error as IOError: cannot identify image file '/tmp/pyvision-ffmpeg-7204250/1.jpg', seriousness is the command removes whole parent folder /home/bee/Documents/VATIC/vatic from the computer without trace. For instance the command removed the whole document folder from my computer when I ran the command as turkic extract /home/bee/Desktop/omnomstori_Dy5g5Vjl.mp4 /home/bee/Documents. Luckily I was trying to install in a fresh ubunut 14.04.3, there were not much importatnt files in it. I have another instance of Ubunut with vatic running perfectly, I followed all the steps done in that insatnce and is based on anaconda virtual environment containing following libs.

anaconda-client==1.1.2
clyent==1.0.0
Cython==0.20
munkres==1.0.7
MySQL-python==1.2.5
numpy==1.10.1
parsedatetime==1.2
PIL==1.1.7
Pillow==3.0.0
PyOpenGL==3.1.1a1
python-dateutil==2.4.2
pytz==2015.7
pyvision==0.3.1
PyYAML==3.11
requests==2.8.1
six==1.10.0
SQLAlchemy==1.0.9
turkic==0.2.5
wheel==0.26.0
wsgilog==0.3

Any help in this regard is requested, The complete log of the command is below

(vatic3)bee@beehive:~/Documents/vatic$ turkic extract /home/bee/Desktop/omnomstori_Dy5g5Vjl.mp4 /home/bee/Desktop/test/hi
ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib/x86_64-linux-gnu/ --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib/x86_64-linux-gnu/ --enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/bee/Desktop/omnomstori_Dy5g5Vjl.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.29.104
  Duration: 00:01:10.01, start: 0.000000, bitrate: 647 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 545 kb/s, 25 fps, 25 tbr, 50 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Please use -b:a or -b:v, -b is ambiguous
[swscaler @ 0x1a64f20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/tmp/pyvision-ffmpeg-983757886/%d.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.25.101
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 640x360, q=2-31, 10000 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc56.26.100 mjpeg
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 1750 fps= 65 q=1.6 Lsize=N/A time=00:01:10.00 bitrate=N/A    
video:61888kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Aborted. Cleaning up...
Traceback (most recent call last):
  File "/home/bee/anaconda/envs/vatic3/bin/turkic", line 4, in <module>
    __import__('pkg_resources').run_script('turkic==0.2.5', 'turkic')
  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 735, in run_script

  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 1652, in run_script

  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/turkic-0.2.5-py2.7.egg/EGG-INFO/scripts/turkic", line 16, in <module>
    turkic.cli.main()
  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 147, in main
    handler(args[1:])
  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 47, in __init__
    self(parser.parse_args(args))
  File "/home/bee/Documents/vatic/cli.py", line 48, in __call__
    for frame, image in enumerate(sequence):
  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/ffmpeg.py", line 44, in __iter__
    yield self[i]
  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/ffmpeg.py", line 30, in __getitem__
    return Image.open(self.getframepath(k))
  File "/home/bee/anaconda/envs/vatic3/lib/python2.7/site-packages/PIL/Image.py", line 2286, in open
    % (filename if filename else fp))
IOError: cannot identify image file '/tmp/pyvision-ffmpeg-983757886/1.jpg'

Paying Twice When Using Gold Standard

When I attach a training video to a job, with --train-with, when a worker completes the training video, I see a new completed hit on my account, but the hit is only the training video. The pay is the same amount as the hit for the video I wish to be annotated. So now I am paying workers double. And some workers have only completed the training video but don't do the video I want them to, and so I am essentially paying them for nothing.

Any idea why this is happening?

No handlers could be found for logger "turkic.geolocation" turkic setup --database

Hi I am getting the error:

No handlers could be found for logger "turkic.geolocation"

when I try to execute turkic setup --database.

There's also an accompanying warning. UserWarning: /home/sharath/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)

Is it a must that I should get an api key from ipinfodb? Or is there an alternative to running the service locally without ipinfodb?

Thanks.

Target WSGI script '/home/vatic/vatic/server.py' cannot be loaded as Python module.

http://localhost/ index.html ok.
but:

http://localhost/?id=33&hitId=offline show Server ERROR

vim /var/log/apache2/error.log

show error info:

[Fri May 13 14:32:26.949970 2016] mod_wsgi (pid=3338): Target WSGI script '/home/vatic/vatic/server.py' cannot be loaded as Python module.
[Fri May 13 14:32:26.950557 2016] mod_wsgi (pid=3338): Exception occurred processing WSGI script '/home/vatic/vatic/server.py'.
[Fri May 13 14:32:26.950872 2016] Traceback (most recent call last):
[Fri May 13 14:32:26.951184 2016] File "/home/vatic/vatic/server.py", line 8, in
[Fri May 13 14:32:26.951784 2016] from turkic.server import handler, application
[Fri May 13 14:32:26.952156 2016] File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/server.py", line 15, in
[Fri May 13 14:32:26.960437 2016] from turkic.database import session
[Fri May 13 14:32:26.961490 2016] File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/database.py", line 12, in
[Fri May 13 14:32:26.961909 2016] from sqlalchemy import create_engine
[Fri May 13 14:32:26.962142 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/init.py", line 9, in
[Fri May 13 14:32:26.962534 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/init.py", line 8, in
[Fri May 13 14:32:26.963555 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/expression.py", line 31, in
[Fri May 13 14:32:26.964792 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/functions.py", line 11, in
[Fri May 13 14:32:26.965310 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/sqltypes.py", line 17, in
[Fri May 13 14:32:26.966839 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/processors.py", line 128, in
[Fri May 13 14:32:26.967501 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/cprocessors.py", line 7, in
[Fri May 13 14:32:26.969733 2016] File "build/bdist.linux-x86_64/egg/sqlalchemy/cprocessors.py", line 4, in bootstrap
[Fri May 13 14:32:26.970950 2016] File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 936, in resource_filename
[Fri May 13 14:32:26.974003 2016] self, resource_name
[Fri May 13 14:32:26.974399 2016] File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1567, in get_resource_filename
[Fri May 13 14:32:26.975860 2016] self._extract_resource(manager, self._eager_to_zip(name))
[Fri May 13 14:32:26.980864 2016] File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1595, in _extract_resource
[Fri May 13 14:32:26.982276 2016] self.egg_name, self._parts(zip_path)
[Fri May 13 14:32:26.982597 2016] File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1002, in get_cache_path
[Fri May 13 14:32:26.982858 2016] self.extraction_error()
[Fri May 13 14:32:26.983152 2016] File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 982, in extraction_error
[Fri May 13 14:32:26.983556 2016] raise err
[Fri May 13 14:32:26.983789 2016] ExtractionError: Can't extract file(s) to egg cache
[Fri May 13 14:32:26.983942 2016]
[Fri May 13 14:32:26.984164 2016] The following error occurred while trying to extract file(s) to the Python egg
[Fri May 13 14:32:26.984313 2016] cache:
[Fri May 13 14:32:26.984498 2016]
[Fri May 13 14:32:26.984638 2016] [Errno 13] Permission denied: '/var/www/.python-eggs'
[Fri May 13 14:32:26.984815 2016]
[Fri May 13 14:32:26.992586 2016] The Python egg cache directory is currently set to:
[Fri May 13 14:32:26.993211 2016]
[Fri May 13 14:32:26.993285 2016] /var/www/.python-eggs
[Fri May 13 14:32:26.993317 2016]
[Fri May 13 14:32:26.993335 2016] Perhaps your account does not have write access to this directory? You can
[Fri May 13 14:32:26.993351 2016] change the cache directory by setting the PYTHON_EGG_CACHE environment
[Fri May 13 14:32:26.993367 2016] variable to point to an accessible directory.

[Fri May 13 14:32:26.993383 2016]

vim /home/vatic/vatic/server.py
then add:

import os,sys
os.environ['PYTHON_EGG_CACHE'] = '/tmp/.python-eggs'
abspath = os.path.dirname(file)
sys.path.append(abspath)
os.chdir(abspath)

result:

import site

path for virtual env site packages

site.addsitedir('/usr/local/lib/python2.7/site-packages')

site.addsitedir('/usr/local/lib/python2.7/dist-packages')

import os.path, sys
sys.path.append(os.path.dirname(os.path.abspath(file)))

os.environ['PYTHON_EGG_CACHE'] = '/tmp/.python-eggs'
abspath = os.path.dirname(file)
sys.path.append(abspath)
os.chdir(abspath)

import config
from turkic.server import handler, application
from turkic.database import session
import cStringIO
from models import *

import logging
logger = logging.getLogger("vatic.server")

@handler()
def getjob(id, verified):
job = session.query(Job).get(id)

logger.debug("Found job {0}".format(job.id))

Want to add feature of 3D annotation in VATIC

Hello,
I am now on a project and wanna add some new features about the annotation.
After tracing the code of vaitc.
I had a problem of the certain process of drawing a box (annotation with a 2D box).
Does anyone know the "drawing box process" in vatic code?
Thanks.

Possible to pre-populate annotations?

Hi

I was wondering if its possible to pre-populate annotations into vatic. The motivation behind this is that we could use our existing object detection and tracking framework and only label the "missed objects".
Thanks

Interpolation issue- minimum frame change

It seems that interpolation only works correctly across 4 or more frames. If I want to get the right annotation, I have to jump ahead by at least 3 frames. This makes frame by frame correction difficult / impossible. This is a bigger problem when on object comes into frame - if frame by frame correction is attempted, the outside of view attributed is incorrectly interpolated. If anyone else who is facing this problem / knows how to fix it/ knows where to look to fix it could let me know, I would greatly appreciate it. Thanks!

cpptrack issue when installing

Hello All,

I hope if someone can help me completing the installation of https://github.com/johndoherty/vatic which integrates opencv tracking algorithms in the tracking between two annotations

the error is as follows:

/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/cse2017/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Traceback (most recent call last):
File "/usr/local/bin/turkic", line 5, in
pkg_resources.run_script('turkic==0.2.5', 'turkic')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/EGG-INFO/scripts/turkic", line 12, in
import cli
File "/home/cse2017/Desktop/Projects/VaticJohn/vatic/cli.py", line 17, in
from tracking import *
File "/usr/local/lib/python2.7/dist-packages/tracking/init.py", line 1, in
import api
File "/usr/local/lib/python2.7/dist-packages/tracking/api.py", line 2, in
import cpptrack
ImportError: /usr/local/lib/python2.7/dist-packages/cpptrack.so: undefined symbol: _ZN2cv6imreadERKNS_6StringEi

I'd be very thankful if you can help

How to check occluded or lost in the training task?

Is there any flag set to check occluded or lost in the training task? I tried different values in "--for-training-overlap ", "--for-training-tolerance" and "--for-training-mistakes", but it seems like none of them check the occluded or lost object.

Instructions for OSX

Installation on OSX

The following procedure shows how to install Vatic on OSX with Anaconda Python and Homebrew. The rest of the instructions for using turkic remains the same as mentioned in README.

Author: Varun Nagaraja ([email protected])

Dependencies

  • OpenSSL installed via Homebrew will not be linked as OSX already provides one. Hence you need to force link it.
$ brew install openssl
$ brew link —force openssl
  • MySQL
$ brew install mysql
$ mysql.server start
  • Apache
$ brew install httpd24
$ brew tap home-brew/apache
$ brew update

Before installing mod_wsgi execute the command to create symlink as mentioned on
https://github.com/Homebrew/homebrew-apache

$ brew install mod_wsgi
  • Other python packages
$ pip install sqlalchemy parsedatetime

Download Vatic

$ wget http://mit.edu/vondrick/vatic/vatic-install.sh
$ chmod +x vatic-install.sh
$ ./vatic-install.sh
$ cd vatic

Setup Apache

Edit /etc/apache2/httpd.conf

  • to include
    LoadModule wsgi_module /usr/local/Cellar/mod_wsgi/3.4/libexec/mod_wsgi.so
  • uncomment Include /private/etc/apache2/extra/httpd-vhosts.conf

On Yosemite, you will also have to uncomment
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so

Edit etc/apache2/extra/httpd-vhosts.conf instead of sites-enabled/000-default as done on Linux.

Remember to set the right path for anaconda python.

WSGIDaemonProcess www-data python-eggs=/tmp/.python-eggs
WSGIProcessGroup www-data

WSGIPythonHome /Users/<username>/anaconda

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /Library/WebServer/vatic/public
    WSGIScriptAlias /server /Library/WebServer/vatic/server.py
    CustomLog /var/log/apache2/access.log combined
    <Directory "/Library/WebServer/vatic">
        Options Indexes FollowSymLinks MultiViews Includes
        AllowOverride None
        #For Yosemite
        Require all granted
        #For Mavericks, uncomment the below two lines and comment the above Require line
        #Order allow,deny
        #Allow from all
    </Directory>
</VirtualHost>

Restart the apache server

$ sudo apachectl graceful

Setup MySQL

$ mysql -u root
mysql> create database vatic;

Setup Vatic

Copy vatic folder to /Library/WebServer/vatic so that you do not have to provide write access to folders inside the home directory.

Videos

  • The video frames should also be in a public folder like /Library/WebServer/vatic
  • On OSX, there might be some hidden folders with the name .DS_STORE created after extracting and moving the frames folder. Turkic will throw errors in cli.py. For now, you can just delete that .DS_STORE folder.

Permissions

  • The home directory should have both read and execute permissions so that the anaconda python directory is accessible by the apache server.
  • Ensure that private and sensitive folders inside the home directory have no read permission for others except you.

P.S: If things don’t work check /var/log/apache2/error.log. It tells you if there is any module that is not accessible or missing.

How can I get the box json data, which VATIC Automatically generated 。

Hi,
There is only the annotated frame in the Json output when the annotatation video is saved to the database.

1、extract video to *.jpg. such as:1.jpg、2.jpg、3.jpg、4.jpg、5.jpg..... until 19.jpg.
2、I annotated 1.jpg, 10.jpg, 18.jpg, and VATIC has generated intermediate box data automatically, like 2.jpg、3.jpg、4.jpg、5.jpg、6.jpg. But when I saved them to Database, I found the json data only have 1.jpg、10.jpg、18.jpg、19.jpg box data I annotated before。

3、My issue is how can I get the box json data, which VATIC Automatically generated 。

Regards

turkic publish offline mode outputs some rubbish links

When there is more than 1 video in the vatic database (ascertained turkic list), the turkic publish --offline options spews out invalid URLs. For instance, in my case, I had 2 videos (2 separate identifiers) in the vatic database. The tool outputs:
http://localhost?id=1&hitId=offline
http://localhost?id=2&hitId=offline
http://localhost?id=3&hitId=offline
http://localhost?id=16&hitId=offline
http://localhost?id=17&hitId=offline

Of these, only the last 2 are valid. Trying to access the first 3 URLs in the browser just displays '"Downloading the video"
0%

error: each element of 'ext_modules' option must be an Extension instance or 2-tuple

Workaround: (need better solution)

Unfortunately, there is a weird bug/feature in the latest Ubuntu's
installation for how it handles Python extensions. I plan to implement
a workaround for vatic, but in the mean time, you can apply this
patch:

  1. Edit /usr/lib/python2.7/distutils/command/build_ext.py
  2. Find line 356, where it reads:

for i, ext in enumerate(extensions):

  1. After that line, add a new line that just says "continue", so that
    it looks like:
   for i, ext in enumerate(extensions):
       continue
       if isinstance(ext, Extension):
           continue                # OK! (assume type-checking done
                                   # by Extension constructor)
  1. Save the file
  2. Go to the pyvision directory and run: $ sudo python setup.py install

issue with fast moving objects

(Probably not a bug but just difficult case) For videos with fast motion, e.g. a ball being kicked, it is impossible to correctly track the object, it's either offscreen or onscreen but interpolated to the wrong location.

(thanks to kate)

Post annotation together with video

I want to divide my annotation process into two, and for the second step, I want workers to annotation on the base of an already existing annotation. Is there a way to post a video with an annotation made on it together? I don't have too much experience with amazon turk and vatic, so can anyone give me a hand? Thank you very much!

Turkic setup error

While installing,such that in 000-default file I have given
Local domain name being "athmuntu"
DocumentRoot /var/www/vatic
ScriptAlias /server /var/www/vatic/server.py
AddHandler cgi-script .cgi .pl .py

And in config.py file:
localhost = "http://athmuntu" # your local host
database = "mysql://root:pass@athmuntu/vatic"

sudo turkic setup --database throws an error:
Traceback (most recent call last):
File "/usr/local/bin/turkic", line 5, in
pkg_resources.run_script('turkic==0.2.5', 'turkic')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
.
.
.
.
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2003, "Can't connect to MySQL server on 'athmuntu' (111)")

Error installing on Ubuntu 14.04

On ubuntu 14.04, with Cython version 0.22

cythoning vision/annotations.pyx to vision/annotations.c
Traceback (most recent call last):
  File "setup.py", line 70, in <module>
    ext_modules = ext_modules,
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
[...]
 File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 620, in generate_evaluation_code
    self.generate_result_code(code)
  File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 3592, in generate_result_code
    self.type, self.base.type)
AssertionError: unexpected type long and base type tuple object for indexing

Vatic in offline mode

Hi,
I have just got vatic to work in offline mode and am able to annotate the video segments. However, when I type turkic list --published it shows nothing. turkic list --stats shows 0/30 completed videos even though I have annotated some videos and save the work.

Also, I am wondering for the offline mode, do I have to enter the url every time I work on a video segments?

Thanks

couldn't enter vatic again

Hi, I've got a problem while using vatic.
I successfully published one video several days ago, but when I want to modify some annotation again, it was stuck as shown below. does anyone have the same problem with me?

1155145922

Thank you so much!

No generated values for "out of frame" attribute

Expected: When I mark an annotation as "out of frame" I would expect it to stay selected until a certain frame, when I disable it again. In between I would expect vatic to generate frames with the "of of frame" attribute set to 1.

What actually happens: Apparently I would need to set the attribute manually for every single frame. This is quite tedious and not usable for a large amount of frames.

Is this expected behaviour or am I missing something?

A video where you can see that only single frames keep this attribute: http://quick.as/QRgxSnmJ0

PS: As an aside, I am actually using this attribute as an artificial way to mark the beginning and end of a performed gesture in the video. So I draw an "active" box somewhere in the video and want to mark it as "out of frame" whenever there is no gesture performed.

ImportError: No module named vision

This might be a noob question but after I setup apache2 and sql following README, I tried turkic command in vatic directory.

But no matter I try turkic setup --dabatase or turkic publish --offline or any turkic command
All I got is this same error:
Traceback (most recent call last):
File "/usr/local/bin/turkic", line 5, in
pkg_resources.run_script('turkic==0.2.5', 'turkic')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/EGG-INFO/scripts/turkic", line 12, in
import cli
File "/home/yufeiw/VATIC/vatic/cli.py", line 11, in
from vision import Box
ImportError: No module named vision

I am a newbie for python, but I think the code is looking file vision.
Therefore I tried to copy vision from pyvision to vatic. It worked HOWEVER I run into another importError:
File "/home/yufeiw/VATIC/vatic/vision/init.py", line 1, in
from annotations import *
ImportError: No module named annotations
(I do find file annotations.pyx in the folder though)

It seems like moving files around is not the correct approach.
What did I do wrong? and What should I do? Thanks

Bug in annotation merging for attributes

From Nga Venkata Kartheek Medathati:

I am currently running vatic in offline mode. I annotated a video of approximately 3 minutes using action attributes after dividing the video into 3 segments (approximately 1500 frames each). When I dump the annotation into a text file using turkic dump command with merge option, I find that the action attributes of the last frames in the first segment are simply appended for the rest of the video segment but when I checked the attributes without merge option, the annotation is fine.

Invalidated and Respawned tasks still show up as completed

Every time I invalidate a task, I run the command:
turkic list --completed
to see which tasks are completed and need review. But each time, the respawned task still shows up as completed. I added hit.completed = False on line 495 of cli.py but it didn't seem to make any difference. Could you please help me fix it.

Thanks

What exactly is tolerance is?

Could any one give a more specific explanation or example for "--for-training-tolerance"? I tried the training tasks with very different tolerance but cannot tell any difference.

How can i import video to Vatic

I am able to install vatic on my ubuntu server. On doing

turkic status --verify
it shows

` Sandbox: False
Database: mysql://root:root@localhost/vatic
Localhost: http://localhost/

Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing
Testing access to database server... OK
Testing access to web server... OK
`
and when i access url on browser it shows vatic screen, which is like

185 48 117 147-

now what should i do next, i am confused.

Thankyou

question about frame extraction

$ turkic status --verify
Testing acess to database server... ok
Testing acess to web server... ok
but Frame Extraction
$ mkdir /path/to/output/directory
$ turkic extract /path/to/video.mp4 /path/to/output/directory
question as follows,please help me.
/usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /home/vipa/.python-eggs is writable by group/others and vulnerable to attack when used with get_reame. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
ffmpeg version 2.5.git Copyright (c) 2000-2015 the FFmpeg developers
built on Feb 1 2015 00:26:45 with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
configuration: --enable-gpl --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-x11grab --enable-shared --enable-pi
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 21.101 / 56. 21.101
libavformat 56. 19.100 / 56. 19.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 9.102 / 5. 9.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/vipa/software/vatic/1.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2014-07-07 09:02:18
location-zho : +30.2613+120.1166/
location : +30.2613+120.1166/
Duration: 00:00:15.62, start: 0.000000, bitrate: 4990 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2014-07-07 09:02:18
handler_name : Core Media Audio
Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 4921 kb/s, 30.03 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2014-07-07 09:02:18
handler_name : Core Media Video
Please use -b:a or -b:v, -b is ambiguous
[swscaler @ 0x197c360] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/tmp/pyvision-ffmpeg-33363523/%d.jpg':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
location : +30.2613+120.1166/
location-zho : +30.2613+120.1166/
encoder : Lavf56.19.100
Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720, q=2-31, 10000 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
Metadata:
creation_time : 2014-07-07 09:02:18
handler_name : Core Media Video
encoder : Lavc56.21.101 mjpeg
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 469 fps=128 q=24.8 Lsize=N/A time=00:00:15.64 bitrate=N/A
video:25518kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Decoding frames 0 to 100
Aborted. Cleaning up...
Traceback (most recent call last):
File "/usr/local/bin/turkic", line 4, in
import('pkg_resources').run_script('turkic==0.2.5', 'turkic')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1438, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/EGG-INFO/scripts/turkic", line 16, in
turkic.cli.main()
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 147, in main
handler(args[1:])
File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/turkic/cli.py", line 47, in init
self(parser.parse_args(args))
File "/home/vipa/software/vatic/cli.py", line 53, in call
image.thumbnail((args.width, args.height), Image.BILINEAR)
File "/usr/local/lib/python2.7/dist-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/Image.py", line 1559, in thumbnail
self.load()
File "/usr/local/lib/python2.7/dist-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/ImageFile.py", line 189, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/local/lib/python2.7/dist-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/Image.py", line 385, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available

'XML malformed' from mechanical turk?

I'm having trouble with Mechanical Turk access keys, and I'm not quite sure how to debug this. Take a look at the "XML malformed" error below:

$ cd path/to/vatic
$ turkic status --verify
Testing access to Amazon Mechanical Turk... ERROR! XML malformed
Testing access to database server... OK
Testing access to web server... OK

My vatic/config.py looks like this:

signature = <my AWS secret access key>
accesskey = <my AWS access key ID>
sandbox=True
localhost=<my server>
...and everything else is unmodified from the defaults.

If I set signature and/or accesskey to empty strings, we get this:

turkic status --verify
Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing

I got my access key from the Amazon IAM console.

compile error ubuntu 14.04

When I run
cd pyvision
sudo python setup.py install]

I come across the question.
root@VIPA:/home/vipa/software/pyvision# sudo python setup.py install
building liblinear
make:进入目录'/home/vipa/software/pyvision/vision/liblinear'
make: 没有什么可以做的为 `all'。
make:离开目录“/home/vipa/software/pyvision/vision/liblinear”
running install
running bdist_egg
running egg_info
writing pyvision.egg-info/PKG-INFO
writing top-level names to pyvision.egg-info/top_level.txt
writing dependency_links to pyvision.egg-info/dependency_links.txt
reading manifest file 'pyvision.egg-info/SOURCES.txt'
writing manifest file 'pyvision.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
skipping 'vision/annotations.c' Cython extension (up-to-date)
skipping 'vision/features.c' Cython extension (up-to-date)
skipping 'vision/model.c' Cython extension (up-to-date)
skipping 'vision/convolution.c' Cython extension (up-to-date)
skipping 'vision/track/standard.c' Cython extension (up-to-date)
skipping 'vision/alearn/linear.c' Cython extension (up-to-date)
skipping 'vision/alearn/marginals.c' Cython extension (up-to-date)
skipping 'vision/track/dp.c' Cython extension (up-to-date)
skipping 'vision/track/realprior.c' Cython extension (up-to-date)
skipping 'vision/track/pairwise.c' Cython extension (up-to-date)
skipping 'vision/svm.cpp' Cython extension (up-to-date)
building 'vision.svm' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/include/python2.7 -c vision/svm.cpp -o build/temp.linux-x86_64-2.7/vision/svm.o -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/vision/svm.o /home/vipa/software/pyvision/vision/liblinear/linear.o /home/vipa/software/pyvision/vision/liblinear/tron.o /home/vipa/software/pyvision/vision/liblinear/blas/blas.a -o build/lib.linux-x86_64-2.7/vision/svm.so
c++: error: unrecognized command line option ‘-fstack-protector-strong’
c++: error: unrecognized command line option ‘-fstack-protector-strong’
error: command 'c++' failed with exit status 1

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.