Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A little problem in save_crops.m #48

Open
moorejee opened this issue Mar 16, 2018 · 3 comments
Open

A little problem in save_crops.m #48

moorejee opened this issue Mar 16, 2018 · 3 comments

Comments

@moorejee
Copy link

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
Copy link
Author

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.

@guwenning
Copy link

@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.

@CXSunshine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants