Being able to create your own localizer is a good way to acquire intuition on how an object detection network might work. This is because the only conceptual difference between object detection and localization networks is that a localization network predicts a single bounding box, while an object detection network predicts multiple boxes. Also, it is a good way to start understanding how to build a neural network that accomplishes other regression tasks.
In this section, we are going to use the same pretrained classifier network, MobileNetV2, as the previous section. However, this time we are going to use the network for localizing objects instead of classifying. Let's import the required modules and the base model in the same way that we did in the previous section—although, this time, we are not going to freeze the layers of the base model...