Apollo: How is Obstacle Detection actually done?

Created on 18 Jan 2019  ·  4Comments  ·  Source: ApolloAuto/apollo

Hi there,

I have a very simple question. I went through the code but there is a small point on which I had some hard time to understand.

  1. How does C++ code of Apollo does inference on pretrained nets to realize obstacle and lane detection?

  2. How are the weights loaded? How is it possible to do forward pass on those pretrained nets using C++?

  3. Is it possible to use those pretrained nets as if we are loading a C++ library then calling a function such as : ForwardPass(); or Classify(); ?

It would be really nice to get an answer from developers so that I will have a better understanding of Apollo framework.

Thank you all,
Canberk Demirsoy

Perception Question

Most helpful comment

Hi @cdemirsoy

I am not Apollo developer, so I can be wrong.

YoloObstacleDetector is the wrapper for YOLO detector. In 'Detect' method this class calls the inference.

The inference class is a base abstract class for inference.

Here is the caffe implementation of base inference class.

How are the weights loaded? How is it possible to do forward pass on those pretrained nets using C++?

see here and here

Is it possible to use those pretrained nets as if we are loading a C++ library then calling a function such as : ForwardPass(); or Classify(); ?

Yes, here

Best Regards,
Alex

All 4 comments

Hi @cdemirsoy

I am not Apollo developer, so I can be wrong.

YoloObstacleDetector is the wrapper for YOLO detector. In 'Detect' method this class calls the inference.

The inference class is a base abstract class for inference.

Here is the caffe implementation of base inference class.

How are the weights loaded? How is it possible to do forward pass on those pretrained nets using C++?

see here and here

Is it possible to use those pretrained nets as if we are loading a C++ library then calling a function such as : ForwardPass(); or Classify(); ?

Yes, here

Best Regards,
Alex

Hi @alexbuyval,

Thank you very much for your answer! I actually modified the Pytorch framework before so I felt familiar a bit when I traced down to the Caffe source code.

They basically implement everything in C++, so yes we can assume that there is a Caffe library that is linked with our code and is quite callable via similar functions as I exemplified and as you mentioned.

I am not sure about the efficiency though, but seems quite flexible this way.

Any comments from developers will be appreciated!

Best Regards,
Canberk Demirsoy

By the way,what kind of IDE tools do you use to read the apollo code?

Hi @alexbuyval ,
Thank you for your answers firstly which help me to solve some confuses.But where is files which the variable of 'net_file_' point at ?

Was this page helpful?
0 / 5 - 0 ratings