vatic—視訊標註工具安裝出現error及注意事項
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
[email protected]:~# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
(我是豬嗎!!!天那,真的,被自己蠢哭,都不知道登入mysql,說出去都丟人,而且博主自己都說了密碼是:root,還是。。。不說了,畢竟你是小白)
注意:進入root模式
解決方法:
[email protected]:~# 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'是你的主機名(如我的是[email protected],@後面‘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
怎麼用