Modify your Vehicle Detection project to run on IEI Tank* Mustang V100-MX8 AI Acceleration Card

This section contains steps to modify your vehicle detection application to run on an IEI* Mustang-V100-MX8 accelerator card.

Intel® technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Performance varies depending on system configuration. Check with your system manufacturer or retailer or learn more at software.intel.com.  

Before you begin

These steps were tested with the following configuration:

 

  • IEI Tank* AIoT Dev Kit with Intel® System Studio 2019 Update 4
  • Version 2019 R2 of the Intel® Distribution of OpenVINO™ toolkit
  • IEI* Mustang-V100-MX8 accelerator card

Set up service configuration for running Security Barrier Demo with the IEI* Mustang-V100-MX8 AI acceleration card

For the security barrier camera demo, the configuration file needs to include the following in the hddl_service.config file. Before editing a config file, remember to create a backup file of the original.

cd /opt/intel/openvino/deployment_tools/inference_engine/external/hddl/config
Backup the original config file.  
sudo cp hddl_service.config hddl_service.config.orig
Use your favorite editor to edit the file. In this case, we use nano.  
sudo nano hddl_service.config
  Edit the config file  in the scheduler_config section with the content below.   "tagDetect":           6,         "tagAttr":                1,           "tagLPR":               1
"scheduler_config":
  [
    {
      "subclass":             0,                 // firmware interface subclass
      // Tag Scheduler
      "graph_tag_map":{                          // graph tag mapping
       "tagDetect":           6,         
       "tagAttr":             1,           
       "tagLPR":              1
     },
      // Stream Scheduler
Exit the editor. With nano, use ctrl+x.  Follow the instruction to save, and click the Enter key to write the changes  to the file. Now, you are ready to get started withe IEI* Mustang-V100-MX8  card.

Run the sample project on the IEI* Mustang-V100-MX8 accelerator card

  1. In the Project Explorer, make sure you still have the security_barrier_camera_demo folder selected.
  2. From the Run drop-down list in the toolbar, select Run Configurations.

     

  3. Under C/C++ Application, select the security barrier camera demo run configuration.
  4. Click the Arguments tab.

     

    Next, you'll change the existing program arguments to run the project on the accelerator card, and to change the model for the accelerator card to a 16-bit version compatible with the hardware. This information and more details about the arguments you can supply to the sample can be found in the README.md file in the security_barrier_camera_demo source files.

  5. Copy the following argument string:
    -d HDDL -d_va HDDL -d_lpr HDDL -i "/home/ieisw/Downloads/car-detection.mp4" -m "/opt/intel/openvino/deployment_tools/tools/model_downloader/Security/object_detection/barrier/0106/dldt/vehicle-license-plate-detection-barrier-0106.xml" -m_va "/opt/intel/openvino/deployment_tools/tools/model_downloader/Security/object_attributes/vehicle/resnet10_update_1/dldt/vehicle-attributes-recognition-barrier-0039.xml" -m_lpr "/opt/intel/openvino/deployment_tools/tools/model_downloader/Security/optical_character_recognition/license_plate/dldt/license-plate-recognition-barrier-0001.xml" -n_wt 30 -n_iqs 10 -nireq 50 -tag
  6. Paste the string into the Program arguments field.

  7. Once finished, click Run.Your project runs. The results appear in the Console and in a separate video window. In the video, you'll see several cars driving through a parking lot. The application will highlight the vehicles it detects in bounding boxes and display a label next to each car ("white car", "red car", etc.).

    In the text displayed over the video, you can see live data about the sample. Note the fps value, which you can use to estimate performance; a higher fps value corresponds to better performance.

    If you have the System Monitor open, you can see the CPU utilization rise as the project runs.

     

  8. After the video closes automatically, you can check the Console for averaged statistics about the sample you just ran, including the fps data.

[ INFO ] InferenceEngine: 
API version ............ 2.0
Build .................. custom_releases/2019/R2_f5827d4773ebbe727c9acac5f007f7d94dd4be4e
Description ....... API
[ INFO ] Files were added: 1
[ INFO ]     /home/ieisw/Downloads/car-detection.mp4
[ INFO ] Loading device HDDL
HDDL
HDDLPlugin version ......... 2.0
Build ........... 27579

[ INFO ] Loading detection model to the HDDL plugin
[10:41:24.3173][4925]I[ServiceStarter.cpp:40] Info: Waiting for HDDL Service getting ready ...
[10:41:24.3173][4925]I[ServiceStarter.cpp:45] Info: Found HDDL Service is running.
[HDDLPlugin] [10:41:24.3174][4925]I[HddlClient.cpp:256] Hddl api version: 2.2
[HDDLPlugin] [10:41:24.3175][4925]I[HddlClient.cpp:259] Info: Create Dispatcher2.
[HDDLPlugin] [10:41:24.3176][4925]I[HddlClient.cpp:270] Info: RegisterClient HDDLPlugin.
[HDDLPlugin] [10:41:24.3177][4937]I[Dispatcher2.cpp:148] Info: SenderRoutine starts.
[HDDLPlugin] [10:41:24.3182][4925]I[HddlClient.cpp:275] Client Id: 2
[ INFO ] Loading Vehicle Attribs model to the HDDL plugin
[HDDLPlugin] [10:41:25.6208][4925]I[ServiceStarter.cpp:40] Info: Waiting for HDDL Service getting ready ...
[HDDLPlugin] [10:41:25.6209][4925]I[ServiceStarter.cpp:45] Info: Found HDDL Service is running.
[HDDLPlugin] [10:41:25.6211][4925]I[HddlClient.cpp:256] Hddl api version: 2.2
[HDDLPlugin] [10:41:25.6212][4925]I[HddlClient.cpp:259] Info: Create Dispatcher2.
[HDDLPlugin] [10:41:25.6215][4958]I[Dispatcher2.cpp:148] Info: SenderRoutine starts.
[HDDLPlugin] [10:41:25.6220][4925]I[HddlClient.cpp:270] Info: RegisterClient HDDLPlugin.
[HDDLPlugin] [10:41:25.6228][4925]I[HddlClient.cpp:275] Client Id: 3
[ INFO ] Loading Licence Plate Recognition (LPR) model to the HDDL plugin
[HDDLPlugin] [10:41:25.7543][4925]I[ServiceStarter.cpp:40] Info: Waiting for HDDL Service getting ready ...
[HDDLPlugin] [10:41:25.7543][4925]I[ServiceStarter.cpp:45] Info: Found HDDL Service is running.
[HDDLPlugin] [10:41:25.7544][4925]I[HddlClient.cpp:256] Hddl api version: 2.2
[HDDLPlugin] [10:41:25.7544][4925]I[HddlClient.cpp:259] Info: Create Dispatcher2.
[HDDLPlugin] [10:41:25.7545][4966]I[Dispatcher2.cpp:148] Info: SenderRoutine starts.
[HDDLPlugin] [10:41:25.7548][4925]I[HddlClient.cpp:270] Info: RegisterClient HDDLPlugin.
[HDDLPlugin] [10:41:25.7552][4925]I[HddlClient.cpp:275] Client Id: 4
[ INFO ] Number of InferRequests: 50
[ INFO ] Display resolution: 1920x1080
[HDDLPlugin] [10:41:25.8545][4925]I[HddlBlob.cpp:166] Info: HddlBlob initialize ion ...
[HDDLPlugin] [10:41:25.8545][4925]I[HddlBlob.cpp:176] Info: HddlBlob initialize ion successfully.
[ INFO ] Number of allocated frames: 10
[ INFO ] Resizable input with support of ROI crop and auto resize is disabled
Mean overall time per all inputs: 5.55ms / 180.27FPS for 373 frames
Detection InferRequests usage: 13.50%
[HDDLPlugin] [10:41:28.0755][4967]I[Dispatcher2.cpp:212] Info: Listen Thread wake up and to exit.
[HDDLPlugin] [10:41:28.0758][4925]I[Dispatcher2.cpp:81] Info: Client dispatcher exit.
[HDDLPlugin] [10:41:28.0760][4925]I[HddlClient.cpp:203] Info: Hddl client unregistered.
[HDDLPlugin] [10:41:28.1769][4959]I[Dispatcher2.cpp:212] Info: Listen Thread wake up and to exit.
[HDDLPlugin] [10:41:28.1771][4925]I[Dispatcher2.cpp:81] Info: Client dispatcher exit.
[HDDLPlugin] [10:41:28.1773][4925]I[HddlClient.cpp:203] Info: Hddl client unregistered.
[HDDLPlugin] [10:41:28.2781][4938]I[Dispatcher2.cpp:212] Info: Listen Thread wake up and to exit.
[HDDLPlugin] [10:41:28.2783][4925]I[Dispatcher2.cpp:81] Info: Client dispatcher exit.
[HDDLPlugin] [10:41:28.2785][4925]I[HddlClient.cpp:203] Info: Hddl client unregistered.

[ INFO ] Execution successful

 

To close the video, you can press ESC or click the red Terminate icon from the Console at any time. The video will close automatically when it reaches the end of the playback.


Note: To loop the video, add the argument -loop_video to the end of the arguments, then rerun the sample project.

Troubleshooting

For more information about HDDL-R and troubleshooting tips, visit: https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux_ivad_vpu.html

 

For information about the reset driver for HDDL from IEI*, visit: https://download.ieiworld.com/?model=Mustang-V100-MX8

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.