Skip to content

Commit

Permalink
Merge pull request #145 from anarkiwi/alwaysrssi
Browse files Browse the repository at this point in the history
always calculate box rssi even if low confidence.
  • Loading branch information
anarkiwi authored Nov 22, 2023
2 parents 91b5ca4 + 4fcea10 commit d693b5c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/image_inference_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,11 @@ void image_inference_impl::get_inference_() {
int(h * yf));
cv::Mat rssi_points = (*output_item.points_buffer)(rssi_rect);
float rssi = cv::mean(rssi_points)[0];
auto &augmented = results_json[prediction_class.key()][i];
augmented["rssi"] = rssi;
augmented["rssi_samples"] = rssi_points.cols * rssi_points.rows;
if (rssi >= min_peak_points_) {
++rendered_predictions;
auto &augmented = results_json[prediction_class.key()][i];
augmented["rssi"] = rssi;
augmented["rssi_samples"] =
rssi_points.cols * rssi_points.rows;
cv::rectangle(*output_item.image_buffer, bbox_rect, white);
std::string label = prediction_class.key() + ": conf " +
std::to_string(conf) + ", RSSI " +
Expand Down

0 comments on commit d693b5c

Please sign in to comment.