超级!超级!超级好用的视频标注工具

2018 年 12 月 25 日 计算机视觉战队

VATIC视频标注工具(下载见文末


  • 安装(基于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下载地址:

https://download.csdn.net/download/gzq0723/10874644

  • 配置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

  • 配置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

  • 验证是否安装正确

$ 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

  • 示例

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帧取一次


出现的error


  • error1

root@mou:~# mysql -u root


ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


注意:进入root模式


解决方法:


root@mou:~# mysql -u root -p

Enter password: root


显示如下:

  • error2

/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py:1298: UserWarning: /home/suker/.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)


解决办法

$ cd /home/mou/

$ chmod g-wx,o-wx .python-eggs/


还不行的话:

$ sudo usermod -a -G mou www-data

$ sudo mkdir /var/www/.python-eggs/

$ sudo chown www-data:www-data /var/www/.python-eggs/

$ sudo apache2ctl graceful


注意:

.python-eggs是隐藏文件,‘ctrl+H'可以查看,在按一次隐藏。我的.python-eggs里面没有东西,我删除了homex下的三个文件夹pyvision/turkic/vatic重装一遍。

'mou'是你的主机名。


  • error3

实现例子:

$ wget http://techslides.com/demos/sample-videos/small.mp4 -O /home/mou/vagrant_data/small.mp4

$ turkic extract /home/mou/vagrant_data/small.mp4 /home/mou/vagrant_data/example/

$ turkic load example_id /home/mou/vagrant_data/example/ example_label1 example_label2 example_label3 –offline


打开网址,进行标注,instructions有说明。但是load时出现问题:这是建立过程有问题。

参考:https://github.com/cvondrick/vatic/issues/56

$ turkic setup –database –reset //重新重启数据库

$ mkdir -p /home/mou/vagrant_data/example

$ wget http://techslides.com/demos/sample-videos/small.mp4 -O /home/mou/vagrant_data/small.mp4

(这2,3行你之前执行了的话就不要执行了)

$ turkic extract /home/mou/vagrant_data/video.mp4 /home/mou/vagrant_data/example

$turkic load identifier /home/mou/vagrant_data/output example_label1 example_label2 example_label3 –offline

$ turkic publish –offline

$ turkic dump identifier -o /home/mou/vagrant_data/output --pascal --pascal-skip 1

(注意Permission denied时,要加sudo)

example_label1表示你的第一个标签,以此类推,具体还可以加属性,参见官网。

Github下载地址:https://github.com/GZQ0723/vatic_BasicFinder-HIVE


如果想加入我们“计算机视觉战队”,请扫二维码加入学习群,我们一起学习进步,探索领域中更深奥更有趣的知识!

登录查看更多
0

相关内容

视频描述生成(Video Caption),就是从视频中自动生成一段描述性文字

知识荟萃

精品入门和进阶教程、论文和代码整理等

更多

查看相关VIP内容、论文、资讯等
【2020新书】实战R语言4,323页pdf
专知会员服务
98+阅读 · 2020年7月1日
【MIT-ICML2020】图神经网络的泛化与表示的局限
专知会员服务
42+阅读 · 2020年6月23日
【干货书】现代数据平台架构,636页pdf
专知会员服务
250+阅读 · 2020年6月15日
最新《自动微分手册》77页pdf
专知会员服务
97+阅读 · 2020年6月6日
专知会员服务
59+阅读 · 2020年3月19日
【资源】100+本免费数据科学书
专知会员服务
105+阅读 · 2020年3月17日
【2020新书】Kafka实战:Kafka in Action,209页pdf
专知会员服务
65+阅读 · 2020年3月9日
【经典书】Python计算机视觉编程,中文版,363页pdf
专知会员服务
136+阅读 · 2020年2月16日
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
94+阅读 · 2019年12月4日
TheFatRat 一款简易后门工具
黑白之道
35+阅读 · 2019年10月23日
CALDERA 一款对手自动模拟工具
黑白之道
20+阅读 · 2019年9月17日
在K8S上运行Kafka合适吗?会遇到哪些陷阱?
DBAplus社群
9+阅读 · 2019年9月4日
搭建自己的searx搜索引擎
黑白之道
13+阅读 · 2019年5月31日
Kali Linux 渗透测试:密码攻击
计算机与网络安全
15+阅读 · 2019年5月13日
Pupy – 全平台远程控制工具
黑白之道
43+阅读 · 2019年4月26日
支持多标签页的Windows终端:Fluent 终端
Python程序员
7+阅读 · 2019年4月15日
34个最优秀好用的Python开源框架
专知
9+阅读 · 2019年3月1日
如何用GitLab本地私有化部署代码库?
Python程序员
9+阅读 · 2018年12月29日
Continual Unsupervised Representation Learning
Arxiv
7+阅读 · 2019年10月31日
Arxiv
3+阅读 · 2018年1月31日
Arxiv
5+阅读 · 2015年9月14日
Arxiv
3+阅读 · 2012年11月20日
VIP会员
相关VIP内容
【2020新书】实战R语言4,323页pdf
专知会员服务
98+阅读 · 2020年7月1日
【MIT-ICML2020】图神经网络的泛化与表示的局限
专知会员服务
42+阅读 · 2020年6月23日
【干货书】现代数据平台架构,636页pdf
专知会员服务
250+阅读 · 2020年6月15日
最新《自动微分手册》77页pdf
专知会员服务
97+阅读 · 2020年6月6日
专知会员服务
59+阅读 · 2020年3月19日
【资源】100+本免费数据科学书
专知会员服务
105+阅读 · 2020年3月17日
【2020新书】Kafka实战:Kafka in Action,209页pdf
专知会员服务
65+阅读 · 2020年3月9日
【经典书】Python计算机视觉编程,中文版,363页pdf
专知会员服务
136+阅读 · 2020年2月16日
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
94+阅读 · 2019年12月4日
相关资讯
TheFatRat 一款简易后门工具
黑白之道
35+阅读 · 2019年10月23日
CALDERA 一款对手自动模拟工具
黑白之道
20+阅读 · 2019年9月17日
在K8S上运行Kafka合适吗?会遇到哪些陷阱?
DBAplus社群
9+阅读 · 2019年9月4日
搭建自己的searx搜索引擎
黑白之道
13+阅读 · 2019年5月31日
Kali Linux 渗透测试:密码攻击
计算机与网络安全
15+阅读 · 2019年5月13日
Pupy – 全平台远程控制工具
黑白之道
43+阅读 · 2019年4月26日
支持多标签页的Windows终端:Fluent 终端
Python程序员
7+阅读 · 2019年4月15日
34个最优秀好用的Python开源框架
专知
9+阅读 · 2019年3月1日
如何用GitLab本地私有化部署代码库?
Python程序员
9+阅读 · 2018年12月29日
Top
微信扫码咨询专知VIP会员