caffe-fast-rcnn icon indicating copy to clipboard operation
caffe-fast-rcnn copied to clipboard

Are there any examples of how to use caffe-fast-rcnn in C++?

Open jainanshul opened this issue 8 years ago • 1 comments

Specifically I am looking for a way to get bounding boxes for the proposed region and their classification.

jainanshul avatar Feb 11 '16 18:02 jainanshul

I join a question.

1 Is there enough will get exactly the same way as an array as here? https://github.com/rbgirshick/caffe-fast-rcnn/blob/0dcd397b29507b8314e252e850518c5695efbb83/examples/cpp_classification/classification.cpp#L164

Blob<float>* output_layer = net_->output_blobs()[0];
  const float* begin = output_layer->cpu_data();
  const float* end = begin + output_layer->channels();
  return std::vector<float>(begin, end);

In which: { class_score, x, y, width, height, class_score, x, y, width, height, ... }

2 Or should we use like this?

    const vector<Blob<float>*>& output_blobs = net_->ForwardPrefilled();
    //LOG(INFO) << "End";
    for (int i = 0; i < output_blobs.size(); ++i) {

Where for each output_blobs[i] contains different layers: cls_score, bbox_pred, cls_prob ...

AlexeyAB avatar Apr 17 '16 13:04 AlexeyAB