Segmentation fault
EmilyHuang-1 opened this issue · 0 comments
EmilyHuang-1 commented
Hi all, so I tried to run python3 code/coco_object_detection.py
but I got a Segmentation fault
error. Here's my trace output.
--- modulename: coco_object_detection, funcname: <genexpr>
coco_object_detection.py(28): labels = dict((int(k), v) for k, v in pairs)
--- modulename: coco_object_detection, funcname: <genexpr>
coco_object_detection.py(27): pairs = (l.strip().split(maxsplit=1) for l in f.readlines())
coco_object_detection.py(31): IM_WIDTH = 640
coco_object_detection.py(32): IM_HEIGHT = 480
coco_object_detection.py(33): camera = cv2.VideoCapture(0)
coco_object_detection.py(34): ret = camera.set(3,IM_WIDTH)
coco_object_detection.py(35): ret = camera.set(4,IM_HEIGHT)
coco_object_detection.py(37): font = cv2.FONT_HERSHEY_SIMPLEX
coco_object_detection.py(38): bottomLeftCornerOfText = (10,IM_HEIGHT-10)
coco_object_detection.py(39): fontScale = 1
coco_object_detection.py(40): fontColor = (255,255,255) # white
coco_object_detection.py(41): boxColor = (0,0,255) # RED?
coco_object_detection.py(42): boxLineWidth = 1
coco_object_detection.py(43): lineType = 2
coco_object_detection.py(45): annotate_text = ""
coco_object_detection.py(46): annotate_text_time = time.time()
coco_object_detection.py(47): time_to_show_prediction = 1.0 # ms
coco_object_detection.py(48): min_confidence = 0.20
coco_object_detection.py(51): engine = edgetpu.detection.engine.DetectionEngine(args.model)
--- modulename: engine, funcname: __init__
engine.py(69): if device_path:
engine.py(72): super().__init__(model_path)
--- modulename: basic_engine, funcname: __init__
basic_engine.py(36): if device_path:
basic_engine.py(40): self._engine = BasicEnginePythonWrapper.CreateFromFile(model_path)
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted
Any help is highly appreciated. Thanks!