GithubHelp home page GithubHelp logo

triple-mu / flowvision Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oneflow-inc/vision

0.0 0.0 0.0 20.6 MB

Datasets, Transforms and Models specific to Computer Vision

Home Page: https://flowvision.readthedocs.io/en/latest/index.html

License: BSD 3-Clause "New" or "Revised" License

Python 99.02% Shell 0.98%

flowvision's Introduction

flowvision

PyPI docs GitHub GitHub release PRs Welcome

Introduction

The flowvision package consists of popular datasets, SOTA computer vision models, layers, utilities, schedulers, advanced data augmentations and common image transformations based on OneFlow.

Installation

First install OneFlow, please refer to install-oneflow for more details.

Then install the latest stable release of flowvision

pip install flowvision==0.2.1

Overview of flowvision structure

Vision Models Components Augmentation and Datasets
  • Classification
    • AlexNet
    • SqueezeNet
    • VGG
    • GoogleNet
    • InceptionV3
    • ResNet
    • ResNeXt
    • ResNeSt
    • SENet
    • DenseNet
    • ShuffleNetV2
    • MobileNetV2
    • MobileNetV3
    • MNASNet
    • Res2Net
    • EfficientNet
    • GhostNet
    • RegNet
    • ReXNet
    • Vision Transformer
    • DeiT
    • PVT
    • Swin Transformer
    • CSwin Transformer
    • CrossFormer
    • PoolFormer
    • Mlp Mixer
    • ResMLP
    • gMLP
    • ConvMixer
    • ConvNeXt
    • LeViT
    • RegionViT
    • UniFormer
    • VAN
    • MobileViT
    • DeiT-III
    • CaiT
    • DLA
    • GENet
    • HRNet
    • FAN
  • Detection
    • SSD
    • SSDLite
    • Faster RCNN
    • RetinaNet
  • Segmentation
    • FCN
    • DeepLabV3
  • Neural Style Transfer
    • StyleNet
  • Face Recognition
    • IResNet
  • Attention Layers
    • SE
    • BAM
    • CBAM
    • ECA
    • Non Local Attention
    • Global Context
    • Gated Channel Transform
    • Coordinate Attention
  • Regularization Layers
    • Drop Block
    • Drop Path
    • Stochastic Depth
    • LayerNorm2D
  • Basic Layers
    • Patch Embedding
    • Mlp Block
    • FPN
  • Activation Layers
    • Hard Sigmoid
    • Hard Swish
  • Initialization Function
    • Truncated Normal
    • Lecun Normal
  • LR Scheduler
    • StepLRScheduler
    • MultiStepLRScheduler
    • CosineLRScheduler
    • LinearLRScheduler
    • PolyLRScheduler
    • TanhLRScheduler
  • Loss
    • LabelSmoothingCrossEntropy
    • SoftTargetCrossEntropy
  • Basic Augmentation
    • CenterCrop
    • RandomCrop
    • RandomResizedCrop
    • FiveCrop
    • TenCrop
    • RandomVerticalFlip
    • RandomHorizontalFlip
    • Resize
    • RandomGrayscale
    • GaussianBlur
  • Advanced Augmentation
    • Mixup
    • CutMix
    • AugMix
    • RandomErasing
    • Rand Augmentation
    • Auto Augmentation
  • Datasets
    • CIFAR10
    • CIFAR100
    • COCO
    • FashionMNIST
    • ImageNet
    • VOC

Documentation

Please refer to docs for full API documentation and tutorials

ChangeLog

Please refer to ChangeLog for details and release history

Model Zoo

We have conducted all the tests under the same setting, please refer to the model page here for more details.

Quick Start

Create a model

In flowvision we support two ways to create a model.

  • Import the target model from flowvision.models, e.g., create alexnet from flowvision
from flowvision.models.alexnet import alexnet
model = alexnet()

# will download the pretrained model
model = alexnet(pretrained=True)

# customize model to fit different number of classes
model = alexnet(num_classes=100)
  • Or create model in an easier way by using ModelCreator, e.g., create alexnet model by ModelCreator
from flowvision.models import ModelCreator
alexnet = ModelCreator.create_model("alexnet")

# will download the pretrained model
alexnet = ModelCreator.create_model("alexnet", pretrained=True)

# customize model to fit different number of classes
alexnet = ModelCreator.create_model("alexnet", num_classes=100)

Tabulate all models with pretrained weights

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().

from flowvision.models import ModelCreator
all_pretrained_models = ModelCreator.model_table(pretrained=True)
print(all_pretrained_models)

You can get the results like:

╒════════════════════════════════════════════╤══════════════╕
│ Supported ModelsPretrained   │
╞════════════════════════════════════════════╪══════════════╡
│ alexnettrue         │
├────────────────────────────────────────────┼──────────────┤
│ convmixer_1024_20true         │
├────────────────────────────────────────────┼──────────────┤
│ convmixer_1536_20true         │
├────────────────────────────────────────────┼──────────────┤
│ convmixer_768_32_relutrue         │
├────────────────────────────────────────────┼──────────────┤
│ crossformer_base_patch4_group7_224true         │
├────────────────────────────────────────────┼──────────────┤
│ crossformer_large_patch4_group7_224true         │
├────────────────────────────────────────────┼──────────────┤
│ crossformer_small_patch4_group7_224true         │
├────────────────────────────────────────────┼──────────────┤
│ crossformer_tiny_patch4_group7_224true         │
├────────────────────────────────────────────┼──────────────┤
│                    ...                     │ ...          │
├────────────────────────────────────────────┼──────────────┤
│ wide_resnet101_2true         │
├────────────────────────────────────────────┼──────────────┤
│ wide_resnet50_2true         │
╘════════════════════════════════════════════╧══════════════╛

Search for supported model by Wildcard

It is easy to search for model architectures by using Wildcard as below:

from flowvision.models import ModelCreator
all_efficientnet_models = ModelCreator.model_table("**efficientnet**")
print(all_efficientnet_models)

You can get the results like:

╒════════════════════╤══════════════╕
│ Supported ModelsPretrained   │
╞════════════════════╪══════════════╡
│ efficientnet_b0true         │
├────────────────────┼──────────────┤
│ efficientnet_b1true         │
├────────────────────┼──────────────┤
│ efficientnet_b2true         │
├────────────────────┼──────────────┤
│ efficientnet_b3true         │
├────────────────────┼──────────────┤
│ efficientnet_b4true         │
├────────────────────┼──────────────┤
│ efficientnet_b5true         │
├────────────────────┼──────────────┤
│ efficientnet_b6true         │
├────────────────────┼──────────────┤
│ efficientnet_b7true         │
╘════════════════════╧══════════════╛

List all models supported in flowvision

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.

  • List all models with pretrained weights
from flowvision.models import ModelCreator
all_pretrained_models = ModelCreator.model_list(pretrained=True)
print(all_pretrained_models[:5])

You can get the results like:

['alexnet', 
 'convmixer_1024_20', 
 'convmixer_1536_20', 
 'convmixer_768_32_relu', 
 'crossformer_base_patch4_group7_224']
  • Support wildcard search
from flowvision.models import ModelCreator
all_efficientnet_models = ModelCreator.model_list("**efficientnet**")
print(all_efficientnet_models)

You can get the results like:

['efficientnet_b0', 
 'efficientnet_b1', 
 'efficientnet_b2', 
 'efficientnet_b3', 
 'efficientnet_b4', 
 'efficientnet_b5', 
 'efficientnet_b6', 
 'efficientnet_b7']

Disclaimer on Datasets

This 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.

If 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!

flowvision's People

Contributors

aries-chen avatar bbuf avatar daquexian avatar derryhub avatar flowingsun007 avatar hihippie avatar howin98 avatar jackalcooper avatar kaijieshi7 avatar ldpe2g avatar leaves-zwx avatar lixiang007666 avatar marigoold avatar olojuwin avatar oneflow-ci-bot avatar rentainhe avatar simonjjj avatar tea321000 avatar thinksoso avatar triple-mu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.