{"id":13443281,"url":"https://github.com/Oneflow-Inc/vision","last_synced_at":"2025-03-20T16:30:55.972Z","repository":{"id":37377954,"uuid":"415808058","full_name":"Oneflow-Inc/vision","owner":"Oneflow-Inc","description":"Datasets, Transforms and Models specific to Computer Vision","archived":false,"fork":false,"pushed_at":"2023-11-17T03:33:19.000Z","size":21165,"stargazers_count":84,"open_issues_count":21,"forks_count":17,"subscribers_count":40,"default_branch":"main","last_synced_at":"2025-03-05T04:14:38.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://flowvision.readthedocs.io/en/latest/index.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oneflow-Inc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-11T06:44:00.000Z","updated_at":"2025-01-01T10:52:37.000Z","dependencies_parsed_at":"2024-06-21T13:13:40.169Z","dependency_job_id":"c4fd3b1f-6eae-44ef-9203-758afdc28330","html_url":"https://github.com/Oneflow-Inc/vision","commit_stats":{"total_commits":272,"total_committers":21,"mean_commits":"12.952380952380953","dds":0.7463235294117647,"last_synced_commit":"94e50f686e3ca285c9055bc870f871f908f4704d"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Fvision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Fvision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Fvision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Fvision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oneflow-Inc","download_url":"https://codeload.github.com/Oneflow-Inc/vision/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244039239,"owners_count":20387835,"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":[],"created_at":"2024-07-31T03:01:58.589Z","updated_at":"2025-03-20T16:30:55.553Z","avatar_url":"https://github.com/Oneflow-Inc.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003eflowvision\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/flowvision/\"\u003e\n        \u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/flowvision\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://flowvision.readthedocs.io/en/latest/index.html\"\u003e\n        \u003cimg alt=\"docs\" src=\"https://img.shields.io/badge/docs-latest-blue\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Oneflow-Inc/vision/blob/master/LICENSE\"\u003e\n        \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/Oneflow-Inc/vision.svg?color=blue\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Oneflow-Inc/vision/releases\"\u003e\n        \u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/github/release/Oneflow-Inc/vision.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Oneflow-Inc/vision/issues\"\u003e\n        \u003cimg alt=\"PRs Welcome\" src=\"https://img.shields.io/badge/PRs-welcome-pink.svg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n## Introduction\nThe flowvision package consists of popular datasets, SOTA computer vision models, layers, utilities, schedulers, advanced data augmentations and common image transformations based on OneFlow.\n\n## Installation\nFirst install OneFlow, please refer to [install-oneflow](https://github.com/Oneflow-Inc/oneflow#install-oneflow) for more details.\n\nThen install the latest stable release of `flowvision`\n```bash\npip install flowvision==0.2.2\n```\n\n## Overview of flowvision structure\n\u003ctable align=\"center\"\u003e\n  \u003ctbody\u003e\n    \u003ctr align=\"center\" valign=\"bottom\"\u003e\n      \u003ctd\u003e\n        \u003cb\u003eVision Models\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cb\u003eComponents\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cb\u003eAugmentation and Datasets\u003c/b\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr valign=\"top\"\u003e\n      \u003ctd\u003e\n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eClassification\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eAlexNet\u003c/li\u003e\n            \u003cli\u003eSqueezeNet\u003c/li\u003e\n            \u003cli\u003eVGG\u003c/li\u003e\n            \u003cli\u003eGoogleNet\u003c/li\u003e\n            \u003cli\u003eInceptionV3\u003c/li\u003e\n            \u003cli\u003eResNet\u003c/li\u003e\n            \u003cli\u003eResNeXt\u003c/li\u003e\n            \u003cli\u003eResNeSt\u003c/li\u003e\n            \u003cli\u003eSENet\u003c/li\u003e\n            \u003cli\u003eDenseNet\u003c/li\u003e\n            \u003cli\u003eShuffleNetV2\u003c/li\u003e  \n            \u003cli\u003eMobileNetV2\u003c/li\u003e\n            \u003cli\u003eMobileNetV3\u003c/li\u003e\n            \u003cli\u003eMNASNet\u003c/li\u003e\n            \u003cli\u003eRes2Net\u003c/li\u003e\n            \u003cli\u003eEfficientNet\u003c/li\u003e  \n            \u003cli\u003eGhostNet\u003c/li\u003e\n            \u003cli\u003eRegNet\u003c/li\u003e \n            \u003cli\u003eReXNet\u003c/li\u003e\n            \u003cli\u003eVision Transformer\u003c/li\u003e\n            \u003cli\u003eDeiT\u003c/li\u003e\n            \u003cli\u003ePVT\u003c/li\u003e\n            \u003cli\u003eSwin Transformer\u003c/li\u003e\n            \u003cli\u003eCSwin Transformer\u003c/li\u003e\n            \u003cli\u003eCrossFormer\u003c/li\u003e\n            \u003cli\u003ePoolFormer\u003c/li\u003e\n            \u003cli\u003eMlp Mixer\u003c/li\u003e\n            \u003cli\u003eResMLP\u003c/li\u003e\n            \u003cli\u003egMLP\u003c/li\u003e\n            \u003cli\u003eConvMixer\u003c/li\u003e\n            \u003cli\u003eConvNeXt\u003c/li\u003e\n            \u003cli\u003eLeViT\u003c/li\u003e\n            \u003cli\u003eRegionViT\u003c/li\u003e\n            \u003cli\u003eUniFormer\u003c/li\u003e\n            \u003cli\u003eVAN\u003c/li\u003e\n            \u003cli\u003eMobileViT\u003c/li\u003e\n            \u003cli\u003eDeiT-III\u003c/li\u003e\n            \u003cli\u003eCaiT\u003c/li\u003e\n            \u003cli\u003eDLA\u003c/li\u003e\n            \u003cli\u003eGENet\u003c/li\u003e\n            \u003cli\u003eHRNet\u003c/li\u003e\n            \u003cli\u003eFAN\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003cli\u003e\u003cb\u003eDetection\u003c/b\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003eSSD\u003c/li\u003e\n            \u003cli\u003eSSDLite\u003c/li\u003e\n            \u003cli\u003eFaster RCNN\u003c/li\u003e\n            \u003cli\u003eRetinaNet\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003cli\u003e\u003cb\u003eSegmentation\u003c/b\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003eFCN\u003c/li\u003e\n            \u003cli\u003eDeepLabV3\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003cli\u003e\u003cb\u003eNeural Style Transfer\u003c/b\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003eStyleNet\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003cli\u003e\u003cb\u003eFace Recognition\u003c/b\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003eIResNet\u003c/li\u003e\n        \u003c/ul\u003e        \n      \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n      \u003cul\u003e\u003cli\u003e\u003cb\u003eAttention Layers\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eSE\u003c/li\u003e\n            \u003cli\u003eBAM\u003c/li\u003e\n            \u003cli\u003eCBAM\u003c/li\u003e\n            \u003cli\u003eECA\u003c/li\u003e\n            \u003cli\u003eNon Local Attention\u003c/li\u003e\n            \u003cli\u003eGlobal Context\u003c/li\u003e\n            \u003cli\u003eGated Channel Transform\u003c/li\u003e\n            \u003cli\u003eCoordinate Attention\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003cb\u003eRegularization Layers\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eDrop Block\u003c/li\u003e\n            \u003cli\u003eDrop Path\u003c/li\u003e\n            \u003cli\u003eStochastic Depth\u003c/li\u003e\n            \u003cli\u003eLayerNorm2D\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003cb\u003eBasic Layers\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003ePatch Embedding\u003c/li\u003e\n            \u003cli\u003eMlp Block\u003c/li\u003e\n            \u003cli\u003eFPN\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003cb\u003eActivation Layers\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eHard Sigmoid\u003c/li\u003e\n            \u003cli\u003eHard Swish\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003cb\u003eInitialization Function\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eTruncated Normal\u003c/li\u003e\n            \u003cli\u003eLecun Normal\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003cul\u003e\u003cli\u003e\u003cb\u003eLR Scheduler\u003c/b\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003eStepLRScheduler\u003c/li\u003e\n            \u003cli\u003eMultiStepLRScheduler\u003c/li\u003e\n            \u003cli\u003eCosineLRScheduler\u003c/li\u003e\n            \u003cli\u003eLinearLRScheduler\u003c/li\u003e\n            \u003cli\u003ePolyLRScheduler\u003c/li\u003e\n            \u003cli\u003eTanhLRScheduler\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n        \u003cul\u003e\u003cli\u003e\u003cb\u003eLoss\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eLabelSmoothingCrossEntropy\u003c/li\u003e\n            \u003cli\u003eSoftTargetCrossEntropy\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cul\u003e\u003cli\u003e\u003cb\u003eBasic Augmentation\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eCenterCrop\u003c/li\u003e\n            \u003cli\u003eRandomCrop\u003c/li\u003e\n            \u003cli\u003eRandomResizedCrop\u003c/li\u003e\n            \u003cli\u003eFiveCrop\u003c/li\u003e\n            \u003cli\u003eTenCrop\u003c/li\u003e\n            \u003cli\u003eRandomVerticalFlip\u003c/li\u003e\n            \u003cli\u003eRandomHorizontalFlip\u003c/li\u003e\n            \u003cli\u003eResize\u003c/li\u003e\n            \u003cli\u003eRandomGrayscale\u003c/li\u003e\n            \u003cli\u003eGaussianBlur\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n        \u003cul\u003e\u003cli\u003e\u003cb\u003eAdvanced Augmentation\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eMixup\u003c/li\u003e\n            \u003cli\u003eCutMix\u003c/li\u003e\n            \u003cli\u003eAugMix\u003c/li\u003e\n            \u003cli\u003eRandomErasing\u003c/li\u003e\n            \u003cli\u003eRand Augmentation\u003c/li\u003e\n            \u003cli\u003eAuto Augmentation\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n        \u003cul\u003e\u003cli\u003e\u003cb\u003eDatasets\u003c/b\u003e\u003c/li\u003e\n          \u003cul\u003e\n            \u003cli\u003eCIFAR10\u003c/li\u003e\n            \u003cli\u003eCIFAR100\u003c/li\u003e\n            \u003cli\u003eCOCO\u003c/li\u003e\n            \u003cli\u003eFashionMNIST\u003c/li\u003e\n            \u003cli\u003eImageNet\u003c/li\u003e\n            \u003cli\u003eVOC\u003c/li\u003e\n          \u003c/ul\u003e  \n        \u003c/ul\u003e\n      \u003c/td\u003e  \n    \u003c/tr\u003e\n\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Documentation\nPlease refer to [docs](https://flowvision.readthedocs.io/en/latest/index.html) for full API documentation and tutorials\n\n\n## ChangeLog\nPlease refer to [ChangeLog](https://flowvision.readthedocs.io/en/latest/changelog.html) for details and release history\n\n\n## Model Zoo\nWe have conducted all the tests under the same setting, please refer to the model page [here](./results/results_imagenet.md) for more details.\n\n## Quick Start\n### Create a model\nIn flowvision we support two ways to create a model.\n\n- Import the target model from `flowvision.models`, e.g., create `alexnet` from flowvision\n\n```python\nfrom flowvision.models.alexnet import alexnet\nmodel = alexnet()\n\n# will download the pretrained model\nmodel = alexnet(pretrained=True)\n\n# customize model to fit different number of classes\nmodel = alexnet(num_classes=100)\n```\n\n- Or create model in an easier way by using `ModelCreator`, e.g., create `alexnet` model by `ModelCreator`\n```python\nfrom flowvision.models import ModelCreator\nalexnet = ModelCreator.create_model(\"alexnet\")\n\n# will download the pretrained model\nalexnet = ModelCreator.create_model(\"alexnet\", pretrained=True)\n\n# customize model to fit different number of classes\nalexnet = ModelCreator.create_model(\"alexnet\", num_classes=100)\n```\n\n### Tabulate all models with pretrained weights\n`ModelCreator.model_table()` returns a tabular results of available models in `flowvision`. To check all of pretrained models, pass in `pretrained=True` in `ModelCreator.model_table()`.\n```python\nfrom flowvision.models import ModelCreator\nall_pretrained_models = ModelCreator.model_table(pretrained=True)\nprint(all_pretrained_models)\n```\nYou can get the results like:\n```python\n╒════════════════════════════════════════════╤══════════════╕\n│ Supported Models                           │ Pretrained   │\n╞════════════════════════════════════════════╪══════════════╡\n│ alexnet                                    │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ convmixer_1024_20                          │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ convmixer_1536_20                          │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ convmixer_768_32_relu                      │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ crossformer_base_patch4_group7_224         │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ crossformer_large_patch4_group7_224        │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ crossformer_small_patch4_group7_224        │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ crossformer_tiny_patch4_group7_224         │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│                    ...                     │ ...          │\n├────────────────────────────────────────────┼──────────────┤\n│ wide_resnet101_2                           │ true         │\n├────────────────────────────────────────────┼──────────────┤\n│ wide_resnet50_2                            │ true         │\n╘════════════════════════════════════════════╧══════════════╛\n```\n\n### Search for supported model by Wildcard\nIt is easy to search for model architectures by using Wildcard as below:\n```python\nfrom flowvision.models import ModelCreator\nall_efficientnet_models = ModelCreator.model_table(\"**efficientnet**\")\nprint(all_efficientnet_models)\n```\nYou can get the results like:\n```python\n╒════════════════════╤══════════════╕\n│ Supported Models   │ Pretrained   │\n╞════════════════════╪══════════════╡\n│ efficientnet_b0    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b1    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b2    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b3    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b4    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b5    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b6    │ true         │\n├────────────────────┼──────────────┤\n│ efficientnet_b7    │ true         │\n╘════════════════════╧══════════════╛\n```\n\n### List all models supported in flowvision\n`ModelCreator.model_list` has similar function as `ModelCreator.model_table` but return a list object, which gives the user a more flexible way to check the supported model in flowvision.\n- List all models with pretrained weights\n```python\nfrom flowvision.models import ModelCreator\nall_pretrained_models = ModelCreator.model_list(pretrained=True)\nprint(all_pretrained_models[:5])\n```\nYou can get the results like:\n```python\n['alexnet', \n 'convmixer_1024_20', \n 'convmixer_1536_20', \n 'convmixer_768_32_relu', \n 'crossformer_base_patch4_group7_224']\n```\n\n- Support wildcard search\n```python\nfrom flowvision.models import ModelCreator\nall_efficientnet_models = ModelCreator.model_list(\"**efficientnet**\")\nprint(all_efficientnet_models)\n```\nYou can get the results like:\n```python\n['efficientnet_b0', \n 'efficientnet_b1', \n 'efficientnet_b2', \n 'efficientnet_b3', \n 'efficientnet_b4', \n 'efficientnet_b5', \n 'efficientnet_b6', \n 'efficientnet_b7']\n```\n\n\u003c/details\u003e\n\n## Disclaimer on Datasets\nThis is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license.\n\nIf you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOneflow-Inc%2Fvision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOneflow-Inc%2Fvision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOneflow-Inc%2Fvision/lists"}