peiyunh / tiny

Tiny Face Detector, CVPR 2017
https://cs.cmu.edu/~peiyunh/tiny
Other
1.13k stars 319 forks source link

Do you have any plans to use tensorflow or caffe to implement this paper? #16

Open zsz02 opened 7 years ago

zsz02 commented 7 years ago

Your working is very nice !!! Do you have any plans to use tensorflow or caffe to implement this paper?

peiyunh commented 7 years ago

I do have a Caffe version that I may release later.

chinakook commented 7 years ago

I think caffe is not a good choice because the matconvnet has net.conserveMemory mechanism to aggressively conserve memory when inferencing a large upsampled image(5000x5000) while caffe have not any memory management schema. CNTK or mxnet may be a good choice as they gracefully support DAG memory sharing technology(same or not same to matconvnet's conserveMemory) to deal with the huge resnet101-fcn like model when processing large photo.

MaxLingwei commented 7 years ago

@peiyunh I have already converted matconvnet model to caffemodel. But the problem is just like what @chinakook said, I can't test a image whose size is more than 1000 * 600, because of out of gpu memory. So please tell me how you solve the problem if you have any spare time. Thank you very much!

chinakook commented 7 years ago

@MaxLingwei I have ported a MXNet implementation which is high performant and momory efficiency as the peiyun's Matconvnet implementation. please refer to https://github.com/chinakook/hr101_mxnet

MaxLingwei commented 7 years ago

@chinakook Thank you for your information. I just resized the img and got a good result as using its original size. And I can use caffe after resized it.

helxsz commented 7 years ago

@peiyunh It will be anticipated to see the caffe version

kunal10 commented 7 years ago

Has anyone implemented a Tensorflow version ?

peiyunh commented 7 years ago

If you have implemented a Tensorflow version, do let me know!

alexattia commented 7 years ago

If someone wants to collaborate to implement it with Keras (TensorFlow backend), let me know ! I began to work on it but I don't know Matlab enough

jmu201521121021 commented 7 years ago

Can you commit a caffe version?

MaxLingwei commented 7 years ago

@jmu201521121021 @helxsz i have written a script which can transform a matconvnet model to cafemodel. https://github.com/MaxLingwei/MatConvNet2caffe

helxsz commented 7 years ago

@MaxLingwei Thanks, also like to know the caffe version

takecareofbigboss commented 7 years ago

hi @peiyunh appreciate ur nice work, very happy to see ur plan on releasing the version of caffe. I plan to realize ur tiny face on caffe framework, so it would be helpful to let me know when will you release it?

fsalmasri commented 6 years ago

Is it possible to have the caffe version?

chinakook commented 6 years ago

A newer face detection based on tiny face named SSH is open. https://github.com/mahyarnajibi/SSH

cydonia999 commented 6 years ago

@peiyunh @chinakook I have ported a TensorFlow Tiny Face Detector based on peiyunh's MatConvNet and chinakook's MXNet versions. Note my port supports only inference parts, not training. https://github.com/cydonia999/Tiny_Faces_in_Tensorflow

chinakook commented 6 years ago

@cydonia999 nice work! I've already finished the MXNet version of tiny including training. I will make it public later and the data preparation code can be shared across different deep learning frameworks.

takecareofbigboss commented 6 years ago

@chinakook nice work SSH~ still waiting for the caffe version of tiny face.

zmlmanly commented 6 years ago

@MaxLingwei Thank you for your matconvnet2caffe. Do you compare the result between caffe and matconvnet? Is the result of caffe same with the matconvnet?

MaxLingwei commented 6 years ago

@zmlmanly It's nearly the same. But there's another problem that caffe has no method for memory saving. It costs too much GPU memory. So I can't test on large images using caffe.

zmlmanly commented 6 years ago

@MaxLingwei Thank you for your reply. I think you can reduce the height and width of input_dim in prototxt, for example, you can adjust input_dim:1 input_dmi:3 input_dim:224 input_dim:224 to input_dim:1 input_dmi:3 input_dim:64 input_dim:64 I have no idea if the method is correct, you can try it. And I have a problem about your matconvnet2caffe, how to convert the ConvTranspose_Layer in matconvnet to caffe? In matconvnet, there is a "crop [1,2,1,2]" in ConvTranspose_Layer in hr_res101.mat, but there is no "crop" in Deconvolution_Layer in caffe. How to realize the "crop [1,2,1,2]" in caffe? Thank you very much.

MaxLingwei commented 6 years ago

@zmlmanly I just use both the Deconvolution layer and Crop layer in caffe, adding the Crop layer after the Deconvolution layer.

zmlmanly commented 6 years ago

@MaxLingwei How to set the Crop layer after the Deconvolution layer in caffe? For example, the input of deconvolution layer is [N,C,H,W], the output of deconvolution layer in caffe is [N,C,2H,2W], but the output of deconvolution layer in matconvnet is [N,C,2H-1,2W-1]. Could you give me display the crop layer of prototxt in caffe? Thang you very much.

MaxLingwei commented 6 years ago

@zmlmanly There are two bottoms in Crop layer. To my knowledge it will crop one bottom to match another automaticly. I have upload the prototxt in my repository. https://github.com/MaxLingwei/MatConvNet2caffe