BonesCat / YoloV5_PyQt5

Add gui for YoloV5 using PyQt5
GNU General Public License v3.0
140 stars 21 forks source link

AttributeError: 'UI_Logic_Window' object has no attribute 'opt' #2

Open vitamin520 opened 2 years ago

vitamin520 commented 2 years ago

您好,我在运行python main_logic.py进入检测界面,选择了一段视频进行检测,就出现了如下问题: You pressed sign in Jump to main window Traceback (most recent call last): File "/home/tempdisk/PycharmProjects/YoloV5_PyQt5-main/detect_logical.py", line 240, in show_video_frame info_show = self.detect(name_list, img) # 检测结果写入到原始img上 File "/home/tempdisk/PycharmProjects/YoloV5_PyQt5-main/detect_logical.py", line 124, in detect img = letterbox(img, new_shape=self.opt.img_size)[0] AttributeError: 'UI_Logic_Window' object has no attribute 'opt' Aborted (core dumped) 请问您知道是什么原因造成的吗? 期待您的回复。

BonesCat commented 2 years ago

我这里运行没有问题啊。你debug一下看看,是不是opt没有添加self

XhHello commented 2 years ago

我运行时也遇到了同样的报错,请问如何解决啊

XhHello commented 2 years ago

您好,我在运行python main_logic.py进入检测界面,选择了一段视频进行检测,就出现了如下问题: You pressed sign in Jump to main window Traceback (most recent call last): File "/home/tempdisk/PycharmProjects/YoloV5_PyQt5-main/detect_logical.py", line 240, in show_video_frame info_show = self.detect(name_list, img) # 检测结果写入到原始img上 File "/home/tempdisk/PycharmProjects/YoloV5_PyQt5-main/detect_logical.py", line 124, in detect img = letterbox(img, new_shape=self.opt.img_size)[0] AttributeError: 'UI_Logic_Window' object has no attribute 'opt' Aborted (core dumped) 请问您知道是什么原因造成的吗? 期待您的回复。

请问你解决这个问题了吗