Trying to execute the following utilzing the NVIDIA-AI-IOT/jetbot :
from jetbot import ObjectDetector
model = ObjectDetector(‘ssd_mobilenet_v2_coco.engine’)
here’s the error
AttributeError 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)
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’
Dou you have solved,I have the smae problem as fllow:
[TensorRT] ERROR: Could not compute dimensions for Concatenate/concat, because the network is not valid
Traceback (most recent call last):
File “main_my.py”, line 43, in
buf = engine.serialize()
AttributeError: ‘NoneType’ object has no attribute ‘serialize’
Hi, kingyuluk
Which image do you use?
Please noticed that you will need to use this image to make jetbot model work:
https://github.com/NVIDIA-AI-IOT/jetbot/wiki/software-setup#step-1—flash-jetbot-image-onto-sd-card
The model shared in the GitHub cannot work with TensorRT 5.1 yet.
Thanks
Hi, 452302450
[TensorRT] ERROR: Could not compute dimensions for Concatenate/concat, because the network is not valid
The error indicates that there are some compatible issue on the model architecture, which is different from the kingyuluk .
We always encourage user to file a new topic for their own problem so it can be well-handled.
Could you help us doing so?
Thanks.
AastaLLL:
Hi, 452302450
[TensorRT] ERROR: Could not compute dimensions for Concatenate/concat, because the network is not valid
The error indicates that there are some compatible issue on the model architecture, which is different from the kingyuluk .
We always encourage user to file a new topic for their own problem so it can be well-handled.
Could you help us doing so?
Thanks.
Hi,AastaLLL,
thanks very much,the problem has solved,and is different from the kingyuluk exactly,the reason is Compatibility issues。
AK51
February 14, 2020, 9:12am
6
I have the same AtributeError problem too. Same as the topic indicated. Is there any solution? Thx
I am using Download the expandable JetBot SD card image jetbot_image_v0p4p0.zip
AK51
February 15, 2020, 1:44pm
7
I used the older Jetbot SD card image and the problem is solved.
system
February 17, 2020, 3:50am
8
Hi, I got exactly the same error message:
from jetbot import ObjectDetector
model = ObjectDetector('ssd_mobilenet_v2_coco.engine')
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-78c468b59bd4> in <module>
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)
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'
I am using JetBot SD card image jetbot_image_v0p4p0.zip
and ssd_mobilenet_v2_coco.engine for v0.4 downloaded from ssd_mobilenet_v2_coco.engine - Google Drive
kayccc
February 27, 2020, 6:00am
9
Hi leon-zhang,
Please help to open a new topic for your issue. Thanks