Thank you for your reply with the implementation of SSD and RetinaNet. I am running your RetinaNet notebook. I changed the dataset to URLs.COCO_TINY and I changed image size to 224 data = get_data(64,224) to quick test. But I am getting the following error. The error is from act_to_bbox function. The anchor and activation shape do not match.
wow, first of all, I would like to say thank you. I never really thought that someone really dig inside to run my code… I probably should document and finish my code in a better way.
Yes, I think the problem happened because I hard code the feature map size (Retina Net, the SSD was too long ago, I really have to think what I did)
Here is what I meant:
Retina Net use FPN, you will need to find the filter size from C3-C5. In order to get right filter size, you will need to know the input image size. Therefore, if you change the input size as my notebook, you will have to change the filter size
anc_grids = [32,16,8,4,2]
This line here tells the model to calculate the anchor boxes based on the different filter size. As input of the image size 256, you have C3 = 32, C4 = 16 and so on
So the question become how to find right filter size
This is where this lines coming in.
a. Use fastai create_body to create encoder. remove the head
b. model sizes tells you where the different sizes are, you just have to tell your image size, in your case (224,224)
c. change the anc_grids accordingly.
You should get things going. You can double check if the anchor boxes now are 9441 instead of 3069
I hope this helps.
And thank you so much running my code, next time I will make sure even is some dev notebooks they will be well documented.