A PaddlePaddle version image model zoo.

Overview

Paddle-Image-Models

GitHub forks GitHub Repo stars Pypi Downloads GitHub release (latest by date including pre-releases) GitHub

English | 简体中文

A PaddlePaddle version image model zoo.

Install Package

Usage

  • Quick Start

    import paddle
    from ppim import rednet_26
    
    # Load the model
    model, val_transforms = rednet_26(pretrained=True)
    
    # Model summary 
    paddle.summary(model, input_size=(1, 3, 224, 224))
    
    # Random a input
    x = paddle.randn(shape=(1, 3, 224, 224))
    
    # Model forword
    out = model(x)
  • Finetune

    import paddle
    import paddle.nn as nn
    import paddle.vision.transforms as T
    from paddle.vision import Cifar100
    
    from ppim import rexnet_1_0
    
    # Load the model
    model, val_transforms = rexnet_1_0(pretrained=True, class_dim=100)
    
    # Use the PaddleHapi Model
    model = paddle.Model(model)
    
    # Set the optimizer
    opt = paddle.optimizer.Adam(learning_rate=0.001, parameters=model.parameters())
    
    # Set the loss function
    loss = nn.CrossEntropyLoss()
    
    # Set the evaluate metric
    metric = paddle.metric.Accuracy(topk=(1, 5))
    
    # Prepare the model 
    model.prepare(optimizer=opt, loss=loss, metrics=metric)
    
    # Set the data preprocess
    train_transforms = T.Compose([
        T.Resize(256, interpolation='bicubic'),
        T.RandomCrop(224),
        T.ToTensor(),
        T.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
    ])
    
    # Load the Cifar100 dataset
    train_dataset = Cifar100(mode='train', transform=train_transforms, backend='pil')
    val_dataset = Cifar100(mode='test',  transform=val_transforms, backend='pil')
    
    # Finetune the model 
    model.fit(
        train_data=train_dataset, 
        eval_data=val_dataset, 
        batch_size=256, 
        epochs=2, 
        eval_freq=1, 
        log_freq=1, 
        save_dir='save_models', 
        save_freq=1, 
        verbose=1, 
        drop_last=False, 
        shuffle=True,
        num_workers=0
    )

Model Zoo

You might also like...
Object detection and instance segmentation toolkit based on PaddlePaddle.
Object detection and instance segmentation toolkit based on PaddlePaddle.

Object detection and instance segmentation toolkit based on PaddlePaddle.

Paddle-Adversarial-Toolbox (PAT) is a Python library for Deep Learning Security based on PaddlePaddle.

Paddle-Adversarial-Toolbox Paddle-Adversarial-Toolbox (PAT) is a Python library for Deep Learning Security based on PaddlePaddle. Model Zoo Common FGS

Plaything for Autistic Children (demo for PaddlePaddle/Wechaty/Mixlab project)
Plaything for Autistic Children (demo for PaddlePaddle/Wechaty/Mixlab project)

星星的孩子 - 一款为孤独症孩子设计的聊天机器人游戏 孤独症儿童是目前常常被忽视的一类群体。他们有着类似性格内向的特征,实际却受着广泛性发育障碍的折磨。 项目背景 这类儿童在与人交往时存在着沟通障碍,其特点表现在: 社交交流差,互动障碍明显 认知能力有限,被动认知 兴趣狭窄,重复刻板,缺乏变化和想象

Official PaddlePaddle implementation of Paint Transformer
Official PaddlePaddle implementation of Paint Transformer

Paint Transformer: Feed Forward Neural Painting with Stroke Prediction [Paper] [Paddle Implementation] Update We have optimized the serial inference p

An implementation of paper `Real-time Convolutional Neural Networks for Emotion and Gender Classification` with PaddlePaddle.
An implementation of paper `Real-time Convolutional Neural Networks for Emotion and Gender Classification` with PaddlePaddle.

简介 通过PaddlePaddle框架复现了论文 Real-time Convolutional Neural Networks for Emotion and Gender Classification 中提出的两个模型,分别是SimpleCNN和MiniXception。利用 imdb_crop

PaddleViT: State-of-the-art Visual Transformer and MLP Models for PaddlePaddle 2.0+
PaddleViT: State-of-the-art Visual Transformer and MLP Models for PaddlePaddle 2.0+

PaddlePaddle Vision Transformers State-of-the-art Visual Transformer and MLP Models for PaddlePaddle 🤖 PaddlePaddle Visual Transformers (PaddleViT or

Remote sensing change detection tool based on PaddlePaddle

PdRSCD PdRSCD(PaddlePaddle Remote Sensing Change Detection)是一个基于飞桨PaddlePaddle的遥感变化检测的项目,pypi包名为ppcd。目前0.2版本,最新支持图像列表输入的训练和预测,如多期影像、多源影像甚至多期多源影像。可以快速完

Large-scale open domain KNOwledge grounded conVERsation system based on PaddlePaddle

Knover Knover is a toolkit for knowledge grounded dialogue generation based on PaddlePaddle. Knover allows researchers and developers to carry out eff

🔥🔥High-Performance Face Recognition Library on PaddlePaddle & PyTorch🔥🔥
🔥🔥High-Performance Face Recognition Library on PaddlePaddle & PyTorch🔥🔥

face.evoLVe: High-Performance Face Recognition Library based on PaddlePaddle & PyTorch Evolve to be more comprehensive, effective and efficient for fa

Comments
  • 无法引入ppim

    无法引入ppim


    AttributeError Traceback (most recent call last) in 1 import paddle ----> 2 from ppim import rednet_26 3 4 # 使用 PPIM whl 包加载模型 5 model, val_transforms = rednet_26(pretrained=True, return_transforms=True)

    ~.conda\envs\paddle\lib\site-packages\ppim_init_.py in ----> 1 import ppim.models as models 2 3 from ppim.models import * 4 from inspect import isfunction, isclass 5

    ~.conda\envs\paddle\lib\site-packages\ppim\models_init_.py in 3 from ppim.models.tnt import tnt_s, TNT 4 from ppim.models.t2t import t2t_vit_7, t2t_vit_10, t2t_vit_12, t2t_vit_14, t2t_vit_19, t2t_vit_24, t2t_vit_t_14, t2t_vit_t_19, t2t_vit_t_24, t2t_vit_14_384, t2t_vit_24_token_labeling ----> 5 from ppim.models.pvt import pvt_ti, pvt_s, pvt_m, pvt_l, PyramidVisionTransformer 6 from ppim.models.pit import pit_ti, pit_s, pit_xs, pit_b, pit_ti_distilled, pit_s_distilled, pit_xs_distilled, pit_b_distilled, PoolingTransformer, DistilledPoolingTransformer 7 from ppim.models.coat import coat_ti, coat_m, coat_lite_ti, coat_lite_m, CoaT

    ~.conda\envs\paddle\lib\site-packages\ppim\models\pvt.py in 5 import paddle.vision.transforms as T 6 ----> 7 import ppim.models.vit as vit 8 9 from ppim.models.common import add_parameter, load_model

    AttributeError: module 'ppim' has no attribute 'models'

    opened by hanknewbird 0
Releases(1.1.0)
Owner
AgentMaker
Focus on deep learning tools
AgentMaker
Model Zoo for AI Model Efficiency Toolkit

We provide a collection of popular neural network models and compare their floating point and quantized performance.

Qualcomm Innovation Center 137 Jan 3, 2023
The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment

Hailo Model Zoo The Hailo Model Zoo provides pre-trained models for high-performance deep learning applications. Using the Hailo Model Zoo you can mea

Hailo 50 Dec 7, 2022
Transfer Learning Shootout for PyTorch's model zoo (torchvision)

pytorch-retraining Transfer Learning shootout for PyTorch's model zoo (torchvision). Load any pretrained model with custom final layer (num_classes) f

Alexander Hirner 169 Jun 29, 2022
Model Zoo of BDD100K Dataset

Model Zoo of BDD100K Dataset

ETH VIS Group 200 Dec 27, 2022
TensorFlow2 Classification Model Zoo playing with TensorFlow2 on the CIFAR-10 dataset.

Training CIFAR-10 with TensorFlow2(TF2) TensorFlow2 Classification Model Zoo. I'm playing with TensorFlow2 on the CIFAR-10 dataset. Architectures LeNe

Chia-Hung Yuan 16 Sep 27, 2022
The DL Streamer Pipeline Zoo is a catalog of optimized media and media analytics pipelines.

The DL Streamer Pipeline Zoo is a catalog of optimized media and media analytics pipelines. It includes tools for downloading pipelines and their dependencies and tools for measuring their performace.

null 8 Dec 4, 2022
Classification models 1D Zoo - Keras and TF.Keras

Classification models 1D Zoo - Keras and TF.Keras This repository contains 1D variants of popular CNN models for classification like ResNets, DenseNet

Roman Solovyev 12 Jan 6, 2023
A PaddlePaddle implementation of STGCN with a few modifications in the model architecture in order to forecast traffic jam.

About This repository contains the code of a PaddlePaddle implementation of STGCN based on the paper Spatio-Temporal Graph Convolutional Networks: A D

Tianjian Li 1 Jan 11, 2022
rastrainer is a QGIS plugin to training remote sensing semantic segmentation model based on PaddlePaddle.

rastrainer rastrainer is a QGIS plugin to training remote sensing semantic segmentation model based on PaddlePaddle. UI TODO Init UI. Add Block. Add l

deepbands 5 Mar 4, 2022
End-to-end image segmentation kit based on PaddlePaddle.

English | 简体中文 PaddleSeg PaddleSeg has released the new version including the following features: Our team won the AutoNUE@CVPR 2021 challenge, where

null 6.2k Jan 2, 2023