From the comments, it sounds like all you want to do is detect the images you have. That makes this an easy problem.
If a given image is the same as an image you have, return the information (such as a category) for that image. If the given image does not match an image you have, do not return such information.
In Python, that would be something like this.
Assuming the rectangle is as below (easily adjusted if otherwise)
The tangent of the angle of rotation is given by
Depending on quadrant of interest one can take the opposite coordinates. Getting the inverse tan function gives the angle in radians.
The width is given by
A region of interest is a patch of the image which is sent to a classifier; it may not match the ground truth object bounding box. The bounding box prediction is computed from the features in the region of interest (e.g., via a linear regression or neural network regression) and should more closely match the ground truth bounding box.