As mentioned earlier, we are using transfer learning for both use cases, which does not require training from scratch; retraining the models with a new dataset will sufficiently work in many cases. In addition, in Chapter 3, Image Recognition in IoT , we found that Mobilenet V1 is a lightweight (low-memory footprint and lower training time) CNN architecture. Consequently, we are implementing both uses using the Mobilenet V1 network. Importantly, we will use TensorFlow's retrain.py module as it is specially designed for CNNs (such as Mobilenet V1) based transfer learning).
We need to understand the list of key arguments of retrain.py before retraining Mobilenet V1 on the datasets. For the retraining, if we type in our Terminal (in Linux or macOS) or Command Prompt (Windows) python retrain.py -h, we will see a window like the following screenshot with additional...