zoukankan      html  css  js  c++  java
  • TLD如何运行OpenTLD(TLD_HY20121127)

    前一段时间,由于自己对程序的参数输入不是很了解,遇到一些问题。今天发现在http://write.blog.csdn.net/postedit,源码的网站上有相关的doc文件和如何运行的文件,拿过来分享一下。自己跑得程序是TLD群中共享的TLD_HY-2012-11-27的程序。

    这是网站上的rendme 文件。

    This will be a C++ implementations of the OpenTLD (aka Predator)
    ----------------------------------------------------------------------------
    This is a work in progress, as of right now the code is functional but pretty slow.
    ----------------------------------------------------------------------------
    Installation Notes
    =====================================
    git clone git@github.com:alantrrs/OpenTLD.git
    cd OpenTLD
    mkdir build
    cd build
    cmake ../src/
    make
    cd ../bin/
    %To run from camera
    ./run_tld -p ../parameters.yml -tl
    %To run from file
    ./run_tld -p ../parameters.yml -s ../datasets/06_car/car.mpg -tl
    %To init bounding box from file
    ./run_tld -p ../parameters.yml -s ../datasets/06_car/car.mpg -b ../datasets/06_car/init.txt -tl
    %To train only in the firs frame (no tracking, no learning)
    ./run_tld -p ../parameters.yml -s ../datasets/06_car/car.mpg -b ../datasets/06_car/init.txt 
    %To test the final detector (Repeat the video, first time learns, second time detects)
    ./run_tld -p ../parameters.yml -s ../datasets/06_car/car.mpg -b ../datasets/06_car/init.txt -tl -r
    
    =====================================
    Evaluation
    =====================================
    The output of the program is a file called bounding_boxes.txt which contains all the detections made through the video. This file should be compared with the ground truth file to evaluate the performance of the algorithm. This is done using a python script:
    python ../datasets/evaluate_vis.py ../datasets/06_car/car.mpg bounding_boxes.txt ../datasets/06_car/gt.txt
    
    ====================================
    Thanks
    ====================================
    To Zdenek Kalal for realeasing his awesome algorithm
    


    与程序里的read_optopons对应,注意自己对应的文件地址。如果跑相关的测试视频,在上面的网站的data文件夹有。

    void read_options(int argc, char** argv,VideoCapture& capture,FileStorage &fs){
      for (int i=0;i<argc;i++){
          if (strcmp(argv[i],"-b")==0){
              if (argc>i){
                  readBB(argv[i+1]);
                  gotBB = true;
              }
              else
                print_help(argv);
          }
          if (strcmp(argv[i],"-s")==0){
              if (argc>i){
                  video = string(argv[i+1]);
                  capture.open(video);
                  fromfile = true;
              }
              else
                print_help(argv);
    
          }
          if (strcmp(argv[i],"-p")==0){
              if (argc>i){
                  fs.open(argv[i+1], FileStorage::READ);
              }
              else
                print_help(argv);
          }
          if (strcmp(argv[i],"-no_tl")==0){
              tl = false;
          }
          if (strcmp(argv[i],"-r")==0){
              rep = true;
          }
      }
    }
    


     

  • 相关阅读:
    【遇见时光】笔试-偶数最大距离-java
    【遇见时光】笔试-下蹲-java实现
    [遇见时光]内推笔试-藏宝图-java实现
    【遇见时光】内推编程-洗牌
    [遇见时光]剑指offer-顺时针打印矩阵java
    [遇见时光]解决‘javac’不是内部或外部命令的问题
    [遇见时光]Java多线程
    Android Studio 打包错误
    android 开发不常用技巧集
    异步任务结束操作,对于ativity fragment SharedPreferences等涉及到context操作前的判断
  • 原文地址:https://www.cnblogs.com/javawebsoa/p/3074078.html
Copyright © 2011-2022 走看看