1.安装参考:(主要看的CSDN博客)
博客 https://blog.csdn.net/baidu_26788951/article/details/80053760
官网 Github:https://github.com/cvondrick/vatic
2.安装注意:
两个一起参考,有时候博客里面的细节没有官网多,但官网是英文,有时候理解不到位,所以多方结合最好。
注意:这里的.sh文件,是一个安装文件,开始不太懂,就花钱去下载博主的.sh文件,因为执行wget的时候链接不上,其实github官网上下载之后,里面有里安装用的“vatic-install.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
注意:
- .python-eggs是隐藏文件,‘ctrl+H'可以查看,在按一次隐藏。我的.python-eggs里面没有东西,我删除了homex下的三个文件夹pyvision/turkic/vatic重装一遍。
- '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.
终于搞定
。。。等会在看看输出的标注
xml
怎么用