Traceback (most recent call last): File "D:/Taoyoufeng/detr_1/detr-pytorch-master/predict.py", line 14, in <module> detr = Detection_Transformers() File "D:\Taoyoufeng\detr_1\detr-pytorch-master\detr.py", line 79, in __init__ self.generate() File "D:\Taoyoufeng\detr_1\detr-pytorch-master\detr.py", line 90, in generate self.net = DETR(self.backbone, 'sine', 256, self.num_classes, num_queries=100) AttributeError: 'Detection_Transformers' object has no attribute 'backbone' Process finished with exit code 1
时间: 2023-06-20 19:10:15 浏览: 534
(179979052)基于MATLAB车牌识别系统【带界面GUI】.zip
这个错误提示显示在执行 `predict.py` 文件时出错了,具体是因为 `Detection_Transformers` 类没有属性 `backbone`,而在 `generate()` 方法中又使用了这个属性。可能需要查看代码并确保 `backbone` 属性已经被正确定义和初始化。另外,还需要确保 `num_classes` 属性也已经被正确定义和初始化。
阅读全文