Inference for Mobilenet_v1 classification using gstreamer

Hi,
I converted an image classification Mobilenetv1 model to Hailo HEF.
My next step is to run inference on images.
I found a script for it here, but its using resnet instead of mobilenet.

Can somebody help how to modify it for mobilenet_v1?

Regards

You will need to do 2 modifications to support mobilenet_v1:

  1. In file classification.sh, replace line #14:
    readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/resnet_v1_50.hef"
    with:
    readonly DEFAULT_HEF_PATH="$RESOURCES_DIR/mobilenet_v1.hef"
    Assuming that you have mobilenet_v1.hef in the directory tappas/apps/h8/gstreamer/general/python/resources

  2. In file classification.py, replace line #20:
    results = video_frame.roi.get_tensor("resnet_v1_50/softmax1")
    with:
    results = video_frame.roi.get_tensor("mobilenet_v1/softmax1")

Note that you can use the command hailortcli parse-hef <HEF FILE> to see the name of the output layers.