In trying to replicate the DIGITS clustering algorithm in c++, (I think) I have discovered a bug clustering.py.
The clustering layer for detectnet has a method vote_boxes() that takes bounding boxes and groups them using opencv’s groupRectangles() method. If I read the source correctly, however, this call is being made improperly. It looks like the bounding boxes are stored as lists of [x1, y1, x2, y2] in caffe, but groupRectangles() expects them to be passed in as lists of [x, y, width, height].
Am I reading this correctly?
(please note I have verified the python → c++ translation of the python bindings by building opencv from source)
References:
caffe source: [url]https://github.com/NVIDIA/caffe/blob/caffe-0.17/python/caffe/layers/detectnet/clustering.py#L178[/url]
cv::Rect docs: OpenCV: cv::Rect_< _Tp > Class Template Reference
bug report: https://github.com/NVIDIA/caffe/issues/557