PeterH0323/Smart_Construction

when I run ''python visual_interface.py'',it shows this error,I don't know how to solve it.

GeXu66 opened this issue · 2 comments

(py3.8) E:\Smart_Construction-master>python visual_interface.py
QFont::setPointSize: Point size <= 0 (-1), must be greater than 0
QFont::setPointSize: Point size <= 0 (-1), must be greater than 0
qt.qpa.fonts: Unable to open default EUDC font: "EUDC.TTE"
Using CUDA device0 _CudaDeviceProperties(name='GeForce MX230', total_memory=2048MB)

Traceback (most recent call last):
File "visual_interface.py", line 471, in
main_window = MainWindow(weight_root, out_file_root, real_time_show_predict)
File "visual_interface.py", line 256, in init
self.predict_handler_thread = PredictHandlerThread(self.input_player,
File "visual_interface.py", line 115, in init
self.predict_model = YOLOPredict(weight_path, out_file_path)
File "E:\Smart_Construction-master\detect_visual.py", line 41, in init
self.model, self.half, self.names, self.colors, self.device = self.load_model()
File "E:\Smart_Construction-master\detect_visual.py", line 59, in load_model
model = attempt_load(weights, map_location=device) # load FP32 model
File "E:\Smart_Construction-master\models\experimental.py", line 133, in attempt_load
model.append(torch.load(w, map_location=map_location)['model'].float().fuse().eval()) # load FP32 model
File "D:\ANACONDA\envs\py3.8\lib\site-packages\torch\serialization.py", line 592, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "D:\ANACONDA\envs\py3.8\lib\site-packages\torch\serialization.py", line 851, in _load
result = unpickler.load()
AttributeError: Can't get attribute 'C3' on <module 'models.common' from 'E:\Smart_Construction-master\models\common.py'>

The reason is your weight path is not correct , pls read this: 如何使用可视化工具

The reason is your weight path is not correct , pls read this: 如何使用可视化工具

But I just put the .pt file in the weights folder.The weights path is correct.