How do deep neural networks deal with 0->N outputs?

Let's say I was building a CNN to detect dogs in an image, and then place a bounding box around them. There can be 0 dogs, or 100 dogs in an image.

How do I deal with that variable output? My current theory is to have many rows of 5 columns (aiming for 0->1 for whether or not a dog is described for column 0, columns 1-4 are the bounding box coordinates) - the many rows take into account the possible amount of dogs there. But that seems iffy to me, because typically you try to avoid functions that have arbitrary limits like that when programming (the ol' 0, 1, or N rule).

Is there an output style that I haven't encountered or simply don't know the name of that can account for multiple or no outputs?

Posted Jan 27, 2018, 5:52 AM UTC

32
Writes_A_Bit•

Look up R-CNNs. The network makes proposals for regions, and then computes probabilities for each bounding box. YOLO object detector is also quite interesting.

3
hlfshellOP•

Ok cool, thanks. I really didn't know if there was just a whole another architecture for this and that's why I was having issues discovering the answer - I'm looking in the wrong places basically.

Thanks!

2