Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'create_execution_context' #597

Open
jiapei100 opened this issue Aug 3, 2023 · 3 comments

Comments

@jiapei100
Copy link

from jetbot import ObjectDetector

model = ObjectDetector('ssd_mobilenet_v2_coco.engine')

The above code still brought me the following ERROR messages:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-78c468b59bd4> in <module>
      1 from jetbot import ObjectDetector
      2 
----> 3 model = ObjectDetector('ssd_mobilenet_v2_coco.engine')

~/.local/lib/python3.6/site-packages/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 

~/.local/lib/python3.6/site-packages/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'

Can anybody let me know how to successfully load ssd_mobilenet_v2_coco.engine ?? BTW, I'm already using v0.4 (latest)

@sriharish-324
Copy link

Did you got any solution for this

@cccapital0107
Copy link

cccapital0107 commented Feb 12, 2024

The problem is that jetpack 4.5 doesn't support that file.

Can someone provide the file with jetpack 4.5 support?

ssd_mobilenet_v2_coco.engine

@omisha-bajoria
Copy link

The problem is that jetpack 4.5 doesn't support that file.

Can someone provide the file with jetpack 4.5 support?

ssd_mobilenet_v2_coco.engine

Were you able to find the compatible file or work something else out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants