{"id":15664218,"url":"https://github.com/deep-diver/segformer-tf-transformers","last_synced_at":"2025-07-11T13:39:51.824Z","repository":{"id":41418628,"uuid":"509479413","full_name":"deep-diver/segformer-tf-transformers","owner":"deep-diver","description":"This repository demonstrates how to use TensorFlow based SegFormer model in 🤗 transformers package.","archived":false,"fork":false,"pushed_at":"2022-07-25T03:13:51.000Z","size":17659,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-07T16:56:52.920Z","etag":null,"topics":["huggingface","keras","segformer","semantic-segmentation","tensorflow","transformers"],"latest_commit_sha":null,"homepage":"","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/deep-diver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-01T14:11:36.000Z","updated_at":"2024-09-20T17:42:25.000Z","dependencies_parsed_at":"2022-07-14T20:30:40.439Z","dependency_job_id":null,"html_url":"https://github.com/deep-diver/segformer-tf-transformers","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Fsegformer-tf-transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Fsegformer-tf-transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Fsegformer-tf-transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-diver%2Fsegformer-tf-transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deep-diver","download_url":"https://codeload.github.com/deep-diver/segformer-tf-transformers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234452066,"owners_count":18834740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["huggingface","keras","segformer","semantic-segmentation","tensorflow","transformers"],"created_at":"2024-10-03T13:41:41.903Z","updated_at":"2025-01-18T02:14:38.696Z","avatar_url":"https://github.com/deep-diver.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usage of TensorFlow based SegFormer in 🤗 transformers\n\nThis repository demonstrates how to use TensorFlow based SegFormer model [1] in 🤗 `transformers` package with Jupyter Notebook and Gradio application which is hosted on [🤗 Spaces](https://huggingface.co/spaces/chansung/segformer-tf-transformers).\n\nSegFormer achieves good performance on various high-resolution semantic segmentation datasets along with better efficiency.\n\n_One of the objectives of this repository is to allow TensorFlow users train high-quality semantic segmentation models that benefit from\nhigher resolutions._\n\n## Notice\n\nSince the TensorFlow variant of SegFormer hasn't been included in a `transformers` release yet you need to install it from the source:\n\n```shell\npip install git+https://github.com/huggingface/transformers\n```\n\n## About the notebooks\n\n* [`notebooks/TFSegFormer_Inference.ipynb`](https://github.com/deep-diver/segformer-tf-transformers/blob/main/notebooks/TFSegFormer_Inference.ipynb): Shows how to run inference with a pre-trained semantic segmentation model. \n* [`notebooks/TFSegFormer_Finetune.ipynb`](https://github.com/deep-diver/segformer-tf-transformers/blob/main/notebooks/TFSegFormer_Finetune.ipynb): Shows how to fine-tune a pre-trained SegFormer model.\n* [`notebooks/TFSegFormer_ONNX.ipynb`](https://github.com/deep-diver/segformer-tf-transformers/blob/main/notebooks/TFSegFormer_ONNX.ipynb): Shows how to convert TensorFlow based SegFormer model to ONNX format along with their timing comparison.\n\n## Demo on Hugging Face Space\n\nVisit [this link](https://huggingface.co/spaces/chansung/segformer-tf-transformers).\n\n![](https://i.ibb.co/StPyy3z/segformer-space.png)\n\n## References\n\n[1] SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers; Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo; https://arxiv.org/abs/2105.15203 (2021).\n\n## Acknowledgements\n\nThanks to the [ML-GDE program (ML Developer Programs team)](https://developers.google.com/programs/experts/) for providing GCP credits that we used for experimentation. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep-diver%2Fsegformer-tf-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeep-diver%2Fsegformer-tf-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep-diver%2Fsegformer-tf-transformers/lists"}