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

problem about the bbox format #2

Closed
LeeBC2298 opened this issue Aug 3, 2020 · 3 comments
Closed

problem about the bbox format #2

LeeBC2298 opened this issue Aug 3, 2020 · 3 comments

Comments

@LeeBC2298
Copy link

I need to feed my own data and I feed the data as the note under 'calculate_actual_outputs':
image

And my data is like this:
the prior boxes:
image
the ground truth boxes:
image

I think my data format is correct, but I got this error:
image
It seems that the 'pos_cond' should be shape [batch, num_of_anchers, 4], is this caused by my data format?

@LeeBC2298
Copy link
Author

LeeBC2298 commented Aug 3, 2020

I tried to fix my problem like this:
_pos = tf.expand_dims(pos_cond, -1)
_pos = tf.concat([_pos, _pos, _pos, _pos], axis=-1)
expanded_gt_boxes = tf.where(_pos, gt_boxes_map, tf.zeros_like(gt_boxes_map))

This worked, but met another error at bbox_utils.get_deltas_from_bboxes, so I think it may be caused by my bbox format.

@FurkanOM
Copy link
Owner

FurkanOM commented Aug 3, 2020

Hi, which version of tensorflow are you using?

@LeeBC2298
Copy link
Author

Hi, which version of tensorflow are you using?

I used tensorflow 1.15.0 and this error is probably caused by the version mismatch.
I found this warning:
image
and changed tf.where to np.where, it fixed the error.

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

2 participants