Open mcusgithub opened 1 year ago
Same results using PyTorch: num_params = sum(param.numel() for param in model.parameters()) afaik, rtmdet models are nearly the same, if not identical, in MMDet and MMYolo = same results too for Param counts.
Based on: https://github.com/open-mmlab/mmyolo/blob/main/docs/en/recommended_topics/complexity_analysis.md
python tools/analysis_tools/get_flops.py configs/rtmdet/rtmdet_s_syncbn_fast_8xb32-300e_coco.py
returns:
==============================
Input shape: torch.Size([640, 640])
Model Flops: 14.835G
Model Parameters: 8.887M
==============================
!!!Please be cautious if you use the results in papers. You may need to check if all ops are supported and verify that the flops computation is correct.
which is consistent with the documentation
So get_flops.py =/= PyTorch and get_flops.py =/= onnx_opcounter but PyTorch == onnx_opcounter
Something does not look right...
Considering the warning message above, could there be an issue with the advertised values?
Hello, I can't really help you but I would be really interested if you could share the process of how to successfully export an ONNX version of the RTMDet model. Did you use the mmdeploy/tools/deploy.py script? I can't get it to work for RTMDet...
Thank you in advance!
Yes, I exported with deploy, following the documentation.
Hello, I can't really help you but I would be really interested if you could share the process of how to successfully export an ONNX version of the RTMDet model. Did you use the mmdeploy/tools/deploy.py script? I can't get it to work for RTMDet...
Thank you in advance!
I would really like someone to prove me wrong on the model size (params count), otherwise rtmdet is not as / more efficient as / than Yolov5 (and above) as claimed.
📚 The doc issue
After successfully converting the following RTMDet-s model to ONNX:
I get:
The exported ONNX model looks okay in Netron and seems to work as expected.
The number of parameters for other MMDet models I converted the same way (yolov5s, yolov8s, yolov8s-pose, etc...) do not have this issue and the parameter counts I obtain are the same as in the documentation (yolov5s, yolov8s, yolov8s-pose).
Why is there a discrepancy for the rtmdet models only? Is there an issue?
Suggest a potential alternative/fix
No response