vatic—视频标注工具安装出现error及注意事项

1.安装参考:(主要看的CSDN博客)

博客 https://blog.csdn.net/baidu_26788951/article/details/80053760

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

2.安装注意:

两个一起参考,有时候博客里面的细节没有官网多,但官网是英文,有时候理解不到位,所以多方结合最好。

注意:这里的.sh文件,直接去下载了博主的.sh文件。(PS:安装前先仔细阅读一遍安装教程,反正自己被自己坑死,总是不知道遗漏了什么,装了好几遍,尤其注意执行中遇到权限问题Permission denied,就用sudo再来一遍)

.sh文件里面52/54/71-74行注意下,例如:

52 DocumentRoot /home/mou/vatic/public

54 WSGIScriptAlias /server /home/mou/vatic/server.py

  • 改成“ vatic/public”、“vatic/server.py” 所在文件夹路径

3.出现的error

error1

root@mou:~# mysql -u root

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

(我是猪吗!!!天那,真的,被自己蠢哭,都不知道登录mysql,说出去都丢人,而且博主自己都说了密码是:root,还是。。。不说了,毕竟你是小白)

注意:进入root模式

 

解决方法:

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

Enter password: root

显示如下:

 

感谢博主提供的思路https://blog.csdn.net/keepd/article/details/77151006

 

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

注意:

  1. .python-eggs是隐藏文件,‘ctrl+H'可以查看,在按一次隐藏。我的.python-eggs里面没有东西,我删除了home下的三个文件夹pyvision/turkic/vatic重装一遍。
  2. 'mou'是你的主机名(如我的是mou@mou,@后面‘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有说明,认真看。。。最后save

可以正常出现web

,但是load时出现问题:

(一万只草泥马在心中奔腾...)(自己不会用,还好意思...)(你,你,你说的对)(你怕不是个演员)(哈哈...这你都知道)(博君一笑,胜过千言)

( 2018.11.8更新  注意turkic load identifier  中的“identifier”是你的项目名,通俗点讲就是你的标注视频在数据库中的名字,后面dump时也要用这个名字哦)

别着急,这是建立过程有问题。

 

慢慢来。。。12342234。。。

参考: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表示你的第一个标签,以此类推,具体还可以加属性,,参见官网。。

文件夹下产生:

bingo !!!

2018.11.19更新  紧密输出。txt文件

turkic dump identifier1 -o  /home/mou/vagrant_data/output1/output1.txt --merge --merge-threshold 0.5

txt文件内容

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.

终于搞定

 

更新2019.3.8

重装Vatic:不知道什么原因(可能系统环境被破坏),mysql登录时密码正确也被拒绝登录,只能重装,重装过程并不顺利,但比起第一次顺利多了

注意:重新找没有配置过vatic的电脑,下次准备试试docker

之前看得博客:https://blog.csdn.net/baidu_26788951/article/details/80053760

在mysql改为无密码时,操作不对,正确操作如下:

选择mysql之后再

更新mysql root为无密码

update user set authentication_string=PASSWORD("") where User='root';
update user set plugin="mysql_native_password";
flush privileges; #更新所有操作权限
quit;
--------------------- 
原文:https://blog.csdn.net/baidu_26788951/article/details/80053760 

 

其次,修改Apache配置

sudo gedit /etc/apache2/sites-enabled/000-default.conf

添加

WSGIDaemonProcess www-data
WSGIProcessGroup www-data

<VirtualHost *:80> ServerName localhost
DocumentRoot /home/calabrese/vatic/public
WSGIScriptAlias /server /home/calabrese/vatic/server.py

<Directory /home/calabrese/vatic>
<Files server.py>
Require all granted
</Files>
</Directory>

<Directory /home/calabrese/vatic/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

参考:

https://github.com/cvondrick/vatic/issues/37

 

2019.4.16更新

注意   https://blog.csdn.net/baidu_26788951/article/details/80053760   博客上下载的vatic-install.sh

其中pyvision下载时出现问题,请对照官网的更改为:git clone https://github.com/cvondrick/pyvision.git

 

error1:mysql mysqld.sock文件丢失问题
Mysql -- connect MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
https://blog.csdn.net/ydm19891101/article/details/81665037

 

2019.5.9  更新 

sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: NO)")

 

 出先这个情况,只需要在执行的时候加  sudo

2019.5.20

Exception: As of version 1.1.0, this munkres package no longer supports Python 2. Either upgrade to Python 3.5 or better, or use an older version of munkres (e.g., 1.0.12).

sudo pip install munkres==1.0.12

2019.8.3 更新tips:

 当标注过多的视频时,会输出很多网址,如何找到某一个你想要的视频对应网址呢?ide2是我要找的视频对应的id,这个id1在turkic load ide2...时定义

turkic find --id ide2

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值