Lesson 1. Bounding box detection in fastai-1.x

(Ilya) #1

I try to replicate the code from the lesson 1 of part 2 using fastai-1.0.52.
I create a databunch using ObjectItemList. In this case y are instances of ImageBBox class and the model is fed with the correct answers of the shape [-0.1658, -0.0735, 0.3601, 0.7672]. Accordingly the trained model gives predictions of the same shape. What is the correct way to transform these predictions into actual coordinates of the top left and bottom right corners in pixels and how to show an image with a predicted bounding box?

0 Likes

(Ilya) #2

Probably I should have red the docs carefully. Looks like that because ImageBBox scales the coordinates to the range (-1,1), the correct way would be (prediction + 1) * 112 for a square image with height = width = 224 pixels.

0 Likes

(Sagar Kukreja) #3

Hi @ilya_bohaslauchyk, could you share your code/notebook for the same. I am stuck on this for quite sometime now. and getting errors during databunch creation.

0 Likes