We will follow a process that's similar to the one we followed for MobileNet. You can find MobileNetV2 in the Keras applications. We will use the same codes as we did for MobileNet, except we will use MobileNetV2 this time. For your reference, the code is as follows:
import keras
from keras.preprocessing import image
from keras.applications import imagenet_utils
from keras.applications.mobilenet import preprocess_input
from keras.models import Model
import numpy as np
import argparse
import matplotlib.pyplot as plt
model = keras.applications.mobilenet_v2.MobileNetV2(weights = 'imagenet')
parser = argparse.ArgumentParser()
parser.add_argument('--im_path', type = str, help = 'path to the image')
args = parser.parse_args()
# adding the path to image
IM_PATH = args.im_path
img = image.load_img(IM_PATH, target_size = (224, 224))
img...