Hi. If you didnt know already the class of problems you are referring to are called “object detection”.
There a multiple deep learning approaches to this problem such as R-CNN,  Fast R-CNN, YOLO etc.
Here is an example of one such implementation https://github.com/eriklindernoren/PyTorch-YOLOv3.git 236
I strongly suggest you this lecture for an overview https://www.youtube.com/watch?v=nDPWywWRIRo 75