Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

[WIP]Add SSD Support in NNVM #482

Closed
wants to merge 6 commits into from

Conversation

kevinthesun
Copy link
Contributor

Support SSD in NNVM. Add a quick solution so that major part of network can run on various devices and final NMS part will run on CPU.

@tqchen
Copy link
Member

tqchen commented May 15, 2018

cc @PariksheetPinjari909 can you help review this?

@tqchen
Copy link
Member

tqchen commented May 15, 2018

cc @zhreshold

@tqchen
Copy link
Member

tqchen commented May 15, 2018

an example and testcase is needed

@PariksheetPinjari909
Copy link
Member

I will review this and get back to you.

@kevinthesun
Copy link
Contributor Author

I'll keep working on this PR and pushing new commits.

@@ -195,6 +195,22 @@ def _upsampling(inputs, attrs):
new_attrs = {'scale':int(scale)}
return _get_nnvm_op('upsampling')(inputs[0], **new_attrs)

def _contrib_MultiBoxDetection(inputs, attrs):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use snake case for method name _contrib_multibox_detection

@@ -0,0 +1,130 @@
/*!
* Copyright (c) 2017 by Contributors
* \file object_dectection.cc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can move to src/top/vision folder

@@ -0,0 +1,51 @@
"""Definition of object detection ops"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge to already existing python/nnvm/top/vision.py

return true;
}

NNVM_REGISTER_OP(multibox_prior)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zxwitsme
Copy link

Shall we also add MultiBoxTarget op in nnvm even it won't be used in tvm?
Or it will cause error for not implemented op "MultiBoxTarget" when I use the model like this:
load_checkpoint('ssd_mobilenet_512', 0).

@liangfu
Copy link
Member

liangfu commented May 25, 2018

@zxwitsme Since MultiBoxTarget is only useful at training stage, it is recommended to export an inference model, instead of using the same model for model training. It can be a lot faster without MultiBoxTarget at inference stage.

@zxwitsme
Copy link

zxwitsme commented May 25, 2018

@liangfu Thanks for the reply. I got the model from here and it includes the MultiBoxTarget op:
https://github.com/zhreshold/mxnet-ssd/releases
Do you know how to generate an inference model which doesn't include the training op?

@liangfu
Copy link
Member

liangfu commented May 25, 2018

In this script, there are two models, one for training, the other for inference. Use get_symbol when you predict, and save the inference symbol.

@zxwitsme
Copy link

@liangfu I will try it. Thanks.

@tqchen
Copy link
Member

tqchen commented May 29, 2018

c.f. #518 we will redirect further changes to tvm repo, please open a new PR there

@tqchen tqchen closed this May 29, 2018
abergeron pushed a commit to abergeron/nnvm that referenced this pull request May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants