Get Started with the Bluzer Developer Kit with UI-AR8 and Intel® System Studio

已发布:10/16/2019   最后更新时间:10/16/2019

Get Started with the Bluzer Developer Kit

Follow these steps to connect your Uzel Bluzer Developer Kit with UI-AR8 to Intel® System Studio and begin working with your development kit. This guide assumes you've already set up and powered your system according to the guide included in the box.

uzel bluzer image

You’ll walk through the following basic steps:

Run and Modify an Intel® Distribution of OpenVINO™ toolkit Application

Modify a vehicle detection project to run on an Uzel Bluzer Developer Kit with UI-AR8 AI acceleration card

Run and Modify an Intel® Distribution of OpenVINO™ toolkit Application

Model

Description

license-plate-recognition-barrier-0001 A model that uses a small-footprint network, trained to recognize Chinese license plates in traffic.
vehicle-attributes-recognition-barrier-0039 This model presents a vehicle attributes classification algorithm for a traffic analysis scenario.
vehicle-license-plate-detection-barrier-0106 This is a MobileNetV2 and SSD-based vehicle and (Chinese) license plate detector for the security barrier example.

In this section, you'll run a vehicle detection application. By default, this sample application runs on the CPU and detects vehicles in a static image, using the Intel® Distribution for OpenVINO™ toolkit. You'll modify the project to run on a sample video instead, and offload the processing to your GPU.

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.

Before you Begin

These steps were tested with the following configuration:

  • Uzel Bluzer Developer Kit with UI-AR8 AI acceleration card and Intel® System Studio 2019 Update 4
  • Version 2019 R2 of the Intel® Distribution of OpenVINO™ toolkit

The models used in this example are pre-trained models included with the Intel® Distribution of OpenVINO™ toolkit.

For additional information about each of these models, refer to the model descriptions, located by default in the appropriate directories in:

/opt/intel/openvino/deployment_tools/intel_models/

Set Up Environment Variables and Run Intel® System Studio

Set up environment variables

  1. If Intel® System Studio is running, close it.
  2. On your device, open a terminal window.
  3. Check that the environment variables are set in Intel® System Studio.

    If not, run the following command to set environment variables:

    sudo cp /opt/intel/openvino/bin/setupvars.sh /opt/intel/system_studio_2019/env.d/linux/

    Run Intel® System Studio

    Note: Do not launch the application using the desktop ISS icon. You must use the command line.

  4. In the terminal window, run the following script to run the Intel® System Studio: /opt/intel/system_studio_2019/iss_ide_eclipse-launcher.sh
  5. Keep the default workspace and click OK to launch Intel® System Studio.

Run a Sample Project on the CPU

Your sample project has already been included in Intel® System Studio for you. Follow the steps below to run it for the first time.

  1. In the Project Explorer, expand the demos folder. Expand the Binaries folder and select the security_barrier_camera_demo folder.

  2. From the Run drop-down list in the toolbar, select Run Configurations.

  3. The Run Configurations dialog box opens.
  4. On the left under C/C++ Application, select security_barrier_camera_demo.

    Next, you'll change the existing program arguments to run the project on the accelerator card. This information and more details about the arguments you can supply to the sample can be found in the README.mdfile in the security barrier camera demo source files.
  5. Copy the following argument string:
    -t 0 -d CPU -i "/opt/intel/openvino/deployment_tools/demo/car_1.bmp"  -m "${MODEL_DIR}/Security/object_detection/barrier/0106/dldt/FP32/vehicle-license-plate-detection-barrier-0106.xml" -m_va "${MODEL_DIR}/Security/object_attributes/vehicle/resnet10_update_1/dldt/FP32/vehicle-attributes-recognition-barrier-0039.xml" -m_lpr "${MODEL_DIR}/Security/optical_character_recognition/license_plate/dldt/FP32/license-plate-recognition-barrier-0001.xml"
    
  6. Paste the string into Program arguments field.
  7. Once finished, click Run.

    The sample runs on an image, highlighting the vehicles it detects in bounding boxes. You'll see labels displayed next to the cars it detects, such as "black car".

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

The image used in the example is a simple .bmp image:

Format .bmp
Dimension 749x637 pixels
Size 1.36 MB

Congratulations, you've successfully run the sample! Now that you're finished, click the red X icon at the top of the pop-up window to close it.

After you close the window, you can check the Console for averaged statistics about the sample you just ran, including the fps data.

View CPU Utilization

You can view CPU utilization on your device, then compare the performance change when you move processing to the GPU or a vision accelerator.

  1. Click the Ubuntu* icon in your taskbar. From the search bar, search for and open the System Monitor application.
  2. Click the Resources tab to bring up the CPU History chart. You can see how the CPU utilization changes when you run the sample on the CPU, as described below.

Afterwards, keep the application open so you can compare the utilization numbers when you offload application processing to the GPU or an accelerator.

Modify your Program to Run on a Video

Next, you'll modify the project to run on a video instead of an image.

  1. Make sure you have a copy of the sample video in your Downloads folder: ${HOME}/Downloads/car-detection.mp4

    If you don't have the sample video, download it from: sample-videos/car-detection.mp4

  2. Back in the Project Explorer, make sure you have the security_barrier_camera_demo folder selected.
  3. From the Run drop-down list in the toolbar, select Run Configurations.
  4. Under C/C++ Application, select the security_barrier_camera_demo run configuration.
  5. Click the Arguments tab.

    Next, you'll change the existing program arguments to use a video file instead of a static image, and to define the confidence threshold level for the Intel object detection model being used. You’ll use a high value of 0 to avoid getting false positives when your application is detecting the cars in the video.

    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.  

  6. Copy the following argument string.
    -t 0 -d CPU -i "/home/devkit/Downloads/car-detection.mp4" -m "${MODEL_DIR}/Security/object_detection/barrier/0106/dldt/FP32/vehicle-license-plate-detection-barrier-0106.xml" -m_va "${MODEL_DIR}/Security/object_attributes/vehicle/resnet10_update_1/dldt/FP32/vehicle-attributes-recognition-barrier-0039.xml" -m_lpr "${MODEL_DIR}/Security/optical_character_recognition/license_plate/dldt/FP32/license-plate-recognition-barrier-0001.xml"
    
  7. Paste the string into the Program arguments field.
  8. 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.

    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

    The video used in the example is an .mp4 file:

    Format .mp4
    Duration 31 seconds*
    Dimensions 768x432 pixels
    Size 2.8 MB
    * played at accelerated speed for 6-7 seconds

    If you have the System Monitor open, you can see the CPU utilization spike as the project runs. Notice how the CPU utilization for all cores rises while the sample runs.

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

    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.

Modify your Project to Run on the GPU

Next, you'll modify the project to run on a GPU.

  1. Back in the Project Explorer, make sure you still have the security_barrier_camera_demo folder selected.
  2. Run drop-down list in the toolbar, select Run Configurations.
  3. C/C++ Application, select security_barrier_camera_demo.
  4. Click the Arguments

    Next, you'll change the existing program arguments to run the project on the GPU.

    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:
    -t 0 -d GPU -i "/home/devkit/Downloads/car-detection.mp4" -m "${MODEL_DIR}/Security/object_detection/barrier/0106/dldt/FP16/vehicle-license-plate-detection-barrier-0106.xml" -m_va "${MODEL_DIR}/Security/object_attributes/vehicle/resnet10_update_1/dldt/FP16/vehicle-attributes-recognition-barrier-0039.xml" -m_lpr "${MODEL_DIR}/Security/optical_character_recognition/license_plate/dldt/FP16/license-plate-recognition-barrier-0001.xml"
    
  6. Paste the string into 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.

    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.

    If you have the System Monitor open, you can see the CPU utilization spike as the project runs. Compared to running the project on the CPU only, only about one CPU core is utilized at 100% at a time, as work is being offloaded to the GPU.

    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.

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

Next Steps

Next, you can modify the project to offload the application processing to different hardware, as follows:

  • Modify your project to run on a Uzel Bluzer Developer Kit with UI-AR8 acceleration card

Modify your Vehicle Detection Project to Run on Bluzer UI-AR8 AI Acceleration Card

This section contains steps to modify your vehicle detection application to run on an Uzel Bluzer UI-AR8 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:

  • Uzel Bluzer UI-AR8 Dev Kit with Intel® System Studio 2019 Update 4
  • Version 2019 R2 of the Intel® Distribution of OpenVINO™ toolkit
  • Uzel Bluzer UI-AR8 accelerator card

Set Up Environment Variables and Run Intel® System Studio

Follow the procedure in “Set up environment variables and run Intel® System Studio”, if you have not done so already.

Run the Sample Project on the 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:
    -t 0 -i "/home/devkit/Downloads/car-detection.mp4" –m "{$MODEL_DIR}/Security/object_detection/barrier/0106/dldt/FP16/vehicle-license-plate-FP16/detection-barrier-0106-fp16.xml" -m_va "{$MODEL_DIR}/Security/object_attributes/vehicle/resnet10_update_1/dldt/FP16/vehicle-attributes-recognition-barrier-0039-fp16.xml" -m_lpr "{$MODEL_DIR}/Security/optical_character_recognition/license_plate/dldt/FP16/license-plate-recognition-barrier-0001-fp16.xml" -d HDDL -d_va HDDL -d_lpr HDDL -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.

    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.

Projects and Tutorials

This section contains tutorials for developing projects for and working with your system

Reference Implementations, Code Samples, and Additional Documentation

You can also view additional code samples and OpenVINO™ toolkit documentation.

Debugging your Project

  1. To debug your project, click the Debug drop-down list in the toolbar, and click the name of your project. If you see a message asking you to open the debug perspective, click Yes.

    The debug perspective opens.

  2. To return to the C/C++ perspective once you're finished debugging, click the blue C/C++ icon in the top right of the application.

    Note: If you don't see the C/C++ icon, you can instead go to the menu and choose Window > Perspective > Open Perspective > C/C++ to exit the debug perspective.

产品和性能信息

1

英特尔的编译器针对非英特尔微处理器的优化程度可能与英特尔微处理器相同(或不同)。这些优化包括 SSE2、SSE3 和 SSSE3 指令集和其他优化。对于在非英特尔制造的微处理器上进行的优化,英特尔不对相应的可用性、功能或有效性提供担保。该产品中依赖于微处理器的优化仅适用于英特尔微处理器。某些非特定于英特尔微架构的优化保留用于英特尔微处理器。关于此通知涵盖的特定指令集的更多信息,请参阅适用产品的用户指南和参考指南。

通知版本 #20110804