Yugnaynehc / InstanceCap

Instance Captioning Demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instance Captioning

This demo project was implemented by KCFcpp-py-wrapper + NeuralTalk2 + Lutorpy. Also need OpenCV and its python wrapper.

Usage

  1. Download NeuralTalk2's pretrained model. This demo use CPU based moel; you can download it from here.

  2. Prepare OTB100 dataset for evaluation

  3. Modify change the load path for load_model() in line 68 of demo.py to correctly load the pretrained model.

  4. Run

     python2 demo.py YOUR_OTB100_ROOT_DIR/TEST_CASE_ROOT_DIR  
    

    to see the result, for example:

     python2 demo.py ./data/Walking
    

If you don't have OTB100 dataset, you can modify the source code to adapt to other dataset, and even video captured by webcam. Some code in KCFcpp-py-wrapper/run.py may be useful.

If you have powerfull CPU or GPU, you can try smooth version of this demo (also need to modify model path):

   python2 demo_smooth.py YOUT_OTB100_ROOT_DIR/TEST_CASE_ROOT_DIR

for example:

   python2 demo_smooth.py ./data/Walking

Glimpse

truck kite surf walking man

About

Instance Captioning Demo


Languages

Language:Python 100.0%