Code Monkey home page Code Monkey logo

vatic's Issues

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!

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.

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

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

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).

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.

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

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%

'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.

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

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.

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

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?

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)

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.

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.

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.

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

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!

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

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))

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

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)")

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

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

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.

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

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'

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!

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.

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

"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?

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.

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.

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)")

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!

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.