siamese-fc icon indicating copy to clipboard operation
siamese-fc copied to clipboard

A little problem in save_crops.m

Open moorejee opened this issue 6 years ago • 3 comments

Hi, I meet a problem about padding. In save_crops.m the code calculate the padding coordinates about xmin, xmax, ymin, ymax. But there only considering the left_pad and top_pad. I think here should calculate right_pad, down_pad for xmax, ymax respectively. How do you think?

form save_crops.m 91row %check out-of-bounds coordinates, and set them to avg_chans context_xmin = round(pos(2) - c(2)); context_xmax = context_xmin + sz(2) - 1; context_ymin = round(pos(1) - c(1)); context_ymax = context_ymin + sz(1) - 1; left_pad = double(max(0, 1-context_xmin)); top_pad = double(max(0, 1-context_ymin)); right_pad = double(max(0, context_xmax - im_sz(2))); bottom_pad = double(max(0, context_ymax - im_sz(1)));

context_xmin = context_xmin + left_pad;
context_xmax = context_xmax + left_pad;
context_ymin = context_ymin + top_pad;
context_ymax = context_ymax + top_pad;

moorejee avatar Mar 16 '18 02:03 moorejee

Oh, I understand the code now. It is just an op that ignores the padding of left and top. It is a special method to select the patch.

moorejee avatar Mar 25 '18 01:03 moorejee

@moorejee Hello, I don't quite understand the 8 coordinates in ground_truth. I used a trace with a number of coordinates of 4. I found that the coordinates of the first frame are not completely wrapped.

guwenning avatar Mar 23 '19 02:03 guwenning

Do you meet this problem? save_crops(imdb_video, 1, 1000, '/home/xchen/ILSVRC2015','/home/xchen/curated/ILSVRC2015') Undefined function or variable 'imdb_video'.

CXSunshine avatar Jun 20 '19 11:06 CXSunshine