Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
c_src: modify extended operator synonyms
Browse files Browse the repository at this point in the history
  • Loading branch information
hhk7734 committed Feb 18, 2021
1 parent 3c8a71c commit 6a9ebc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c_src/box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ float get_diou(const xywh &a,
float out_h = out_lrtb.b - out_lrtb.t;

float iou;
if(in_w <= 0 or in_h <= 0) {
if(in_w <= 0 || in_h <= 0) {
iou = 0;
if(out_w == 0 and out_h == 0) { return 0; }
if(out_w == 0 && out_h == 0) { return 0; }
} else {
float in = in_w * in_h;
float uni = a.w * a.h + b.w * b.h - in;
Expand Down

0 comments on commit 6a9ebc3

Please sign in to comment.