Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Question about prototxt file #8

Open
BJ-ZhaoXiaoyang opened this issue Nov 28, 2022 · 8 comments
Open

Question about prototxt file #8

BJ-ZhaoXiaoyang opened this issue Nov 28, 2022 · 8 comments

Comments

@BJ-ZhaoXiaoyang
Copy link

Hello, I have a question about prototxt. I found that in the modelzoo, some models do not have prototxt files, as shown below:
image

while some models have prototxt files, as shown below:
image

When/where are prototxt files needed and when/where not needed?
What is the relationship between the prototxt file and artifact file/
And How do I generate prototxt files for the Customer model?

I am looking forward for your reponse!

Thanks!

@mathmanu
Copy link
Collaborator

Classification models don't need the prototxt. Object detection models need the prototxt.
Also some other models such as for keypoint detection and 3DOD also uses a similar mechanism as object detection - they also use prototxt.

@BJ-ZhaoXiaoyang
Copy link
Author

Thanks for your response!! Thanks!

But I found that some tflite format object detection models also do not have prototxt, like delow:
image

Are prototxt files also related to the ONNX and tflite formats?
And if my customer model is an object detection model, how can I generate the prototxt for the model? Is there some script for the generation?

Thanks!!!

@mathmanu
Copy link
Collaborator

If you check the object detection onnx models, there are several small operators at the end that effects the performance.

Actually the prototoxt is not needed, onnxruntime-tidl is able to offload only the supported layers to underlying TIDL and run it on DSP and run the remaining unsupported layers (at the end) on the ARM. But that will be slow. The prototxt is a mechanism to offload all those layers into a Detection Post Processing operator in TIDL.

If you check the .tflite models, most of them have already compacted those operators into a Detection Post Process layer. TIDL is able to understand this layer layer in tflite - hence prototxt is not needed.

But certain tflite models do not come with this compact operator - in that case the performance will be affected - and this case the prototxt will help to improve the performance.

@BJ-ZhaoXiaoyang
Copy link
Author

Thank you very much for your detailed answer!!!

@BJ-ZhaoXiaoyang
Copy link
Author

Hi mathmanu. I still want to ask, if my customer model is an object detection model, how can I generate the prototxt for the model? Is there some script for the generation?

Thanks!

@BJ-ZhaoXiaoyang
Copy link
Author

Thanks a lot! You are very nice!

@BeautyMess
Copy link

@BJ-ZhaoXiaoyang Have you found some way to generate the prototxt? I want to generate it for NanoDet-Plus

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

No branches or pull requests

3 participants