Skip to content
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

单尺度0.791! InsightFace赛高!RetinaFace MobileNet0.25同人模型公开 #669

Closed
yangfly opened this issue May 10, 2019 · 58 comments
Closed

Comments

@yangfly
Copy link

yangfly commented May 10, 2019

RetinaFace 牛逼!:two_hearts: InsightFace 赛高!:two_hearts:

开放 mobilenet0.25 版 RetinaFace 同人版模型
更完整的模型、日志和WiderFace测试截图 百度云 提取码:nzof GoogleDrive

image

模型说明,使用的是Gluon Model Zoo 的标准版 MobileNet0.25 预训练模型。(没有 fast downsampling,模型大小 1.68Mb)
Batch-size 32x2(两块1080Ti),其他参数都是 RetinaFace 默认的。

WIDER Face Hard 单尺度测试:0.791
val-hard-quick

WIDER Face Hard 多尺度测试:0.825
val-hard-slow

欢迎调参大佬,公开更给力的结果。:beer:

@BrownOfSummer
Copy link

非常感谢

@nttstar
Copy link
Collaborator

nttstar commented May 11, 2019

Great! Thanks for sharing!

@MyraBaba
Copy link

@yangfly how can we download mobileNet model ? Dropbox better in Europe ?

Can you share the model link?

@yangfly
Copy link
Author

yangfly commented May 11, 2019

@MyraBaba Update Google Drive

@MyraBaba
Copy link

@yangfly thanks a lot

is the detector line :

detector = RetinaFace('/Users/xxx/Downloads/mnet.25/mobilenet_0_25' , 0 , gpuid , 'net3')

is this correct ? because it gives error:

File "/Users/xxx/Projects/new_/insight_10May/insightface/RetinaFace/retinaface.py", line 228, in detect
scores = scores[:, self._num_anchors['stride%s'%s]:, :, :]
IndexError: too many indices for array

@Neltherion
Copy link

@yangfly Thanks for uploading the models. Could you explain what the difference is between mobilenet_0_25-0000 and mnet.25-0000 ?

@dexception
Copy link

@yangfly @nttstar
Can we convert this to TVM ?

@yangfly
Copy link
Author

yangfly commented May 12, 2019

@yangfly Thanks for uploading the models. Could you explain what the difference is between mobilenet_0_25-0000 and mnet.25-0000 ?

mobilenet_0_25-0000 is the pre-trained model from Gluon Model Zoo and mnet.25-0000 is the detector that I trained.

@Neltherion
Copy link

@yangfly Ah... I get it... thanks... (I was thinking they BOTH are Detector models)

@MyraBaba
Copy link

@yangfly quick question:

When I try mobile model mode cpu is using 4 cores and perform very well and fast, but normal model using only one core and pretty slooooow in cpu.

any idea why ? how can I push to use all available cores ?

Best

@yangfly
Copy link
Author

yangfly commented May 12, 2019

@vgg4resnet
Copy link

has anyone convert it to caffe or tensorflow pb ,will u share it?

@alphinside
Copy link

Hi, @yangfly can you share with us the config.py used for training ? Thank you

@yangfly
Copy link
Author

yangfly commented May 14, 2019

Hi, @yangfly can you share with us the config.py used for training ? Thank you

The config.py is added to BaiduYun and GoogleDrive.

@BrownOfSummer
Copy link

has anyone convert it to caffe or tensorflow pb ,will u share it?

+1

@yantiantianlx
Copy link

1 测试 (WIDER Face Hard 单尺度测试:0.791) 这个时的scale和阈值是怎么设定的。
2 测试widerface时, scale一直为1.0, 阈值0.02, easy为0.897,medium为0.874, hard 为 0.703, hard曲线有点差

@nttstar
Copy link
Collaborator

nttstar commented May 15, 2019

参考test_widerface, 短边1600 @ytt1790579195

@yangfly
Copy link
Author

yangfly commented May 15, 2019

我没有修改 test_widerface.py 和 retinaface.py 中的任何参数

@JasonZhao001
Copy link

JasonZhao001 commented May 16, 2019

Hi, @yangfly can you share with us the config.py used for training ? Thank you

The config.py is added to BaiduYun and GoogleDrive.

Hi, @yangfly 我发现在你提供的config中使用的是network.mnet.pretrained = 'model/mobilenet025fd0' #78,这个mobilenet025fd0代表的是fast downsample的mobilenet0_25吧。从哪里能获取到呢

@JasonZhao001
Copy link

@nttstar Do you know where to get the pretrained model named "mobilenet025fd0"?

@yangfly
Copy link
Author

yangfly commented May 21, 2019

@nttstar Do you know where to get the pretrained model named "mobilenet025fd0"?
I didn't use mobilenet025fd0.

@Charrin
Copy link

Charrin commented May 22, 2019

mnet0.25的anchor设置貌似没有scale step,默认使用了RAC_SSH的配置,anchor的大小与论文中Table2不一致,对吗(默默过来确认一下

@yangfly
Copy link
Author

yangfly commented May 22, 2019

配置参数,在 train.log 中都打印出来了。

@Charrin
Copy link

Charrin commented May 22, 2019

配置参数,在 train.log 中都打印出来了。

嗯~好滴谢谢啦

@ashuezy
Copy link

ashuezy commented May 23, 2019

@yangfly
Can you help regarding TVM conversion ?

@zhouwei5113
Copy link

这个MobileNet0.25是v1还是v2?

@shuyikong
Copy link

你好,请问为什么我将你训练好的mnet.25在cpu上做推断时得到的结果与gpu不一致,且差别很大呢?

@yangfly
Copy link
Author

yangfly commented May 31, 2019

  1. TVM conversion: You may convert by yourself for the different hardware platforms.
  2. MobileNet version: v1 0.25
  3. 结果不一致:你可能需要 debug 下,比如中间结果,配置参数.

@jamessmith90
Copy link

I think we can run this model on TensorRT.

Mobilenet Support is available.
https://mxnet.incubator.apache.org/_modules/mxnet/gluon/model_zoo/vision.html

@yangfly
Can you confirm this will work ?

https://mxnet.incubator.apache.org/versions/master/tutorials/tensorrt/inference_with_trt.html

@baishiruyue
Copy link

hello @yangfly
我在mxnet框架下面测试你提供的mnet.25模型,发现耗时和retinaface-R50模型的耗时相差不大,甚至还要更耗时,并且两个模型相差100多M,它们所占用的gpu显存也相差不大,我对这个问题很疑惑,是我哪些设置有问题吗?希望您的指教,多谢!

我用的gpu是titan xp。

@oftenliu
Copy link

oftenliu commented Aug 6, 2019

配置参数,在 train.log 中都打印出来了。
请问下train.log是怎么生成的呀

@yangfly
Copy link
Author

yangfly commented Aug 6, 2019

command 2>&1 | tee train.log

@wanjinchang
Copy link

@yangfly Good job!!When I test this model,I found that it consumes so much memory about 3G,could you tell me why?

@Dockyin
Copy link

Dockyin commented Aug 13, 2019

请问下mnet.25模型在手机上测试过吗?
我测试时发现mobilenet_0_25可以在android平台上给出预测结果,虽说只有1*1000维度;但是使用mnet.25的话,加载模型时就会报错。
Android平台的方案如下:https://github.com/apache/incubator-mxnet/tree/master/amalgamation

@skyeyeCV
Copy link

@yangfly Did you only use wider face dataset when training?What is the batch size when you training?Thanks a lot!

@israelwei
Copy link

Did you use different learning rate & learning rate schedule while training on mobilenet (compared to resnet)? I don't see these values in the config files...

@gripdestiny
Copy link

@yangfly 你好,参考了你提供的训练日志,我发现FG acc 开始会往下降到0,然后在回升。这个现象是正常的么,我遇到的问题是FG acc下降到0以后就不会再回升,你有遇到过这问题么

@yangfly
Copy link
Author

yangfly commented Dec 9, 2019 via email

@lbin
Copy link

lbin commented Dec 10, 2019

https://github.com/lbin/Retinaface_Mobilenet_Pytorch 单尺度相同设置hard达到85.55%

@brealisty
Copy link

hello @yangfly
我在mxnet框架下面测试你提供的mnet.25模型,发现耗时和retinaface-R50模型的耗时相差不大,甚至还要更耗时,并且两个模型相差100多M,它们所占用的gpu显存也相差不大,我对这个问题很疑惑,是我哪些设置有问题吗?希望您的指教,多谢!

我用的gpu是titan xp。

耗时问题你解决了吗?我用了@lbin,的模型,先热加载(执行一次forward),再做预测,时间耗时非常非常短。实时完全没问题

@AdaAkanishi
Copy link

@yangfly 你好,参考了你提供的训练日志,我发现FG acc 开始会往下降到0,然后在回升。这个现象是正常的么,我遇到的问题是FG acc下降到0以后就不会再回升,你有遇到过这问题么

你好,我想问一下你解决了这个问题嘛

@BenjaminLiu1003
Copy link

老哥,我用你的mobilenet_0_25-symbol.json和最新的retinaface的代码训练,得到的mnet.25-symbol.json和你自己训练得到的网络结构有一点局部区别,请问是怎么回事啊?

@chenzhengnan
Copy link

hello @yangfly
我在mxnet框架下面测试你提供的mnet.25模型,发现耗时和retinaface-R50模型的耗时相差不大,甚至还要更耗时,并且两个模型相差100多M,它们所占用的gpu显存也相差不大,我对这个问题很疑惑,是我哪些设置有问题吗?希望您的指教,多谢!

我用的gpu是titan xp。

你好,请问你在gpu和cpu下用R50测试图片单张耗时多久,

@chenzhengnan
Copy link

hello @yangfly
我在mxnet框架下面测试你提供的mnet.25模型,发现耗时和retinaface-R50模型的耗时相差不大,甚至还要更耗时,并且两个模型相差100多M,它们所占用的gpu显存也相差不大,我对这个问题很疑惑,是我哪些设置有问题吗?希望您的指教,多谢!
我用的gpu是titan xp。

耗时问题你解决了吗?我用了@lbin,的模型,先热加载(执行一次forward),再做预测,时间耗时非常非常短。实时完全没问题

你好,我在cpu上用r50单张测试耗时要5s左右,请问你是怎么提速的

@dexception
Copy link

+1 Waiting for fine tuned optimized version with tensorRT or TVM.

Can be quantize it ? fp16 or int8 with minimal loss in accuracy ?
or an AutoTune version ?

@jinpeijie217
Copy link

@yangfly 您好,有个问题,在使用test_widerface.py时,怎么分开测试easy,medium,hard三种测试集呢?或者怎么分开测试验证集呢?图片中的recall all是不是就是最终参考的指标? 谢谢您的时间
image

@ashuezy
Copy link

ashuezy commented Aug 25, 2020

@yangfly What is the output shape of this mobilenet model ?

@geoffzhang
Copy link

请问,有测试过mnet0.25使用cpu在VGA分辨率下的时间吗?我在ncnn框架下测试时间为50ms(单线程),和文章相差较大 @leo2105 @yangfly @ashuezy @chenzhengnan

@meejeong
Copy link

@yangfly, I executed retinaface based on mobilenet0.25 (you trained) from onnx file.
I checked the weight of the onnx file was the same as the pretrained model.
When I checked confidence (face_rpn_cls_prob_reshape_stride32, face_rpn_cls_prob_reshape_stride16, face_rpn_cls_prob_reshape_stride8), the value is too weired.
Can you share a preprocessing method? or do you have similar problems?

00000 = {float} 0.9999858140945435
00001 = {float} 0.9999855756759644
00002 = {float} 0.9999837875366211
00003 = {float} 0.9999805688858032
00004 = {float} 0.9999803304672241
00005 = {float} 0.9999790191650391
00006 = {float} 0.9999761581420898
00007 = {float} 0.9999642372131348
00008 = {float} 0.999963641166687
00009 = {float} 0.999963641166687
00010 = {float} 0.999962568283081
00011 = {float} 0.999962329864502
00012 = {float} 0.9999611377716064
00013 = {float} 0.9999608993530273

@cyrusbehr
Copy link

@yangfly What is the license on the models your trained? Is it MIT?

@nttstar nttstar closed this as completed Jun 1, 2023
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