Skip to content
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

port face detection to TVM #5

Open
kaishijeng opened this issue Mar 27, 2019 · 12 comments
Open

port face detection to TVM #5

kaishijeng opened this issue Mar 27, 2019 · 12 comments

Comments

@kaishijeng
Copy link

I attempted to port your trained model to TVM which is a good framework to speed up on arm device (like RK3399). Unfortunately, there are some operators in your model seem not supported in TVM.

"infer_range" and "_arange" are not supported in TVM.
NotImplementedError: Operator: _arange is not supported in nnvm.

Can these 2 operators replaced by other operators?

Thanks.,

@becauseofAI
Copy link
Owner

@kaishijeng
I'm not sure clearly where are used the operators of "infer_range" and "_arange" in my detection v1 model now. In fact, the detection v1 model is trained based on YOLOV3 code implemented by the official GluonCV. If you can port the official YOLOV3 model to TVM or can you try it firstly? My mode will also work if the official GluonCV YOLOV3 model can be ported rightly.

BTW, welcome to pull requests to share your TVM model for arm to this repo. :)

@kaishijeng
Copy link
Author

Try to use gluon to downdload yolo3_mobilenet1.0_voc below:
model_zoo.get_model('yolo3_mobilenet1.0_voc', pretrained=True)

It has an error: of Pretrained model for yolo3_mobilenet1_0_voc is not available as below:

Traceback (most recent call last):
File "./demo_webcam.py", line 9, in
net = gcv.model_zoo.get_model('yolo3_mobilenet1.0_voc', pretrained=True)
File "build/bdist.linux-aarch64/egg/gluoncv/model_zoo/model_zoo.py", line 201, in get_model
File "build/bdist.linux-aarch64/egg/gluoncv/model_zoo/yolo/yolo3.py", line 630, in yolo3_mobilenet1_0_voc
File "build/bdist.linux-aarch64/egg/gluoncv/model_zoo/yolo/yolo3.py", line 476, in get_yolov3
File "build/bdist.linux-aarch64/egg/gluoncv/model_zoo/model_store.py", line 138, in get_model_file
File "build/bdist.linux-aarch64/egg/gluoncv/model_zoo/model_store.py", line 108, in short_hash
ValueError: Pretrained model for yolo3_mobilenet1_0_voc is not available.

@becauseofAI
Copy link
Owner

@kaishijeng
yolo3_mobilenet1_0_voc download url is: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/yolo3_mobilenet1.0_voc-3b47835a.zip

It's an official bug. I have opened an issue to fix it.

@kaishijeng
Copy link
Author

It works with your link. However, it has only *.param and TVM needs network definition in *.json so it can do the conversion

Thanks,

@becauseofAI
Copy link
Owner

@kaishijeng
You can export the GluonCV format (*.params contains net and param together) to MXNet format (model is divided into *.json and *.params ) using the code: export_network.py

@kaishijeng
Copy link
Author

Thanks fo r the export_network.py.

Same error with yolo3_mobile1.0_voc in tvm as below;
NotImplementedError: Operator: _arange is not supported in nnvm.

@becauseofAI
Copy link
Owner

@kaishijeng
So it seems that this problem needs to be solved by the official developers. You can open issues to the TVM and GluonCV community.

Good luck and look forward to feedback. :)

@aa12356jm
Copy link

port the model to ncnn is ok

@becauseofAI
Copy link
Owner

becauseofAI commented Apr 30, 2019

port the model to ncnn is ok

@aa12356jm
Can you pull requests to share your nccn model for arm to this repo? :)

@aa12356jm
Copy link

ok,i will do it tomorrow

@mdv3101
Copy link

mdv3101 commented Jun 24, 2019

Can you confirm what is the image size for 20ms/50 FPS metric calculation ?

@becauseofAI
Copy link
Owner

Can you confirm what is the image size for 20ms/50 FPS metric calculation ?

Resize the image short edge to 256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants