Closed jrounds closed 2 months ago
I ran into this issue too. It is also present in DescToBBoxDict
: https://github.com/TorchDSP/torchsig/blob/53cb06343cb89ff1e764c6813fe1d71d981cae0f/torchsig/transforms/target_transforms.py#L1068
I'm having the same problem, and I think the right thing to do would be to delete the [0] from line 1068 of the code above
Large transform and bounding box rework since 0.4.2, so closing out.
First thanks for the paper and the models.
The bug I am going to describe slipped into a couple spots in target_transforms.py.
Describe the bug DescToBBoxSignalDict creates incorrect box.
To Reproduce
Latest main branch
Suppose you have a label loaded like this (which I got from your code examples):
We expect some sort of box out of this
But we get this:
Strange 0 width point box.
Why?
How about this: https://github.com/TorchDSP/torchsig/blob/main/torchsig/transforms/target_transforms.py#L1116
The bbox starts as an array of length 4 but that [0] takes out the first element. And then for the assignment, since the array already has a shape of (...,4) ,the assignment just duplicates the [0] value across the box. Result: no box.
There is a blame for it:
It looks a little more correct to me before that commit v0.4.0 (https://github.com/TorchDSP/torchsig/pull/137[)](https://github.com/TorchDSP/torchsig/commit/c9b1193fe8aab02d0b5e3478ddc94b57bf4c69bb) which added the [0] indexing of the 4 tuple.