如何解决分段错误核心转储jetson nano
我正在使用 jetson nano 从事机器人项目几个月。我创建了一个 python 3 代码,能够拍摄存储在 USB 密钥上的图像,并使 Yolo v3 分析它并检测它已被训练检测的对象。
问题是大多数时候程序给我这样的错误:segmentation fault (core dumped)。
我的程序已附加。
你能帮我解决这个问题吗?
提前致谢,
萨沙。
import cv2
import numpy as np
import sys,os
sys.path.append(os.path.join(os.getcwd(),'/home/kleanrov/Desktop/Kleenbot/code qui marche/finals
codes/algo_yogurtpot/original/darknet/python/'))
import darknet as dn
import pdb
#chargement algo_yogurtpot
dn.set_gpu(0)
net = dn.load_net(b"yogurt_bin_algo/yolov3-tiny-sacha.cfg",b"yogurt_bin_algo/yolov3-tiny-
sacha_best.weights",0)
meta = dn.load_meta(b"yogurt_bin_algo/sacha.data")
def detection_ramassage_obj():
cap = cv2.VideoCapture(gstreamer_pipeline(),cv2.CAP_GSTREAMER)
img = cv2.imwrite("/media/kleanrov/cleusb1/pict1.jpg",cap)
res = dn.detect(net,meta,img)
#res = dn.detect_img(net,img)
#print(res)
cap.release()
if res == []:
print("nothing detected")
else:
print("object detected: ")
for detection in res:
name = detection[0]
proba = detection[1]
box = detection[2]
centre_x = box[0]
centre_y = box[1]
largeur = box[2]
hauteur = box[3]
print("nom:%s,proba:%s%%,position:%s"%(name,proba*100,box))
if name == b'petit suisse':
print("yogurt pot")
GPIO.cleanup()
import module_rapprochement_final_301220
detection_ramassage_obj()
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。