github-luffy / PFLD_68points_Pytorch

Implementation of PFLD For 68 Facial Landmarks By Pytorch
323 stars 73 forks source link

camera.py运行自动闪退了 #1

Closed DWCTOD closed 4 years ago

DWCTOD commented 4 years ago

运行 camera.py 自动会闪退 AttributeError: 'BlazeLandMark' object has no attribute 'secondconv' 无论是用 视频文件还是接摄像头都会闪退 这里我的权重文件是用项目中提供的 model_10.pth

github-luffy commented 4 years ago

不好意思 这个模型是不能用的 我重新上传一个模型文件 你试试看

github-luffy commented 4 years ago

上传的模型暂时只是用了300W与WFLW训练出来的,68点特征点 你试试看 best_model.pth.

DWCTOD commented 4 years ago

感谢大佬回复和分析,我想试着按照项目中的介绍去训练一下,发现在数据集处理的时候就出现问题了 image 把下载好的数据集放在这个路径下然后运行 python3 WFLW_SetPreparation68.py 报错,根据提示应该是路径的问题导致图片没有读取进去

github-luffy commented 4 years ago

感谢大佬回复和分析,我想试着按照项目中的介绍去训练一下,发现在数据集处理的时候就出现问题了 image 把下载好的数据集放在这个路径下然后运行 python3 WFLW_SetPreparation68.py 报错,根据提示应该是路径的问题导致图片没有读取进去

图片是放在/data/WFLW/raw里面嘛 raw里面放的应该是WFLW的图片目录 是这样的嘛?raw目录下存放的目录应该是如下所示: 0--Parade 1--Handshaking ...

DWCTOD commented 4 years ago

感谢大佬回复和分析,我想试着按照项目中的介绍去训练一下,发现在数据集处理的时候就出现问题了 image 把下载好的数据集放在这个路径下然后运行 python3 WFLW_SetPreparation68.py 报错,根据提示应该是路径的问题导致图片没有读取进去

图片是放在/data/WFLW/raw里面嘛 raw里面放的应该是WFLW的图片目录 是这样的嘛?

O.O,原来是这样子的,哈哈哈,因为我解压之后还有一个大的文件夹包含里面的小文件,现在可以啦哈,太感谢啦

DWCTOD commented 4 years ago

不知道大佬对于关键点的抖动,有没有什么好的思路去解决呢? 加跟踪?

github-luffy commented 4 years ago

关键点的抖动 是指 测试视频流中的人脸 其特征点抖动的比较厉害?

DWCTOD commented 4 years ago

关键点的抖动 是指 测试视频流中的人脸 其特征点抖动的比较厉害?

是的呀,就是人基本不怎么动的情况下,人脸特征点还是会一直抖动的比较厉害

github-luffy commented 4 years ago

刚上传的模型 你测试也会这样的嘛

github-luffy commented 4 years ago

1.要保证人脸框不能抖得太厉害,就是前后人脸框位置变化大,当然真实人脸位置移动正常,可以加人脸跟踪方法,人脸跟踪其实也可简单设置; 2.可能人脸特征点模型泛化能力不强,可增加数据训练。

DWCTOD commented 4 years ago

是呀,其实这种抖动,就是人基本正常不怎么动的时候也会存在的

github-luffy commented 4 years ago

你好 @github-luffy ,我想问一下我根据已有98点(https://github.com/polarisZhao/PFLD-pytorch)代码训练出来的98点的NME只有0.07左右,我看到你在另外一个工程里说到的调优方法,不知道对应的具体的网络是哪个?

谢谢

mobileNetV3_large或者blazeface,你都可以试试

zcxxlshirley commented 4 years ago

请问 运行 camera.py
抛出terminate called after throwing an instance of 'dmlc::Error' Aborted (core dumped) 是怎么回事呢?

github-luffy commented 4 years ago

请问 运行 camera.py 抛出terminate called after throwing an instance of 'dmlc::Error' Aborted (core dumped) 是怎么回事呢?

用了mxnet,你可能安装的不是gpu版本,先卸载mxnet,然后安装mxnet-gpu版本

github-luffy commented 4 years ago

EfficientNet系列的模型已更新,速度快,精度高,奥力给!

lfxx commented 4 years ago

EfficientNet系列的模型已更新,速度快,精度高,奥力给!

您好,更新后的预训练模型有吗,想测试一下效果.测试了best_model.pth,感觉效果不是很好.另外想问您一下,输出的关键点置信度有什么意义呢,表示点位置的精准度吗.使用best_model.pth测试时关键点置信度并不是很高

github-luffy commented 4 years ago

best_model.pth是利用300W与WFLW两个训练集训练出来的最好模型,使用BlazeLandmark网络,应该还可以继续调优。 输出的关键点置信度是指关键点热力图,正常来说置信度越高,表示是人脸关键点的可能性越高。

lfxx commented 4 years ago

best_model.pth是利用300W与WFLW两个训练集训练出来的最好模型,使用BlazeLandmark网络,应该还可以继续调优。 输出的关键点置信度是指关键点热力图,正常来说置信度越高,表示是人脸关键点的可能性越高。

谢谢您的回复,看了下源码,这个置信度其实并不是图像分类中的置信度,其实是位置归一化后的数值,乘上宽高以后就可以得到点位的坐标.这样理解对吗? 另外如果训练时的人脸提取器和推理时的不一样,比如用mtcnn提取人脸位置用于训练,retinaface提取人脸用于推理,会影响检测效果吗?

github-luffy commented 4 years ago

训练特征点时需要归一化操作,编码与解码的一个过程。 训练样本不一样,检测效果肯定不一样。

github-luffy commented 4 years ago

image 能把这个文件发一下吗?运行camera.py就出现这个错。

安装了mxnet-gpu吗

17601614169 commented 4 years ago

感谢回复。给你发了之后我才发现我的电脑是AMD的,现在正在尝试CPU运行。

------------------ 原始邮件 ------------------ 发件人: "叶修强"<notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午2:51 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

能把这个文件发一下吗?运行camera.py就出现这个错。

安装了mxnet-gpu吗

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

17601614169 commented 4 years ago

代码使用的是Python哪个版本?

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午2:51 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

能把这个文件发一下吗?运行camera.py就出现这个错。

安装了mxnet-gpu吗

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

github-luffy commented 4 years ago

python3.6

17601614169 commented 4 years ago

好的,谢谢。

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午3:24 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

python3.6

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

17601614169 commented 4 years ago

博主您好,如果我想用图片测试的话需要运行哪个代码?

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午2:51 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

能把这个文件发一下吗?运行camera.py就出现这个错。

安装了mxnet-gpu吗

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

github-luffy commented 4 years ago

博主您好,如果我想用图片测试的话需要运行哪个代码? ------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午2:51 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1) 能把这个文件发一下吗?运行camera.py就出现这个错。 安装了mxnet-gpu吗 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

test.py,代码估计也好懂 就不讲了

17601614169 commented 4 years ago

好的,谢谢。

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午5:07 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

test.py

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

github-luffy commented 4 years ago

好的,谢谢。

test.py,代码估计也好懂 就不讲了

17601614169 commented 4 years ago

辛苦了。

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午5:09 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

好的,谢谢。

test.py,代码估计也好懂 就不讲了

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

github-luffy commented 4 years ago

辛苦了。 ------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 下午5:09 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1) 好的,谢谢。 test.py,代码估计也好懂 就不讲了 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

不辛苦 点个赞就ok 哈

Shzhentao commented 4 years ago

您好,我运行python camera.py 显示No such file or directory: 'test_models2/model_37.pth',这是什么问题呢?谢谢!

17601614169 commented 4 years ago

你去文件路径找找看有这个路径和文件吗?我的里面没有

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 晚上7:41 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

您好,我运行python camera.py 显示No such file or directory: 'test_models2/model_37.pth',这是什么问题呢?谢谢!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Shzhentao commented 4 years ago

没有呀

17601614169 commented 4 years ago

没有那就换啊,里面有别的模型。

------------------ 原始邮件 ------------------ 发件人: "github-luffy/PFLD_68points_Pytorch" <notifications@github.com>; 发送时间: 2020年8月27日(星期四) 晚上7:43 收件人: "github-luffy/PFLD_68points_Pytorch"<PFLD_68points_Pytorch@noreply.github.com>; 抄送: "♚丨勿忘心安💢"<799073422@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [github-luffy/PFLD_68points_Pytorch] camera.py运行自动闪退了 (#1)

没有呀

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Shzhentao commented 4 years ago

你成功了吗?它显示runtime error: ./pretrained_model/efficientNet-b0.pth is a zip archive,你是加载了哪个

17601614169 commented 4 years ago

image

github-luffy commented 4 years ago

您好,我运行python camera.py 显示No such file or directory: 'test_models2/model_37.pth',这是什么问题呢?谢谢!

你可以试试 pretrained_model的几个模型,记得加载模型 image

17601614169 commented 4 years ago

我没训练直接跑的test代码,但没成功,根据网上的方法都试过了也不行。 image

github-luffy commented 4 years ago

我没训练直接跑的test代码,但没成功,根据网上的方法都试过了也不行。 image

人脸检测的retinaface模型是mxnet框架的,你安装的是哪个版本的mxnet,mxnet还是mxnet-gpu?

17601614169 commented 4 years ago

我没训练直接跑的test代码,但没成功,根据网上的方法都试过了也不行。 图片

人脸检测的retinaface模型是mxnet框架的,你安装的是哪个版本的mxnet,mxnet还是mxnet-gpu?

image cpu

17601614169 commented 4 years ago

电脑不是N卡 装gpu也没用吧?

Shzhentao commented 4 years ago

您好,请问您用的pytorch版本是多少呀?

github-luffy commented 4 years ago

试试安装一下mxnet-gpu,然后跑跑看

github-luffy commented 4 years ago

pytorch 1.0以上

Shzhentao commented 4 years ago

谢谢您,但是我这里加载模型会显示RuntimeError: ./pretrained_model/blazelandmark.pth is a zip archive(did you mean to use torch.jit.load()) question

Shzhentao commented 4 years ago

好像说是模型是zip archive架构的

github-luffy commented 4 years ago

干脆直接用最新的pytorch版本好了

Shzhentao commented 4 years ago

好的,谢谢您,我试试

17601614169 commented 4 years ago

image 换成gpu就出这个错了,头大