We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from jetcam.csi_camera import CSICamera import paddlehub as hub import cv2 import time def draw_bbox_image(img, data_list): for boxes in data_list: print(boxes) left = int(boxes["left"] * img.shape[1]) right = int(boxes["right"] * img.shape[1]) top = int(boxes["top"] * img.shape[0]) bottom = int(boxes["bottom"] * img.shape[0]) confidence = str(boxes["confidence"]) cv2.rectangle(img, (left, top), (right, bottom), (0,255,0), 2) cv2.putText(img, confidence, (left, top-2), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0,255,0), 2) if __name__ == "__main__": camera = CSICamera(capture_device=0, width=224, height=224) object_detector = hub.Module(name="ssd_mobilenet_v1_pascal") while True: frame = camera.read() tim1 = time.time() result = object_detector.object_detection(images=[frame], use_gpu=True) try: data_list = result[0]["data"] draw_bbox_image(frame, data_list) print("data_list:", data_list) except IndexError: pass cv2.imshow("result", frame) tim2 = time.time() tim = tim2 - tim1 print("tim", tim) print("result", result) if cv2.waitKey(1) & 0xFF == ord('q'): break
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
请您参考#1301 查看自己的cuda和cudnn及paddlepaddle-gpu三者之间的版本是否匹配,一般出现segmentation fault一般是由于cudnn和cuda版本及paddlepaddle-gpu版本不匹配导致的
haoyuying
No branches or pull requests
1)PaddleHub和PaddlePaddle版本:PaddleHub:1.8.0,PaddlePaddle-gpu:2.0.0
2)系统环境:Jetson nano Ubuntu18.04,python3.6.9
The text was updated successfully, but these errors were encountered: