example help


I am trying to run the example shown here.

when I try to run

python3 \
  --model /tmp/mobilenet_v1_1.0_224_quant.tflite \
  --labels /tmp/labels_mobilenet_quant_v1_224.txt

I get

Traceback (most recent call last):
      File "", line 96, in <module> main()
      File "", line 68, in main labels = load_labels(args.labels)
      File "", line 33, in load_labels with open(path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/labels_mobilenet_quant_v1_224.txt'

I am feeling like I missed a step in the installation or maybe the instructions are not complete?

Has anyone run across these kinds of error or has gotten these errors?

Any help would be appreciated!

Thank you,
Sean Worcester

@khanhlvg might be able to help here

Hello @lgusm!

Thank you!

I hope @khanhlvg can give a little guidance.

@Sean_Worcester have you run the file as described in the documentation? This script should have downloaded the labels_mobilenet_quant_v1_224.txt and mobilenet_v1_1.0_224_quant.tflite files into the tmp directory.

I hope this helps. Kind regards,
Gilbert Tanner

1 Like

Hello Gi_T,

I followed the steps outlined in the both the Python Quickstart and in the Classify_picamera tutorials.

I noticed the, but I don’t think it is clearly called out in the Classify_picamera tutorial.

I ran

git clone --depth 1       (1)


cd examples/lite/examples/object_detection/raspberry_pi        (2)

As instructed and I saw

# The script takes an argument specifying where you want to save the model files
bash /tmp

I thought it was referring to (1), and talking about what that step was doing.

I do see on my Raspberry Pi where all the files have been copied to.

Did I not run the script?

Thank you,
Sean Worcester

OH…I think I see where I missed the command.


It is so funny that NOW after I have copied it to this forum that it stands out.


1 Like

Hello @Gi_T

Thank you for your help!

That did the trick.

Sean Worcester

@Sean_Worcester glad to hear that it worked.

1 Like