These are chat archives for beniz/deepdetect

16th
Sep 2016
Adam Klimont
@alkamid
Sep 16 2016 10:11
I managed to finetune a ResNet-50 via dede for a two-class dataset, but I can't quite deploy it correctly — it's always predicting one class, even on the images from the training set. While training, I'm getting ~0.75 precision and recall, so a massive bias is impossible (my dataset is balanced), therefore I'm suspecting an error in deployment. I'm using dede's .prototxt for both train (https://github.com/beniz/deepdetect/blob/master/templates/caffe/resnet_50/resnet_50.prototxt, I added lr_mult: 0 to all layers except for the last FC) and deploy (https://github.com/beniz/deepdetect/blob/master/templates/caffe/resnet_50/deploy.prototxt). Also, this is the script I'm using for setting up the prediction: https://gist.github.com/alkamid/c56e590292a634fd4b89d3a0aada7ea6. I'm thinking now, doesn't the deploy file need to know about mean.binaryproto? If I'm training on mean-subtracted images, surely the prediction should also subtract the mean image before passing an image through the net?
Emmanuel Benazera
@beniz
Sep 16 2016 10:15
@alkamid look at the server logs, and post a gist with them if needed. They should tell you what weights the service is loading up, etc...
Adam Klimont
@alkamid
Sep 16 2016 10:27
@beniz there's nothing too suspicious to my novice eye (https://gist.github.com/alkamid/a8d4503754bbb3585f2201d271abbbe4). I'm not sure why network initialisation is happening twice though.
Emmanuel Benazera
@beniz
Sep 16 2016 11:43
where does this myfc1000 layer comes from ? DD uses _ftune as part of the layer name when finetunig
make sure this last layer of yours is within the weights file maybe
Adam Klimont
@alkamid
Sep 16 2016 13:00
@beniz I changed the last layer's name to myfc1000 for training. As you can see in the gist, I didn't use the finetuning flag (I didn't know exactly what it does so I just edited the train .prototxt to freeze the middle layers and leave the last one for training)
if it wasn't in the weights file, I'd get some sort of notification, wouldn't I?
Emmanuel Benazera
@beniz
Sep 16 2016 13:03
You would, it'd say the layer is ignored. However, if your layers are misconnected, you may not see it in these logs...
It's all automated in DD, but if you're doing by hand, you can make mistakes in several places...
We can debug users that follow the DD API, but otherwise, we'd spend days playing call center...
ehab albadawy
@ebadawy
Sep 16 2016 17:41
hey guys, I'm interested to contribute to deepdetect, any idea form where to start ?
Emmanuel Benazera
@beniz
Sep 16 2016 17:45
hi @ebadawy Always welcome, and we provide support. To start with you can pick an issue and achieve it, or you can describe the area you'd like to learn from the most and together we can find something. It's all open basically :)
ehab albadawy
@ebadawy
Sep 16 2016 17:50
@beniz , That's great! I'm very interested in working with CNNs as I have some previous experience with it uing caffe, I'll feel more comfortable if I had a task with this area, but of course this all about learning new things, so I don't mind to look up for new ideas
Emmanuel Benazera
@beniz
Sep 16 2016 17:52
OK, is C++ OK ?
ehab albadawy
@ebadawy
Sep 16 2016 17:53
Well, usually I work with python/lua, but np to have a try with C++
Emmanuel Benazera
@beniz
Sep 16 2016 17:58
I see. As a first pointer, check this PR out: beniz/deepdetect#132 It's been on hold because it needs a bit more work. It's Python for CNN over images. Nothing theoretical, but could be good as a first low-hanging fruit, and it requires to run many CNNs many times in order to make sure all functions are fine. Don't hesitate to decline if you don't feel this is what you'd like to do. Just a pointer, that comes to my mind.
ehab albadawy
@ebadawy
Sep 16 2016 18:05
thanks @beniz , will have a look on it and will let you know my thoughts.
Emmanuel Benazera
@beniz
Sep 16 2016 18:06
sure, take your time, this was a quick thought, but I'll run this in the back of my mind and will let you know if I think of something else. If you have something cool that you'd like to do, just speak out. It's always good to begin with something simple and within reach in order to reap the reward of the accomplishment, then move onto something more difficult / cool / cutting-edge.
ehab albadawy
@ebadawy
Sep 16 2016 18:11
Yes, I agree with you. I think I also need to get myself more familiar with deepdetect in order to come up with other cool ideas.