ZF4444 / MMAL-Net

This is a PyTorch implementation of the paper "Multi-branch and Multi-scale Attention Learning for Fine-Grained Visual Categorization (MMAL-Net)" (Fan Zhang, Meng Li, Guisheng Zhai, Yizhao Liu).
250 stars 57 forks source link

Dose AOLM have bug? the measure.regionprops returns (min_row, min_col, max_row, max_col) means (y0,x0,y1,x1) right? #26

Closed seizeMx closed 3 years ago

seizeMx commented 3 years ago

Hi ZF444, First thank your for your great idea.

I have a question about: the measure.regionprops returns (min_row, min_col, max_row, max_col) means (y0,x0,y1,x1) right? not (x0,y0,x1,y1)

https://github.com/1170500804/tbmsl/blob/67e9013756d8c11cb358f12bf4104d56bb3e1ed2/utils/AOLM.py#L38

ZF4444 commented 3 years ago

Hi! (min_row, min_col, max_row, max_col) means (x0,y0,x1,y1), you can see it here https://github.com/ZF4444/MMAL-Net/blob/4d5081bfbaec26a873a4faf1f706aa9cc8bfadcd/networks/model.py#L104

seizeMx commented 3 years ago

Oh, I just mixed up the cv2.crop and the numpy coordinates. The variable name([x0, y0, x1, y1]) makes me confused :), in cv2 it's needed to convert to (y0,x0,y1,x1) I see, thanks. No bug.