broadinstitute / keras-rcnn

Keras package for region-based convolutional neural networks (RCNNs)
Other
553 stars 223 forks source link

Intersection over Union (IoU) algorithm #47

Closed yanfengliu closed 7 years ago

yanfengliu commented 7 years ago

I think IoU is supposed to be like this: iou_equation

But based on the code in this library, the definition of union is currently implemented as the rectangle defined by the top left corner of the first box and the bottom right corner of the second box, which is bigger than the true union.

code related to this issue here

hgaiser commented 7 years ago

Nice catch, looks like you're correct. Interestingly in https://github.com/broadinstitute/keras-rcnn/blob/master/keras_rcnn/backend/tensorflow_backend.py#L138-L151 it seems to be properly implemented using tensorflow functions. Will you make a PR to fix this?

yanfengliu commented 7 years ago

@hgaiser Yeah I can do that

jhung0 commented 7 years ago

Thanks for catching that!