About FCOS Model

I am using FCOS for my task and when I checked the source code, I was confused when I saw the source code to calculate the area below. Please check if it is OK and why? Thanks

Does anybody help me?

Without giving enough information it could be hard to help you properly.
If I understand the confusion correctly, you don’t understand how gt_area is calculated.
Based on the screenshot it seems gt_boxes contains coordinates and the area calculation seems to compute the sides of a rectangle first and multiplies these afterwards.
To better understand it, print the values and verify the calculation locally.

PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier.

1 Like

The source code was wrong and was fixed in fix fcos gt_areas calculation by simonJJJ · Pull Request #5816 · pytorch/vision · GitHub

1 Like