超级好用的视频标注工具

栏目: 服务器 · Apache · 发布时间: 5年前

内容简介:$ sudo pip install cython==0.20

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

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

超级好用的视频标注工具


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Java并发编程实战

Java并发编程实战

Brian Goetz、Tim Peierls、Joshua Bloch、Joseph Bowbeer、David Holmes、Doug Lea / 童云兰 / 机械工业出版社华章公司 / 2012-2 / 69.00元

本书深入浅出地介绍了Java线程和并发,是一本完美的Java并发参考手册。书中从并发性和线程安全性的基本概念出发,介绍了如何使用类库提供的基本并发构建块,用于避免并发危险、构造线程安全的类及验证线程安全的规则,如何将小的线程安全类组合成更大的线程安全类,如何利用线程来提高并发应用程序的吞吐量,如何识别可并行执行的任务,如何提高单线程子系统的响应性,如何确保并发程序执行预期任务,如何提高并发代码的性......一起来看看 《Java并发编程实战》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具