-
Notifications
You must be signed in to change notification settings - Fork 450
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
Question: Can the model trained using this repo be run on regular MXNet? #28
Comments
if you write the proposal layer in cpu (not sure if we wrote it, may be its there), it should work |
@bharatsingh430 sorry you mean the (soft) NMS part? Or the RPN part? |
RPN part |
ok, i checked, that layer has CPU support, it should work |
Cool - will try it out and let you know the result! |
@bharatsingh430 Thanks for the response, unfortunately I tried to run the code on CPU but there's no detection at all for the demo image in the repository (I tried to print out the predictions for the CPU inference and GPU inference, and they look very different). Here's what I've done: Basically I've re-compiled the SNIPER-mxnet code with the following changes:
Since I am still new to mxnet, I am not sure what are the correct ways to debug this? Also, any insights regarding this? I've also attached all the changes I've made in the zip file below in case you are interested in. Any pointers will be appreciated! |
can you try to compare the conv5 dumps for CPU and GPU versions, if they are not the same then probably something is not correct in the deformable convolution layers. If it is the same, then I can check the proposal layer once more, and probably the deformable roi pooling layers. |
Thanks @bharatsingh430 , however I am not sure how should I dump the value for a certain layer during forward pass (sorry still new to mxnet)? I've tried to dump the output after the forward pass for both the cpu and the gpu version, in case there's some interesting finding... As you can see, basically for the cpu version, it classifies everything as background (with a very high confidence of 1.0...) |
I've tried a few methods to print out the output for resnet conv5 layer (the layer's name is Anyway, I have compiled the SNIPER-mxnet cpu version and put it here. Just a simple pip install should be fine: If @bharatsingh430 you can help to dump the output of the cpu version (or give me some guidance) I will appreciate it! |
you need to change the symbol, mx.sym.Group add the layer's output you want to dump and then you can access it in the output which the network generates... |
Thanks @bharatsingh430 , and I've output the two layers (relut and relu1) for both CPU and GPU, and they are the same. So I assume there might be something wrong with either the
And the result is as below (I only take the first a few lines since the dump files are around 500~MB.
GPU output
|
thanks, if you can check the output of the proposal layer and the features after the pooling as well, that will give a clear idea which one is failing. If its the proposal layer, I can check it and get back to you |
BTW - I've replaced the |
OK here's more data. We can see that the input of the CPU output
GPU output:
|
ok, for inference there is no CUDA code written other than the memcpy. I can make the changes in some time, but if you want to get this working soon, you just need to get rid of the memcpy and paste all the content from the cu file to the cc file, i am talking about https://github.com/mahyarnajibi/SNIPER-mxnet/blob/master/src/operator/multi_proposal.cc and https://github.com/mahyarnajibi/SNIPER-mxnet/blob/master/src/operator/multi_proposal.cu files. |
@bharatsingh430 Cool - I'll probably try to implement it myself, and will let you know how it goes! Thanks for the help! |
Looks like it's working! Basically a few changes need to be made:
I put the file (multi_proposal.cc) in a public gist so people can refer to it as needed: |
Hi, I have a quick question regarding model inference. Let's say I've trained a model using SNIPER, for a regular object detection task, can the model be served:
The reason is that for some reason, we need to inference the model on CPU. I guess it might be possible since the NN is still standard resnet + faster RCNN, but I am not sure about this (since I do see a few updates in the SNIPER-mxnet module which might be relevant to accomplish the goal above).
Thanks!
The text was updated successfully, but these errors were encountered: