sgrvinod / a-PyTorch-Tutorial-to-Object-Detection

SSD: Single Shot MultiBox Detector | a PyTorch Tutorial to Object Detection
MIT License
3.04k stars 718 forks source link

question about MultiBoxLoss and the Model #90

Open haoren55555 opened 1 year ago

haoren55555 commented 1 year ago

To be honest, this is definitely the best tutorial in object detection I have ever read, thanks for your sharing ! The question I want to ask is that I notice the MultiBoxLoss and the Model both use the "priors_cxcy", and this makes them couple together. That's to say, if I want to use another model, I should do something in the new model to fit the "priors_cxcy", right? I am new to the object detection area, and I wonder if this is normal ?

AndreiMoraru123 commented 1 year ago

@haoren55555, unfortunately the author is MIA, although he left three awesome complete tutorials.

To your point, if I get your question correctly, yes, you do need to generate specific priors for your custom model if you want to do anchor-based object detection and then inject them at whatever feature maps you will have. The priors are there to give your model something to regress on, so the loss will rely on them. If it were only the correct bounding box, so one true pixel for the center out of 300 total pixels, that would be a disaster to get right. Alternatively, one could go anchor-less with other architectures that rely on symmetries to find an object.

I know you asked this a while ago, and probably already have the answers, but I'll leave this comment here in case anyone else will come across this topic.