Skip to main content

A timm model utility

Project description

timm-info

A utility for exploring and analyzing PyTorch Image Models (timm).

Installation

Using uv (recommended)

uv add timm-info

Using pip

pip install timm-info

Development Setup

Clone the repository and set up your development environment:

git clone https://github.com/belfner/timm-info.git
cd timm-info
uv sync
uv run timminfo --help

Run tests:

uv run pytest

Requirements

  • Python 3.10+
  • PyTorch 2.0+
  • timm 0.9.0+

Usage

timm-info provides the CLI tool timminfo with commands: search and info

Usage: timminfo [OPTIONS] COMMAND [ARGS]...

  Timm model utility

Options:
  --help  Show this message and exit.

Commands:
  info    Get information about a particular timm model.
  search  Search for timm models.

search

timminfo search ...

Usage: timminfo search [OPTIONS] [NAME_PATTERN]...

  Search for timm models. Multiple patterns can be passed.

Options:
  -p, --pretrained  Only show pretrained models
  -s, --simple      Display results in simple format (useful for chaining I/O)
  --help            Show this message and exit.

Examples

Command

timminfo search 'resnet50*' 'xception*'

Output

Results for 'resnet50*':
------------------------
0. resnet50
1. resnet50_gn
2. resnet50c
3. resnet50d
4. resnet50s
5. resnet50t

Results for 'xception*':
------------------------
0. xception41
1. xception41p
2. xception65
3. xception65p
4. xception71

Command

timminfo search -s 'resnet50*' 'xception*'

Output

resnet50
resnet50_gn
resnet50c
resnet50d
resnet50s
resnet50t

xception41
xception41p
xception65
xception65p
xception71

Command

timminfo search -p 'resnet50*' 'xception*'

Output

Results for 'resnet50*':
------------------------
 0. resnet50.a1_in1k
 1. resnet50.a1h_in1k
 2. resnet50.a2_in1k
 3. resnet50.a3_in1k
 4. resnet50.am_in1k
 5. resnet50.b1k_in1k
 6. resnet50.b2k_in1k
 7. resnet50.bt_in1k
 8. resnet50.c1_in1k
 9. resnet50.c2_in1k
10. resnet50.d_in1k
11. resnet50.fb_ssl_yfcc100m_ft_in1k
12. resnet50.fb_swsl_ig1b_ft_in1k
13. resnet50.gluon_in1k
14. resnet50.ra_in1k
15. resnet50.ram_in1k
16. resnet50.tv2_in1k
17. resnet50.tv_in1k
18. resnet50_gn.a1h_in1k
19. resnet50c.gluon_in1k
20. resnet50d.a1_in1k
21. resnet50d.a2_in1k
22. resnet50d.a3_in1k
23. resnet50d.gluon_in1k
24. resnet50d.ra2_in1k
25. resnet50s.gluon_in1k

Results for 'xception*':
------------------------
0. xception41.tf_in1k
1. xception41p.ra3_in1k
2. xception65.ra3_in1k
3. xception65.tf_in1k
4. xception65p.ra3_in1k
5. xception71.tf_in1k

info

timminfo info ...

Usage: timminfo info [OPTIONS] [NAME]...

  Get information about a particular timm model. Multiple names can be passed.

Options:
  --help  Show this message and exit.

Example

Command

timminfo info convnextv2_atto efficientnet_b0

Output

Model name:                            convnextv2_atto
Number of params:                      3,387,400
Estimated model size:                  13.550 MB
Number of in features for classifier:  320
Has extractable feature layers:        True
Number of feature layers:              4
Number of channels per feature:        [40, 80, 160, 320]
Pretrained Input Size:                 (3, 224, 224)

Model name:                            efficientnet_b0
Number of params:                      4,007,548
Estimated model size:                  16.030 MB
Number of in features for classifier:  1280
Has extractable feature layers:        True
Number of feature layers:              5
Number of channels per feature:        [16, 24, 40, 112, 320]
Pretrained Input Size:                 (3, 224, 224)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timm_info-0.3.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timm_info-0.3.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file timm_info-0.3.1.tar.gz.

File metadata

  • Download URL: timm_info-0.3.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for timm_info-0.3.1.tar.gz
Algorithm Hash digest
SHA256 e557aa3ff4808751f17d3713017dc1834c095115734c9e310088efc33c47994a
MD5 fbf2e39e83c0d618d49a43187b0408c1
BLAKE2b-256 e264f2cb6d90c638f03fc659ebf2a1fd3a7355439ca79f191f7cdb8f3de8a3bb

See more details on using hashes here.

File details

Details for the file timm_info-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: timm_info-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for timm_info-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8108cc7dd67fba979f214fa9a6c6f86d03e59e90ccbb436384949126b10c1334
MD5 f2b4bd0b1a9b6a38743eeb437c36d065
BLAKE2b-256 5cb5e10fdb38311d78e7eb126e86860a89bef602f7a02e16c9dee58175129f41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page