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

How to implement custom_loss for grid with different width, height #444

Open
KienPM opened this issue Jan 17, 2020 · 1 comment
Open

How to implement custom_loss for grid with different width, height #444

KienPM opened this issue Jan 17, 2020 · 1 comment

Comments

@KienPM
Copy link

KienPM commented Jan 17, 2020

I'm implementing a model base on your original model with different width, height grid (28x7) according to this paper https://new.hindawi.com/journals/mpe/2018/3518959/

I got error when running the code at concat function, because according to your original, the width and height must be equal so that cell_x and cell_y can be concatenated

cell_x = tf.to_float(tf.reshape(tf.tile(tf.range(self.grid_w), [self.grid_h]), (1, self.grid_h, self.grid_w, 1, 1)))
cell_y = tf.transpose(cell_x, (0,2,1,3,4))

cell_grid = tf.tile(tf.concat([cell_x,cell_y], -1), [self.batch_size, 1, 1, self.nb_box, 1])

Can you please help me! Thank you very much!

@rodrigo2019
Copy link

https://github.com/rodrigo2019/keras_yolo2

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