Hello everyone,
I’m trying to train a jetbot, when running the live_demo.ipynb inside the object_following folder:
from jetbot import ObjectDetector
model = ObjectDetector(‘ssd_mobilenet_v2_coco.engine’)
Then I get the following error:
AttributeErrorTraceback (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.4.3-py3.6.egg/jetbot/object_detection.py in init (self, engine_path, preprocess_fn)
27 load_plugins()
28 self.trt_model = TRTModel(engine_path, input_names=[TRT_INPUT_NAME],
—> 29 output_names=[TRT_OUTPUT_NAME, TRT_OUTPUT_NAME + ‘_1’])
30 self.preprocess_fn = preprocess_fn
31
/usr/local/lib/python3.6/dist-packages/jetbot-0.4.3-py3.6.egg/jetbot/tensorrt_model.py in init (self, engine_path, input_names, output_names, final_shapes)
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()
60
61 if input_names is None:
AttributeError: ‘NoneType’ object has no attribute ‘create_execution_context’
Does anyone know what I have to do regarding the situation?
I have already looked at the most common solution on this forum, reinstalling the packages ect
Thanks in advance!
Hi,
Which JetPack version do you use?
Please note that the GitHub is tested with JetPack 4.5.
Thanks.
Hi,
Sorry for the late update.
The model doesn’t work with the newer JetPack.
Please use JetPack 4.3 instead.
You can find more info in the below link:
opened 01:09AM - 22 Apr 21 UTC
closed 08:31PM - 18 Jul 22 UTC
## My environment: ##
**ubuntu**       &emsp… ;18.04 aarch64
**jetpack**        jetson-nano-jp451-sd-card-image
**jetbot**           v0.4.3
**tensorflow**       2.4.0+nv21.3
**tensorrt**        7.1.3.0
**torch**          1.6.0
**torchvision**       0.7.0a0+78ed10c
**setuptools**       49.6.0
## Model version: ##
**ssd_mobilenet_v2_coco.engine:** v0.4 (latest)
## When I execute the command: ##
`from jetbot import ObjectDetector`
`from jetbot import Camera`
`model = ObjectDetector('ssd_mobilenet_v2_coco.engine')`
`camera = Camera.instance(width=300, height=300)`
`detections = model.value(camera.value)`
`print(detections)`
## I get this error information:##
[TensorRT] ERROR: coreReadArchive.cpp (38) - Serialization Error in verifyHeader: 0 (Version tag does not match)
[TensorRT] ERROR: INVALID_STATE: std::exception
[TensorRT] ERROR: INVALID_CONFIG: Deserialize the cuda engine failed.
Traceback (most recent call last):
File "object_follow.py", line 4, in
model = ObjectDetector('ssd_mobilenet_v2_coco.engine')
File "/usr/local/lib/python3.6/dist-packages/jetbot-0.4.3-py3.6.egg/jetbot/object_detection.py", line 29, in init
output_names=[TRT_OUTPUT_NAME, TRT_OUTPUT_NAME + '_1'])
File "/usr/local/lib/python3.6/dist-packages/jetbot-0.4.3-py3.6.egg/jetbot/tensorrt_model.py", line 59, in init
self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'
## If anyone can help me, I would be very grateful ##
Thanks.
system
Closed
May 8, 2024, 5:41am
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.