Skip to content

程序启动,前端界面无法显示。 #23

New issue

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

Open
vocal007-hub opened this issue Jan 22, 2025 · 2 comments
Open

程序启动,前端界面无法显示。 #23

vocal007-hub opened this issue Jan 22, 2025 · 2 comments

Comments

@vocal007-hub
Copy link

有小伙伴遇到这种问题吗?,求助
YOLOv5 torch 2.0.0+cpu CPU

Fusing layers...
Model Summary: 224 layers, 7062001 parameters, 0 gradients
[INFO] loading facial landmark predictor...
Traceback (most recent call last):
File "D:\CV\code\Yolov5-deepsort-driverDistracted-driving-behavior-detection-1.0\main.py", line 94, in show_pic
ret,frame = myframe.frametest(frame)
File "D:\CV\code\Yolov5-deepsort-driverDistracted-driving-behavior-detection-1.0\myframe.py", line 27, in frametest
action = mydetect.predict(frame)
File "D:\CV\code\Yolov5-deepsort-driverDistracted-driving-behavior-detection-1.0\mydetect.py", line 89, in predict
pred = model(img)[0]
File "D:\CV\jupyter\anaconda\envs\mycar\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\CV\code\Yolov5-deepsort-driverDistracted-driving-behavior-detection-1.0\models\yolo.py", line 119, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "D:\CV\code\Yolov5-deepsort-driverDistracted-driving-behavior-detection-1.0\models\yolo.py", line 135, in forward_once
x = m(x) # run
File "D:\CV\jupyter\anaconda\envs\mycar\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\CV\jupyter\anaconda\envs\mycar\lib\site-packages\torch\nn\modules\upsampling.py", line 157, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "D:\CV\jupyter\anaconda\envs\mycar\lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

@aaaAXing
Copy link

我也遇到了!你可以直接点报错那里的upsampling.py文件,打开以后找到第156行,然后把return那个语句改为 return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners),应该就可以运行了

@xinlu006
Copy link

,

你好,我在代码里没找到Upsample.py的包,请问一下这个包在哪里?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants