Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Object detection doesn't run on GPU #7

Closed
fiorano10 opened this issue Jan 28, 2019 · 8 comments
Closed

Object detection doesn't run on GPU #7

fiorano10 opened this issue Jan 28, 2019 · 8 comments

Comments

@fiorano10
Copy link
Contributor

I'm trying to run object detection sample on the GPU but it defaults to using the CPU, why?
'[ INFO ] --------parameters DUMP---------------------
[ INFO ] Pipeline: object
[ INFO ] Inputs: RealSenseCamera,
[ INFO ] Outputs: ImageWindow, RosTopic, RViz,
[ INFO ] Inferences:
[ INFO ] Name: ObjectDetection
[ INFO ] Model: /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.xml
[ INFO ] Engine: GPU
[ INFO ] Label: to/be/set/xxx.labels
[ INFO ] Connections:
[ INFO ] ObjectDetection->ImageWindow
[ INFO ] ObjectDetection->RosTopic
[ INFO ] RealSenseCamera->ObjectDetection
[ INFO ] Common:
[ INFO ] camera_topic:
[ INFO ] custom_cpu_library:
[ INFO ] custom_cldnn_library:
[ INFO ] enable_performance_count: 0
getting instance
return instance
[ INFO ] device_FACE:CPU
[ INFO ] model_FACE:/opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.xml
[ INFO ] device_AG:CPU
[ INFO ] model_AG:
[ INFO ] model_HeadPose:
[ INFO ] device_HeadPose:CPU

@chaoli2
Copy link
Contributor

chaoli2 commented Jan 29, 2019

@fiorano10
The default yaml for people detection combines 4 inference instances for face, emotion, age & gender and head pose respectively. Each inference will involve one inference engine like CPU or GPU.

If you'd like to do object detection, just keep one inference instance and remove others. Here is one object detection yaml example for your reference.

@fiorano10
Copy link
Contributor Author

I already have the object detection running on CPU, but even if I switch it to GPU in the yaml, the inference still defaults to CPU as I mentioned above. When I run the object detection the CPU usage jumps to 600%.

@chaoli2
Copy link
Contributor

chaoli2 commented Jan 30, 2019

@fiorano10
Will you show me your yaml file?
According to your provided log, the inference engine launched 4 inferences at the same time. One is running object detection on GPU, and another three inferences are running detections on CPU, such as face, age&gender and headpose detection.

@fiorano10
Copy link
Contributor Author

fiorano10 commented Jan 30, 2019

This is what yaml file looks like:
`Pipelines:

  • name: object
    inputs: [RealSenseCamera]
    infers:
    • name: ObjectDetection
      model: /opt/intel/computer_vision_sdk/deployment_tools/intel_models/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.xml
      engine: GPU
      label: to/be/set/xxx.labels
      batch: 16
      outputs: [ImageWindow, RosTopic, RViz]
      confidence_threshold: 0.2
      connects:
    • left: RealSenseCamera
      right: [ObjectDetection]
    • left: ObjectDetection
      right: [ImageWindow]
    • left: ObjectDetection
      right: [RosTopic]

OpenvinoCommon:`

@chaoli2
Copy link
Contributor

chaoli2 commented Jan 30, 2019

@fiorano10
The yaml is OK.
But I have not met this issue from my side. The runtime inference engine is exactly what I specified in the yaml...
The provided log is the output of above yaml?

@fiorano10
Copy link
Contributor Author

Yup, that's the output of the above yaml file. when I run face or emotion detection, it runs fine on the GPU but not object detection

@fiorano10
Copy link
Contributor Author

fiorano10 commented Jan 31, 2019

You need to add FLAGS_d = pipelines[0].infers[0].engine; in /ros_openvino_toolkit/sample/src/sample_pipeline_object.cpp

@songshan0321
Copy link

I have written a easy-to-use ROS wrapper for OpenVINO R3 Inference Engine, with a step-by-step instruction! =) https://github.com/songshan0321/ros_vino

LewisLiuPub pushed a commit that referenced this issue Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants