{"id":13738010,"url":"https://github.com/martinsbruveris/tensorflow-image-models","last_synced_at":"2026-01-16T13:32:50.034Z","repository":{"id":37904884,"uuid":"426396844","full_name":"martinsbruveris/tensorflow-image-models","owner":"martinsbruveris","description":"TensorFlow port of PyTorch Image Models (timm) - image models with pretrained weights.","archived":false,"fork":false,"pushed_at":"2024-10-01T06:35:43.000Z","size":10455,"stargazers_count":290,"open_issues_count":12,"forks_count":25,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-30T23:35:05.285Z","etag":null,"topics":["imagenet","tensorflow","vision-transformer"],"latest_commit_sha":null,"homepage":"https://tfimm.readthedocs.io/en/latest/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinsbruveris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-09T21:47:59.000Z","updated_at":"2025-09-22T13:24:18.000Z","dependencies_parsed_at":"2024-11-21T03:31:43.284Z","dependency_job_id":null,"html_url":"https://github.com/martinsbruveris/tensorflow-image-models","commit_stats":{"total_commits":255,"total_committers":8,"mean_commits":31.875,"dds":"0.050980392156862786","last_synced_commit":"e9b22d1e0c20a50cf1459be534e37ef25da1ee92"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/martinsbruveris/tensorflow-image-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsbruveris%2Ftensorflow-image-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsbruveris%2Ftensorflow-image-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsbruveris%2Ftensorflow-image-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsbruveris%2Ftensorflow-image-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinsbruveris","download_url":"https://codeload.github.com/martinsbruveris/tensorflow-image-models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinsbruveris%2Ftensorflow-image-models/sbom","scorecard":{"id":621968,"data":{"date":"2025-08-11","repo":{"name":"github.com/martinsbruveris/tensorflow-image-models","commit":"d1c3ec16cdf11838894812a002bff612bbdfbc39"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/publish_test.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":2,"reason":"Found 7/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish_test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_test.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/publish_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/martinsbruveris/tensorflow-image-models/tests.yml/main?enable=pin","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"29 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: GHSA-496j-2rq6-j6cc","Warn: Project is vulnerable to: GHSA-p25m-jpj4-qcrr","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: GHSA-cjgq-5qmw-rcj6","Warn: Project is vulnerable to: GHSA-x4wf-678h-2pmq","Warn: Project is vulnerable to: GHSA-8qvm-5x2c-j2w7","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: GHSA-gjh7-xx4r-x345","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: GHSA-2g68-c3qc-8985","Warn: Project is vulnerable to: GHSA-f9vj-2wh5-fj8j","Warn: Project is vulnerable to: PYSEC-2023-221 / GHSA-hrfv-mqp8-q5rw","Warn: Project is vulnerable to: GHSA-q34m-jh98-gwm2","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T05:24:48.626Z","repository_id":37904884,"created_at":"2025-08-21T05:24:48.626Z","updated_at":"2025-08-21T05:24:48.626Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["imagenet","tensorflow","vision-transformer"],"created_at":"2024-08-03T03:02:08.827Z","updated_at":"2026-01-16T13:32:50.015Z","avatar_url":"https://github.com/martinsbruveris.png","language":"Jupyter Notebook","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# TensorFlow Image Models\n\n![Test Status](https://github.com/martinsbruveris/tensorflow-image-models/actions/workflows/tests.yml/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/tfimm/badge/?version=latest)](https://tfimm.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge\u0026logo=slack\u0026logoColor=white)](https://join.slack.com/t/tfimm/shared_invite/zt-13dnaf3qo-5JJaCBFIQhugeBXBT3NK8A)\n\n- [Introduction](#introduction)\n- [Usage](#usage)\n- [Models](#models)\n- [Profiling](#profiling)\n- [License](#license)\n- [Contact](#contact)\n\n## Introduction\n\nTensorFlow Image Models (`tfimm`) is a collection of image models with pretrained\nweights, obtained by porting architectures from \n[timm](https://github.com/rwightman/pytorch-image-models) to TensorFlow. The hope is\nthat the number of available architectures will grow over time. For now, it contains\nvision transformers (ViT, DeiT, CaiT, PVT and Swin Transformers), MLP-Mixer models \n(MLP-Mixer, ResMLP, gMLP, PoolFormer and ConvMixer), various ResNet flavours (ResNet,\nResNeXt, ECA-ResNet, SE-ResNet), the EfficientNet family (including AdvProp, \nNoisyStudent, Edge-TPU, V2 and Lite versions), MobileNet-V2, VGG, as well as the recent \nConvNeXt. `tfimm` has now expanded beyond classification and also includes Segment \nAnything.\n\nThis work would not have been possible wihout Ross Wightman's `timm` library and the\nwork on PyTorch/TensorFlow interoperability in HuggingFace's `transformer` repository.\nI tried to make sure all source material is acknowledged. Please let me know if I have\nmissed something.\n\n## Usage\n\n### Installation \n\nThe package can be installed via `pip`,\n\n```shell\npip install tfimm\n```\n\nTo load pretrained weights, `timm` needs to be installed separately.\n\n### Creating models\n\nTo load pretrained models use\n\n```python\nimport tfimm\n\nmodel = tfimm.create_model(\"vit_tiny_patch16_224\", pretrained=\"timm\")\n```\n\nWe can list available models with pretrained weights via\n\n```python\nimport tfimm\n\nprint(tfimm.list_models(pretrained=\"timm\"))\n```\n\nMost models are pretrained on ImageNet or ImageNet-21k. If we want to use them for other\ntasks we need to change the number of classes in the classifier or remove the \nclassifier altogether. We can do this by setting the `nb_classes` parameter in \n`create_model`. If `nb_classes=0`, the model will have no classification layer. If\n`nb_classes` is set to a value different from the default model config, the \nclassification layer will be randomly initialized, while all other weights will be\ncopied from the pretrained model.\n\nThe preprocessing function for each model can be created via\n```python\nimport tensorflow as tf\nimport tfimm\n\npreprocess = tfimm.create_preprocessing(\"vit_tiny_patch16_224\", dtype=\"float32\")\nimg = tf.ones((1, 224, 224, 3), dtype=\"uint8\")\nimg_preprocessed = preprocess(img)\n```\n\n### Saving and loading models\n\nAll models are subclassed from `tf.keras.Model` (they are _not_ functional models).\nThey can still be saved and loaded using the `SavedModel` format.\n\n```\n\u003e\u003e\u003e import tesnorflow as tf\n\u003e\u003e\u003e import tfimm\n\u003e\u003e\u003e model = tfimm.create_model(\"vit_tiny_patch16_224\")\n\u003e\u003e\u003e type(model)\n\u003cclass 'tfimm.architectures.vit.ViT'\u003e\n\u003e\u003e\u003e model.save(\"/tmp/my_model\")\n\u003e\u003e\u003e loaded_model = tf.keras.models.load_model(\"/tmp/my_model\")\n\u003e\u003e\u003e type(loaded_model)\n\u003cclass 'tfimm.architectures.vit.ViT'\u003e\n```\n\nFor this to work, the `tfimm` library needs to be imported before the model is loaded,\nsince during the import process, `tfimm` is registering custom models with Keras.\nOtherwise, we obtain the following output\n\n```\n\u003e\u003e\u003e import tensorflow as tf\n\u003e\u003e\u003e loaded_model = tf.keras.models.load_model(\"/tmp/my_model\")\n\u003e\u003e\u003e type(loaded_model)\n\u003cclass 'keras.saving.saved_model.load.Custom\u003eViT'\u003e\n```\n\n## Models\n\nThe following architectures are currently available:\n\n- CaiT (vision transformer) \n  [\\[github\\]](https://github.com/facebookresearch/deit/blob/main/README_cait.md)\n  - Going deeper with Image Transformers \n    [\\[arXiv:2103.17239\\]](https://arxiv.org/abs/2103.17239)\n- DeiT (vision transformer) \n  [\\[github\\]](https://github.com/facebookresearch/deit)\n  - Training data-efficient image transformers \u0026 distillation through attention. \n    [\\[arXiv:2012.12877\\]](https://arxiv.org/abs/2012.12877) \n- ViT (vision transformer) \n  [\\[github\\]](https://github.com/google-research/vision_transformer)\n  - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale.\n    [\\[arXiv:2010.11929\\]](https://arxiv.org/abs/2010.11929)\n  - How to train your ViT? Data, Augmentation, and Regularization in Vision \n    Transformers. [\\[arXiv:2106.10270\\]](https://arxiv.org/abs/2106.10270)\n  - Includes models trained with the SAM optimizer: Sharpness-Aware Minimization for \n    Efficiently Improving Generalization. \n    [\\[arXiv:2010.01412\\]](https://arxiv.org/abs/2010.01412)\n  - Includes models from: ImageNet-21K Pretraining for the Masses\n    [\\[arXiv:2104.10972\\]](https://arxiv.org/abs/2104.10972) \n    [\\[github\\]](https://github.com/Alibaba-MIIL/ImageNet21K)\n- Swin Transformer \n  [\\[github\\]](https://github.com/microsoft/Swin-Transformer)\n  - Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. \n    [\\[arXiv:2103.14030\\]](https://arxiv.org/abs/2103.14030)\n  - Tensorflow code adapted from \n    [Swin-Transformer-TF](https://github.com/rishigami/Swin-Transformer-TF)\n- MLP-Mixer and friends\n  - MLP-Mixer: An all-MLP Architecture for Vision \n    [\\[arXiv:2105.01601\\]](https://arxiv.org/abs/2105.01601)\n  - ResMLP: Feedforward networks for image classification... \n    [\\[arXiv:2105.03404\\]](https://arxiv.org/abs/2105.03404)\n  - Pay Attention to MLPs (gMLP)\n    [\\[arXiv:2105.08050\\]](https://arxiv.org/abs/2105.08050)\n- ConvMixer \n  [\\[github\\]](https://github.com/tmp-iclr/convmixer)\n  - Patches Are All You Need? \n    [\\[ICLR 2022 submission\\]](https://openreview.net/forum?id=TVHS5Y4dNvM)\n- EfficientNet family\n  - EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks\n    [\\[arXiv:1905.11946\\]](https://arxiv.org/abs/1905.11946)\n  - Adversarial Examples Improve Image Recognition\n    [\\[arXiv:1911.09665\\]](https://arxiv.org/abs/1911.09665)\n  - Self-training with Noisy Student improves ImageNet classification\n    [\\[arXiv:1911.04252\\]](https://arxiv.org/abs/1911.04252)\n  - EfficientNet-EdgeTPU\n    [\\[Blog\\]](https://ai.googleblog.com/2019/08/efficientnet-edgetpu-creating.html)\n  - EfficientNet-Lite\n    [\\[Blog\\]](https://blog.tensorflow.org/2020/03/higher-accuracy-on-vision-models-with-efficientnet-lite.html)\n  - EfficientNetV2: Smaller Models and Faster Training\n    [\\[arXiv:2104.00298\\]](https://arxiv.org/abs/2104.00298)\n- MobileNet-V2\n  - MobileNetV2: Inverted Residuals and Linear Bottlenecks\n    [\\[arXiv:1801.04381\\]](https://arxiv.org/abs/1801.04381)\n- Pyramid Vision Transformer \n  [\\[github\\]](https://github.com/whai362/PVT)\n  - Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without\n    Convolutions. [\\[arXiv:2102.12122\\]](https://arxiv.org/abs/2102.12122)\n  - PVTv2: Improved Baselines with Pyramid Vision Transformer \n    [\\[arXiv:2106.13797\\]](https://arxiv.org/abs/2106.13797)\n- ConvNeXt\n  [\\[github\\]](https://github.com/facebookresearch/ConvNeXt)\n  - A ConvNet for the 2020s. [\\[arXiv:2201.03545\\]](https://arxiv.org/abs/2201.03545)\n- PoolFormer\n  [\\[github\\]](https://github.com/sail-sg/poolformer)\n  - PoolFormer: MetaFormer is Actually What You Need for Vision.\n    [\\[arXiv:2111.11418\\]](https://arxiv.org/abs/2111.11418)\n- Pooling-based Vision Transformers (PiT)\n  - Rethinking Spatial Dimensions of Vision Transformers.\n    [\\[arXiv:2103.16302\\]](https://arxiv.org/abs/2103.16302)\n- ResNet, ResNeXt, ECA-ResNet, SE-ResNet and friends\n  - Deep Residual Learning for Image Recognition. \n    [\\[arXiv:1512.03385\\]](https://arxiv.org/abs/1512.03385)\n  - Exploring the Limits of Weakly Supervised Pretraining. \n    [\\[arXiv:1805.00932\\]](https://arxiv.org/abs/1805.00932)\n  - Billion-scale Semi-Supervised Learning for Image Classification. \n    [\\[arXiv:1905.00546\\]](https://arxiv.org/abs/1905.00546)\n  - ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. \n    [\\[arXiv1910.03151\\]](https://arxiv.org/abs/1910.03151)\n  - Revisiting ResNets. [\\[arXiv:2103.07579\\]](https://arxiv.org/abs/2103.07579)\n  - Making Convolutional Networks Shift-Invariant Again. (anti-aliasing layer)\n    [\\[arXiv:1904.11486\\]](https://arxiv.org/abs/1904.11486)\n  - Squeeze-and-Excitation Networks. \n    [\\[arXiv:1709.01507\\]](https://arxiv.org/abs/1709.01507)\n  - Big Transfer (BiT): General Visual Representation Learning\n    [\\[arXiv:1912.11370\\]](https://arxiv.org/abs/1912.11370)\n  - Knowledge distillation: A good teacher is patient and consistent\n    [\\[arXiv:2106:05237\\]](https://arxiv.org/abs/2106.05237)\n- Segment Anything Model (SAM) \n  [\\[github\\]](https://github.com/facebookresearch/segment-anything)\n    - Segment Anything [\\[arXiv:2304.02643\\]](https://arxiv.org/abs/2304.02643)\n\n### Loading pytorch models from HF hub\n\nIt is possible to load pre-trained model weights from the HF hub. See the \n[huggingface-model-weights](notebooks/huggingface-model-weights.ipynb) notebook for \ndetails. For this to work, it is important that the weight names and shapes on \nHF hub are compatible with one of the `tfimm` model configurations.\n\n## Profiling\n\nTo understand how big each of the models is, I have done some profiling to measure\n- maximum batch size that fits in GPU memory and\n- throughput in images/second\nfor both inference and backpropagation on K80 and V100 GPUs. For V100, measurements \nwere done for both `float32` and mixed precision.\n\nThe results can be found in the `results/profiling_{k80, v100}.csv` files.\n\nFor backpropagation, we use as loss the mean of model outputs\n\n```python\ndef backprop():\n    with tf.GradientTape() as tape:\n        output = model(x, training=True)\n        loss = tf.reduce_mean(output)\n        grads = tape.gradient(loss, model.trainable_variables)\n    optimizer.apply_gradients(zip(grads, model.trainable_variables))\n```\n\n## License\n\nThis repository is released under the Apache 2.0 license as found in the \n[LICENSE](LICENSE) file.\n\n## Contact\n\nAll things related to `tfimm` can be discussed via \n[Slack](https://join.slack.com/t/tfimm/shared_invite/zt-13dnaf3qo-5JJaCBFIQhugeBXBT3NK8A).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinsbruveris%2Ftensorflow-image-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinsbruveris%2Ftensorflow-image-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinsbruveris%2Ftensorflow-image-models/lists"}