Train MTCNN with a fixed size input
Hi there,
Thanks for sharing the code. I'm trying to train MTCNN with a fixed size input, say 1000x1000. Could you please suggest where should I modify to achieve that? I tried to read the code and the placeholder input shape of Pnet is (batch_size, 12,12,3). I thought it should be (batch_size, None, None, 3)?
Thanks
Hi, i have met the problem when i train P-net, can i ask you for some help?
I think you misunderstood the model itself, the trainning process of MTCNN requires you to randomly crop the original image and resize it to 12x12. During the predicting process you can use abitrary size as long as the image size within a batch is same. if you still insist trainning MTCNN in other size rather than 12x12 you don't have to change any part of the model it self, because P-Net is a fully convolutional net.
您好,我在训练PNET时遇到问题,可以请教下吗?我并没有改变维数,不知道为什么会出现这个错误 [image: 屏幕快照 2018-11-28 下午3.35.40.png]
zm931116 [email protected] 于2018年11月30日周五 下午4:02写道:
I think you misunderstood the model itself, the trainning process of MTCNN requires you to randomly crop the original image and resize it to 12x12. During the predicting process you can use abitrary size as long as the image size within a batch is same. if you still insist trainning MTCNN in other size rather than 12x12 you don't have to change any part of the model it self, because P-Net is a fully convolutional net.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AITTSMD/MTCNN-Tensorflow/issues/217#issuecomment-443111376, or mute the thread https://github.com/notifications/unsubscribe-auth/AZJ2TP9h10JNiQMkVSZnrXnCe8VF2YMQks5u0Nf3gaJpZM4YlPBD .
额,你这个错误的图片我好像看不到
啊?这样啊 那方便留一个邮箱吗?或者加个QQ 微信 方便吗?
zm931116 [email protected] 于2018年12月4日周二 下午3:22写道:
额,你这个错误的图片我好像看不到
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AITTSMD/MTCNN-Tensorflow/issues/217#issuecomment-443985686, or mute the thread https://github.com/notifications/unsubscribe-auth/AZJ2TB7R7CA99qY2tLniqOEac6SsGxbzks5u1hS8gaJpZM4YlPBD .
我把图片作为附件重发给您了,您看下你不能看到
zm931116 [email protected] 于2018年12月4日周二 下午3:22写道:
额,你这个错误的图片我好像看不到
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AITTSMD/MTCNN-Tensorflow/issues/217#issuecomment-443985686, or mute the thread https://github.com/notifications/unsubscribe-auth/AZJ2TB7R7CA99qY2tLniqOEac6SsGxbzks5u1hS8gaJpZM4YlPBD .
你加我微信吧,zm1993931116
你好,我训练完模型之后,将meta文件,固话成pb文件时,做c++调用,pnet模型由于固定了输入图片的batchsize和大小,导致不能输入任意其他大小的图片,我尝试将输入改为(None, None, None, 3) ,但是出现计算分类损失时需要这个batchsize大小,所以我在定义的时候这个batchsize就不能为空,但我必须这样定义(None, None, None, 3),我的后续pb模型才能输入一张任意大小的图片.
@LiYangDoYourself 你好,我最近也在搞这个MTCNN的C++实现。我是将Pnet固化为input shape为[1, None,None,3] Pb文件,想用tensorflow再读入测试验证正确性,但是在执行模型的predict时总是报如下错,请问你遇到过吗?(你有没有做pb模型的测试验证呢)
从错误信息上看,应该是提示我输入的placeholder的shape应该为[1, ?, ? ,3],但是我输入就是满足这个shape的?
You must feed a value for placeholder tensor 'input_1' with dtype float and shape [1,?,?,3] [[node input_1 (defined at F:\tensorflow_model_learn\mtcnn_learn\MTCNN-Tensorflow-master\Detection\fcn_detector.py:70) = Placeholderdtype=DT_FLOAT, shape=[1,?,?,3], _device="/job:localhost/replica:0/task:0/device:CPU:0"]] Caused by op 'input_1', defined at: File "c:\Users\ADMIN.vscode\extensions\ms-python.python-2019.2.5558\pythonFiles\ptvsd_launcher.py", line 45, in