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

why the model size all so big? #22

Open
lucasjinreal opened this issue Apr 6, 2023 · 5 comments
Open

why the model size all so big? #22

lucasjinreal opened this issue Apr 6, 2023 · 5 comments

Comments

@lucasjinreal
Copy link

compared with mbv2 and shufflenetv2 fasternet has a bigger size, this caused limitations deploy on edge devices.

@JierunChen
Copy link
Owner

Hi, FasterNet focuses on improving the accuracy-latency tradeoff but not on reducing the model size (slightly bigger than ShuffleNetV2 and MobileNetV2), as shown in the following table:

name acc #params FLOPs Throughput on GPU (fps) Latency on CPU (ms) Latency on ARM (ms)
ShuffleNetV2 x1.5 72.6 3.5M 0.30G 4878 12.1 266
MobileNetV2 72.0 3.5M 0.31G 4198 12.2 442
FasterNet-T0 71.9 3.9M 0.34G 6807 9.2 143
ShuffleNetV2 x2 74.9 7.4M 0.59G 3339 17.8 403
MobileNetV2 74.7 6.1M 0.60G 2711 22.6 650
FasterNet-T1 76.2 7.6M 0.85G 3782 17.7 285

@lucasjinreal
Copy link
Author

@JierunChen hello, may I ask which framework used to get these values?

@JierunChen
Copy link
Owner

@JierunChen hello, may I ask which framework used to get these values?

We use FVcore for #params and FLOPs calculation. Code for measuring throughput/latency is provided in utils.py.

Note that when comparing the model size by storage, ensure all models compared have the same precision, e.g., 32 bits, 16 bits, or 8 bits.

@lucasjinreal
Copy link
Author

@JierunChen thanks, seems mostly measuring on torch, have u tried export to onnx and measuring on onnxruntime? Since the speed actually highly related how optimized in forward frameworks.

@JierunChen
Copy link
Owner

@jinfagang No deployment engines are involved when measuring the latency/throughput. We haven't tried exporting to onnx. You are welcome to do so and try various deployment engines, e.g. OnnxRuntime, TensorRT, NCNN, etc.

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

2 participants