NVIDIA-AI-IOT / jetbot

An educational AI robot based on NVIDIA Jetson Nano.
MIT License
3.02k stars 1.03k forks source link

object following, can't import ssd_mobile_v2_coco.engine #96

Closed SJTUJory closed 5 years ago

SJTUJory commented 5 years ago

when I run the first step, from jetbot import ObjectDetector model=ObjectDetector('/home/jetbot/Notebooks/object_following/ssd_mobilenet_v2_coco.engine') it told me. `--------------------------------------------------------------------------- AttributeError Traceback (most recent call last)

in 1 from jetbot import ObjectDetector 2 ----> 3 model = ObjectDetector('/home/jetbot/Notebooks/object_following/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'`
santaimpersonator commented 5 years ago

Hey there, I just ran into this issue as well... what did you do to resolve the issue?

hungnm2014 commented 5 years ago

@SJTUJory I get same issue, could you share How to fix this Thanks

santaimpersonator commented 5 years ago

@hungnm2014 On my end, I narrowed it down to a version issue with TensorRT. I documented it in issue https://github.com/NVIDIA-AI-IOT/jetbot/issues/126.

HabonRoof commented 5 years ago

Is there any solution? I have the same issue,too.

allengwinn commented 5 years ago

I'm a n00b with this robot but it looks like ssd_mobilenet_v2_coco.engine may need to be recompiled for TensorRT 5.1.6.1. However that's done :) It complains about a versioning problem. Unfortunately the issue was apparently rectified and closed by one guy without giving much detail.

j-vara commented 4 years ago

I have the same problem, any idea? I have read issue #126 but I don't find an answer, may be I am not undertanding it.

AK51 commented 4 years ago

I have the same problem too. is there any solution? I use the SD card image.