Skip to content

Commit

Permalink
fix v5 seg index order
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHEQIUSHUI committed Jan 4, 2024
1 parent 11633d3 commit 9b01786
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/ax650/ax_yolov5s_seg_steps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,17 @@ namespace ax
std::vector<detection::Object> objects;
float prob_threshold_u_sigmoid = -1.0f * (float)std::log((1.0f / PROB_THRESHOLD) - 1.0f);
timer timer_postprocess;
float* output_ptr[3] = {(float*)io_data->pOutputs[1].pVirAddr,
(float*)io_data->pOutputs[2].pVirAddr,
(float*)io_data->pOutputs[3].pVirAddr};
float* output_ptr[3] = {(float*)io_data->pOutputs[0].pVirAddr,
(float*)io_data->pOutputs[1].pVirAddr,
(float*)io_data->pOutputs[2].pVirAddr};
for (uint32_t i = 0; i < 3; ++i)
{
auto ptr = output_ptr[i];
int32_t stride = (1 << i) * 8;
detection::generate_proposals_yolov5_seg(stride, ptr, PROB_THRESHOLD, proposals, input_w, input_h, ANCHORS, prob_threshold_u_sigmoid);
}

auto& output = io_info->pOutputs[0];
auto& info = io_data->pOutputs[0];
auto& info = io_data->pOutputs[3];
auto ptr = (float*)info.pVirAddr;
detection::get_out_bbox_mask(proposals, objects, ptr, DEFAULT_MASK_PROTO_DIM, DEFAULT_MASK_SAMPLE_STRIDE, NMS_THRESHOLD, input_h, input_w, mat.rows, mat.cols);

Expand Down

0 comments on commit 9b01786

Please sign in to comment.