Objectron icon indicating copy to clipboard operation
Objectron copied to clipboard

Possible bug in from_transformation in box.py

Open melecmat opened this issue 2 years ago • 2 comments

Hi, I noticed that in the class method from_transformation in box.py, the transformation itself is thrown away, only the points are kept, upon calling cls(vertices=vertices). That cannot be right? For example, in IOU computation, the boxes are transformed by these transforms, so when they are not set it leads to different results.

Best, Matous

melecmat avatar Feb 28 '22 19:02 melecmat

it is working as intended. It will keep the vertices, and sets everything else to None in the constructor. Every time if you access any of the transformation, rotation, translation, etc. if it is None it will fit a transformation to the vertices via [.fit()]( def translation(self):).

ahmadyan avatar Feb 28 '22 19:02 ahmadyan

Ah, OK, now I see it. Thanks.

Out of curiosity, can I ask what is the main reason for this design choice?

melecmat avatar Mar 01 '22 08:03 melecmat