Skip to content

Conversation

gajdosech2
Copy link

There was an error when calling model.predict when using custom img_size other than 416x416:

Invalid argument:  Input to reshape is a tensor with _XX_ values, but the requested shape has _YY_
         [[node functional_9/tf_op_layer_Reshape_12/Reshape_12 (defined at ./yolo\models.py:115) ]]
         [[functional_9/tf_op_layer_Mul_89/Mul_89/_6]]

This is caused by the incompatibility of grid_size when calling get_boxes inside of yolov4_head. This is a simple fix I use in my fork, which scales the grid_size accordingly to the custom img_size. Merge if you find it suitable.

BTW @taipingeric thank you for your work!

@remingm
Copy link

remingm commented Jan 20, 2023

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants