tiny-faces-pytorch icon indicating copy to clipboard operation
tiny-faces-pytorch copied to clipboard

[Bug]: In models/utils:get_bbox: Dimension error

Open Lotayou opened this issue 5 years ago • 0 comments

Here's the original piece of code

https://github.com/varunagrawal/tiny-faces-pytorch/blob/dbe0ee57ddc41891b5228ec244946b84480d87bf/models/utils.py#L36

However the actual tensor is 4-dimensional of shape (1,h*s,w*s,25), which would lead to an out-of-bound error when the input image resolution is lower than a certain threshold (900 I presume): image

I guess this line should be written as

prob_cls[:, :, :, invalid_template_id] = 0.0

Lotayou avatar Jun 09 '20 08:06 Lotayou