why the model size all so big?
Opened this issue · 5 comments
compared with mbv2 and shufflenetv2 fasternet has a bigger size, this caused limitations deploy on edge devices.
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 |
@JierunChen hello, may I ask which framework used to get these values?
@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.
@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.
@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.