打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
const size_t stride = max_box_ * 7 + (64);
// std::cout << "batch size = " << batch_size_ << std::endl;
for(size_t i = 0; i < batch_size_; i++)
{
float* ptr = static_cast<float*>(data[0]) + i * stride;
size_t bbox_num = static_cast<int>(ptr[0]);
// std::cout << "img#" << i << " has " << bbox_num << " s" << std::endl;
for ( size_t box_index = 0; box_index < bbox_num; box_index++)
{
uint32_t add_offset = box_index * 7 + 64;
// std::cout << "bbox#" << box_index << " : batch id = " << ptr[add_offset + 0]
// << " class id = " << ptr[add_offset + 1] << " confidence = " <<
// ptr[add_offset + 2] << " x1 = " << ptr[add_offset + 3] << " y1 = "
// << ptr[add_offset + 4] << " x2 = " << ptr[add_offset + 5]
// << "y2 = " << ptr[add_offset + 6] << std::endl;
if(ptr[add_offset + 2] > 0.05){
bbox boundingbox(limit(ptr[add_offset + 3]), limit(ptr[add_offset + 4]), limit(ptr[add_offset + 5])
, limit(ptr[add_offset + 6]), ptr[add_offset + 2], uint32_t(ptr[add_offset + 1]));
bbox_array.at(i).push_back(boundingbox);
}
}
c++ 这么解析yolov3 的输出对么 ,输入了四个视频进行模型推理,但是只推理除了一个,还有这个stride = max_box_ * 7 + (64)为什么这么计算呢
热门帖子
精华帖子