vatic--视频标注工具

视频标注工具(vatic)

Github:https://github.com/cvondrick/vatic

这里写图片描述

1.安装(基于Ubuntu16.04)
$ sudo pip install cython==0.20
$ wget http://mit.edu/vondrick/vatic/vatic-install.sh
$ chmod +x vatic-install.sh
$ ./vatic-install.sh
$ cd vatic

vatic-install.sh可能下载不了,vatic-install下载

2.配置HTTP Server
/etc/apache2/sites-enabled/000-default.conf

替换为:

WSGIDaemonProcess www-data python-eggs=/home/cmcross/.python-eggs
WSGIProcessGroup www-data

<VirtualHost *:80>
    ServerName 0.0.0.0
    DocumentRoot /home/cmcross/vatic/public

    WSGIScriptAlias /server /home/cmcross/vatic/server.py
    CustomLog /var/log/apache2/access.log combined
</VirtualHost>

启用mod_headers模块:

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

重启Apache:

$ sudo apache2ctl graceful
3.配置SQL

创建vatic数据库:

$ mysql -u root
mysql> create database vatic;

如果登录需要密码,密码是hail_ukraine,修改root用户为无密码状态,否则会报错,如果是上面我的csdn下载的,密码是root

更新mysql root为无密码

update user set authentication_string=PASSWORD("") where User='root';
update user set plugin="mysql_native_password"; 
flush privileges; #更新所有操作权限
quit;

启动:

$ cp config.py-example config.py

如果需要上线服务,修改access相应选项,离线服务可以跳过

初始化数据库:

$ turkic setup --database

重启数据库:

$ turkic setup --database --reset

允许vatic访问turkic:

$ turkic setup --public-symlink
4.验证是否安装正确
$ turkic status --verify

如果您收到任何错误消息,则表示安装未完成。

注意:不打算使用Mechanical Turk,忽略由Mechanical Turk引起的任何错误。

ERROR:

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... ERROR! HTTP Error 403: Forbidden

One or more tests FAILED!

解决:修改Apache配置/etc/apache2/apache2.conf添加

<Directory /home/cmcross/vatic/public>
         Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted
</Directory>

重启后解决问题$ sudo apache2ctl graceful

5.示例
  1. 视频取帧

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

    宽高属性采用:--width 1000 --height 1000或者--no-resize

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

    已经取好的视频帧可通过命令转化为vatic的格式

    $ turkic formatframes /path/to/frames/ /path/to/output/directory
  2. 导入视频(离线)

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

    identifier为表示符,Label1将具有属性Attr1A和Attr1B,Label2将具有属性Attr2B,Attr2B和Attr2C,并且Label3将不具有属性。 指定属性是可选的。

  3. pulish视频(离线)

    $ turkic publish --offline

    ERROR:publish后打开http://localhost?id=1&hitId=offline网址显示Server Error
    这里写图片描述
    解决方法:在/etc/apache2/sites-enabled/000-default.conf添加

    <Directory /path/to/vatic>
        <Files server.py>
            Require all granted
        </Files>
    </Directory>
  4. 导出voc格式数据集

    $ turkic dump identifier -o /output --pascal --pascal-skip 1

    –pascal-skip:多少帧取一次数据,不加这个属性默认为15帧取一次

更多的参数参考Github:https://github.com/cvondrick/vatic

  • 4
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 17
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 17
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值