单尺度0.791! InsightFace赛高!RetinaFace MobileNet0.25同人模型公开
yangfly opened this issue · 58 comments
RetinaFace 牛逼!:two_hearts: InsightFace 赛高!:two_hearts:
开放 mobilenet0.25 版 RetinaFace 同人版模型
更完整的模型、日志和WiderFace测试截图 百度云 提取码:nzof GoogleDrive
模型说明,使用的是Gluon Model Zoo 的标准版 MobileNet0.25 预训练模型。(没有 fast downsampling,模型大小 1.68Mb)
Batch-size 32x2(两块1080Ti),其他参数都是 RetinaFace 默认的。
欢迎调参大佬,公开更给力的结果。:beer:
非常感谢
Great! Thanks for sharing!
@yangfly how can we download mobileNet model ? Dropbox better in Europe ?
Can you share the model 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
@yangfly Thanks for uploading the models. Could you explain what the difference is between mobilenet_0_25-0000
and mnet.25-0000
?
@yangfly Thanks for uploading the models. Could you explain what the difference is between
mobilenet_0_25-0000
andmnet.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.
@yangfly Ah... I get it... thanks... (I was thinking they BOTH are Detector models)
@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
has anyone convert it to caffe or tensorflow pb ,will u share it?
Hi, @yangfly can you share with us the config.py used for training ? Thank you
Hi, @yangfly can you share with us the config.py used for training ? Thank you
The config.py is added to BaiduYun and GoogleDrive.
has anyone convert it to caffe or tensorflow pb ,will u share it?
+1
1 测试 (WIDER Face Hard 单尺度测试:0.791) 这个时的scale和阈值是怎么设定的。
2 测试widerface时, scale一直为1.0, 阈值0.02, easy为0.897,medium为0.874, hard 为 0.703, hard曲线有点差
参考test_widerface, 短边1600 @ytt1790579195
我没有修改 test_widerface.py 和 retinaface.py 中的任何参数
@nttstar Do you know where to get the pretrained model named "mobilenet025fd0"?
@nttstar Do you know where to get the pretrained model named "mobilenet025fd0"?
I didn't use mobilenet025fd0.
mnet0.25的anchor设置貌似没有scale step,默认使用了RAC_SSH的配置,anchor的大小与论文中Table2不一致,对吗(默默过来确认一下
配置参数,在 train.log 中都打印出来了。
配置参数,在 train.log 中都打印出来了。
嗯~好滴谢谢啦
这个MobileNet0.25是v1还是v2?
你好,请问为什么我将你训练好的mnet.25在cpu上做推断时得到的结果与gpu不一致,且差别很大呢?
- TVM conversion: You may convert by yourself for the different hardware platforms.
- MobileNet version: v1 0.25
- 结果不一致:你可能需要 debug 下,比如中间结果,配置参数.
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
hello @yangfly
我在mxnet框架下面测试你提供的mnet.25模型,发现耗时和retinaface-R50模型的耗时相差不大,甚至还要更耗时,并且两个模型相差100多M,它们所占用的gpu显存也相差不大,我对这个问题很疑惑,是我哪些设置有问题吗?希望您的指教,多谢!
我用的gpu是titan xp。
@MyraBaba
how did you resolved the below 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
please help
I havent faced such error yet.
EDIT:1
sorry I noticed that I have :)
let me look and get back to you
@MyraBaba
how did you resolved the below 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
please help
hello, you can print the shape of scores, i think it is 3 dementions.
Hi, @yangfly can you share with us the config.py used for training ? Thank you
The config.py is added to BaiduYun and GoogleDrive.
hello,could you share the link? I can`t find in the shared links.
if i want to save my model each 5 epochs ,how to set the param?
I havent faced such error yet.
EDIT:1
sorry I noticed that I have :)let me look and get back to you
Have you found it? :)
@yangfly muchas gracias
es la linea de detectores:
detector = RetinaFace('/Users/xxx/Downloads/mnet.25/mobilenet_0_25' , 0 , gpuid , 'net3')
es esto correcto ? porque da error:
Archivo "/Users/xxx/Projects/new_/insight_10May/insightface/RetinaFace/retinaface.py", línea 228, en
puntajes de detección = puntajes [:, self._num_anchors ['stride% s'% s] :,:,: ]
IndexError: demasiados índices para la matriz
I got the same problem
I dont know if @yangfly @MyraBaba can tell how you solved.
thanks
mobilenet_0_25-0000 is the pre-trained model from Gluon Model Zoo and mnet.25-0000 is the detector that I trained.
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
mobilenet_0_25 is just the pre-trained.
You should use mnet.25 instead.
配置参数,在 train.log 中都打印出来了。
请问下train.log是怎么生成的呀
command 2>&1 | tee train.log
@yangfly Good job!!When I test this model,I found that it consumes so much memory about 3G,could you tell me why?
请问下mnet.25模型在手机上测试过吗?
我测试时发现mobilenet_0_25可以在android平台上给出预测结果,虽说只有1*1000维度;但是使用mnet.25的话,加载模型时就会报错。
Android平台的方案如下:https://github.com/apache/incubator-mxnet/tree/master/amalgamation
@yangfly Did you only use wider face dataset when training?What is the batch size when you training?Thanks a lot!
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...
@yangfly 你好,参考了你提供的训练日志,我发现FG acc 开始会往下降到0,然后在回升。这个现象是正常的么,我遇到的问题是FG acc下降到0以后就不会再回升,你有遇到过这问题么
https://github.com/lbin/Retinaface_Mobilenet_Pytorch 单尺度相同设置hard达到85.55%
@yangfly 你好,参考了你提供的训练日志,我发现FG acc 开始会往下降到0,然后在回升。这个现象是正常的么,我遇到的问题是FG acc下降到0以后就不会再回升,你有遇到过这问题么
你好,我想问一下你解决了这个问题嘛
老哥,我用你的mobilenet_0_25-symbol.json和最新的retinaface的代码训练,得到的mnet.25-symbol.json和你自己训练得到的网络结构有一点局部区别,请问是怎么回事啊?
hello @yangfly
我在mxnet框架下面测试你提供的mnet.25模型,发现耗时和retinaface-R50模型的耗时相差不大,甚至还要更耗时,并且两个模型相差100多M,它们所占用的gpu显存也相差不大,我对这个问题很疑惑,是我哪些设置有问题吗?希望您的指教,多谢!我用的gpu是titan xp。
你好,请问你在gpu和cpu下用R50测试图片单张耗时多久,
+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 ?
@yangfly 您好,有个问题,在使用test_widerface.py时,怎么分开测试easy,medium,hard三种测试集呢?或者怎么分开测试验证集呢?图片中的recall all是不是就是最终参考的指标? 谢谢您的时间
请问,有测试过mnet0.25使用cpu在VGA分辨率下的时间吗?我在ncnn框架下测试时间为50ms(单线程),和文章相差较大 @leo2105 @yangfly @ashuezy @chenzhengnan
@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