Comparison
thop vs torchprofile vs ultralytics-thop
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
A tool to count the FLOPs of PyTorch model.
Likely abandoned. No release or commit for years (last release over 4 years ago).
$
pip install thopCount the MACs / FLOPs of PyTorch models
Low maintenance activity. Last release 9 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and release cadence.
$
pip install torchprofileUltralytics THOP package for fast computation of PyTorch model FLOPs and parameters.
Actively maintained. Last release 4 weeks ago, commits in 19 of the last 26 weeks. A safe choice.
$
pip install ultralytics-thopIn short
- thop looks abandoned: avoid it for new projects.
- ultralytics-thop is the most used: 4.8M downloads a month, 6.9× more than thop.
- ultralytics-thop also has the best Pythie’s Index (92).
- Safe default for a new project: ultralytics-thop.
Side by side
| Metric | thop | torchprofile | ultralytics-thop |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 23 | 34 |