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
你好,请问如果想将此项目用在摄像头上或者视频中,我应该怎么修改代码呢,谢谢!
The text was updated successfully, but these errors were encountered:
@SnailDUDUDU 做以下修改即可: if name == "main": parser = argparse.ArgumentParser() parser.add_argument('--confThreshold', default=0.25, type=float, help='class confidence') parser.add_argument('--nmsThreshold', default=0.45, type=float, help='nms iou thresh') parser.add_argument('--objThreshold', default=0.5, type=float, help='object confidence') args = parser.parse_args()
# yolonet = yolop(confThreshold=args.confThreshold, nmsThreshold=args.nmsThreshold, objThreshold=args.objThreshold) # srcimg = cv2.imread(args.imgpath) # outimg = yolonet.detect(srcimg) # # winName = 'Deep learning object detection in OpenCV' # cv2.namedWindow(winName, 0) # cv2.imshow(winName, outimg) # cv2.waitKey(0) # cv2.destroyAllWindows() yolonet = yolop(confThreshold=args.confThreshold, nmsThreshold=args.nmsThreshold, objThreshold=args.objThreshold) input_video = cv2.VideoCapture("你的视频文件或摄像头号") while cv2.waitKey(1) < 0: grabbed, srcimg = input_video.read() if not grabbed: break print('get images!') outimg = yolonet.detect(srcimg) winName = 'Deep learning object detection in OpenCV' cv2.namedWindow(winName, 0) cv2.imshow(winName, outimg) cv2.destroyAllWindows()
Sorry, something went wrong.
No branches or pull requests
你好,请问如果想将此项目用在摄像头上或者视频中,我应该怎么修改代码呢,谢谢!
The text was updated successfully, but these errors were encountered: