Why do we need to add a batch dimension in front of the tensor?

In Lab 2 run_detector function, why do we need to add a batch dimension in front of the tensor?

# add a batch dimension in front of the tensor
converted_img  = tf.image.convert_image_dtype(img, tf.float32)[tf.newaxis, ...]

Simply because the model used on the detector accepts inputs with 4 dimenssions including the batch dimension.