Jetson Nano Jetbot ssd_mobilenet_v2_coco.engine - file not found error

Trying to execute the following utilzing the NVIDIA-AI-IOT/jetbot :

from jetbot import ObjectDetector
model = ObjectDetector(‘ssd_mobilenet_v2_coco.engine’)

I’m receiving the following error shown below.

Question is I have all of the jetbot packages installed and updated, so not sure what I’m missing. Any thoughts?


FileNotFoundError Traceback (most recent call last)
in
1 from jetbot import ObjectDetector
2
----> 3 model = ObjectDetector(‘ssd_mobilenet_v2_coco.engine’)

/usr/local/lib/python3.6/dist-packages/jetbot-0.3.0-py3.6.egg/jetbot/object_detection.py in init(self, engine_path, preprocess_fn)
26 load_plugins()
27 self.trt_model = TRTModel(engine_path, input_names=[TRT_INPUT_NAME],
—> 28 output_names=[TRT_OUTPUT_NAME, TRT_OUTPUT_NAME + ‘_1’])
29 self.preprocess_fn = preprocess_fn
30

/usr/local/lib/python3.6/dist-packages/jetbot-0.3.0-py3.6.egg/jetbot/tensorrt_model.py in init(self, engine_path, input_names, output_names, final_shapes)
55 self.logger = trt.Logger()
56 self.runtime = trt.Runtime(self.logger)
—> 57 with open(engine_path, ‘rb’) as f:
58 self.engine = self.runtime.deserialize_cuda_engine(f.read())
59 self.context = self.engine.create_execution_context()

FileNotFoundError: [Errno 2] No such file or directory: ‘ssd_mobilenet_v2_coco.engine’

Well, do you have the file ‘ssd_mobilenet_v2_coco.engine’ ?
(This is presumably a pre-trained model file you can download.)
Is the file available in the current working directory for the program?

Thanks for the reply, snarky. It’s there… but to your point, I may not have it in the working directory for the program. My dev machine is at the house. Will take a look at it tonight and report back.

Slow reply… but worth updating. I am using a Jupyter notebook to run the packages. To Snarky’s point, I needed to move the ‘ssd_mobilenet_v2_coco.engine’ into the same directory as the notebook. Worked like a champ.

Does anyone mind sharing how they acquired that .engine file? I’m running through the jetbot documentation and cannot find it.

@bbauerly - it’s buried in the jetbot docs in a strange place. It took me a while to find it too:

I have similar error, I have put the engine in the same folder, but it has attribute error.

I used the older Jetbot SD card image and the problem is solved.

What exactly is the “older” image of the Jetbot SD card? And what was the problem - I have the same problem and can’t find a solution?

Hi,

I took me a long time to figure it out… :<
There are two version of nano

https://github.com/NVIDIA-AI-IOT/jetbot/wiki/software-setup

The previous image based on JetPack 4.2 may be found here: jetbot_image_v0p3p2.zip.

I think it’s the same problem as this topic.
Jetbot Object Detection Model Issue - Cannot load

The latest ssd_mobilenet_v2_coco.engine is here.
https://github.com/NVIDIA-AI-IOT/jetbot/wiki/examples

v0.4 (latest) ssd_mobilenet_v2_coco.engine

https://drive.google.com/file/d/1KjlDMRD8uhgQmQK-nC2CZGHFTbq4qQQH/view

Hello,

Is there a way to create my own ‘.engine’ file with my .weights and .cfg file?
I have used Yolov3 with Darknet framework… according to Darknet documentation it is supported TensorRT.

Thank you very much in advance.

Best regards,

Antonio N.