From 30adb023045cb1eb21ff1ac709b1aa4318fca882 Mon Sep 17 00:00:00 2001 From: weishengyu Date: Tue, 8 Jun 2021 15:25:02 +0800 Subject: [PATCH 1/3] remove data/imaug --- docs/zh_CN/faq_series/faq_2020_s1.md | 4 +- ppcls/data/imaug/__init__.py | 94 ---------- ppcls/data/imaug/autoaugment.py | 264 --------------------------- ppcls/data/imaug/batch_operators.py | 117 ------------ ppcls/data/imaug/cutout.py | 41 ----- ppcls/data/imaug/fmix.py | 217 ---------------------- ppcls/data/imaug/grid.py | 89 --------- ppcls/data/imaug/hide_and_seek.py | 44 ----- ppcls/data/imaug/operators.py | 244 ------------------------- ppcls/data/imaug/randaugment.py | 106 ----------- ppcls/data/imaug/random_erasing.py | 55 ------ 11 files changed, 2 insertions(+), 1273 deletions(-) delete mode 100644 ppcls/data/imaug/__init__.py delete mode 100644 ppcls/data/imaug/autoaugment.py delete mode 100644 ppcls/data/imaug/batch_operators.py delete mode 100644 ppcls/data/imaug/cutout.py delete mode 100644 ppcls/data/imaug/fmix.py delete mode 100644 ppcls/data/imaug/grid.py delete mode 100644 ppcls/data/imaug/hide_and_seek.py delete mode 100644 ppcls/data/imaug/operators.py delete mode 100644 ppcls/data/imaug/randaugment.py delete mode 100644 ppcls/data/imaug/random_erasing.py diff --git a/docs/zh_CN/faq_series/faq_2020_s1.md b/docs/zh_CN/faq_series/faq_2020_s1.md index 796c1fd2c..e0f3c98c9 100644 --- a/docs/zh_CN/faq_series/faq_2020_s1.md +++ b/docs/zh_CN/faq_series/faq_2020_s1.md @@ -128,8 +128,8 @@ ResNet系列模型中,相比于其他模型,ResNet_vd模型在预测速度 **A**: -* 对于单张图像的增广,可以参考[基于单张图片的数据增广脚本](../../../ppcls/data/imaug/operators.py),参考`ResizeImage`或者`CropImage`等数据算子的写法,创建一个新的类,然后在`__call__`中,实现对应的增广方法即可。 -* 对于一个batch图像的增广,可以参考[基于batch数据的数据增广脚本](../../../ppcls/data/imaug/batch_operators.py),参考`MixupOperator`或者`CutmixOperator`等数据算子的写法,创建一个新的类,然后在`__call__`中,实现对应的增广方法即可。 +* 对于单张图像的增广,可以参考[基于单张图片的数据增广脚本](../../../ppcls/data/preprocess/ops),参考`ResizeImage`或者`CropImage`等数据算子的写法,创建一个新的类,然后在`__call__`中,实现对应的增广方法即可。 +* 对于一个batch图像的增广,可以参考[基于batch数据的数据增广脚本](../../../ppcls/data/preprocess/batch_ops),参考`MixupOperator`或者`CutmixOperator`等数据算子的写法,创建一个新的类,然后在`__call__`中,实现对应的增广方法即可。 ## Q3.5: 怎么进一步加速模型训练过程呢? diff --git a/ppcls/data/imaug/__init__.py b/ppcls/data/imaug/__init__.py deleted file mode 100644 index 6860382bc..000000000 --- a/ppcls/data/imaug/__init__.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from .autoaugment import ImageNetPolicy as RawImageNetPolicy -from .randaugment import RandAugment as RawRandAugment -from .cutout import Cutout - -from .hide_and_seek import HideAndSeek -from .random_erasing import RandomErasing -from .grid import GridMask - -from .operators import DecodeImage -from .operators import ResizeImage -from .operators import CropImage -from .operators import RandCropImage -from .operators import RandFlipImage -from .operators import NormalizeImage -from .operators import ToCHWImage - -from .batch_operators import MixupOperator -from .batch_operators import CutmixOperator -from .batch_operators import FmixOperator - -import six -import numpy as np -from PIL import Image - - -def transform(data, ops=[]): - """ transform """ - for op in ops: - data = op(data) - return data - - -class AutoAugment(RawImageNetPolicy): - """ ImageNetPolicy wrapper to auto fit different img types """ - - def __init__(self, *args, **kwargs): - if six.PY2: - super(AutoAugment, self).__init__(*args, **kwargs) - else: - super().__init__(*args, **kwargs) - - def __call__(self, img): - if not isinstance(img, Image.Image): - img = np.ascontiguousarray(img) - img = Image.fromarray(img) - - if six.PY2: - img = super(AutoAugment, self).__call__(img) - else: - img = super().__call__(img) - - if isinstance(img, Image.Image): - img = np.asarray(img) - - return img - - -class RandAugment(RawRandAugment): - """ RandAugment wrapper to auto fit different img types """ - - def __init__(self, *args, **kwargs): - if six.PY2: - super(RandAugment, self).__init__(*args, **kwargs) - else: - super().__init__(*args, **kwargs) - - def __call__(self, img): - if not isinstance(img, Image.Image): - img = np.ascontiguousarray(img) - img = Image.fromarray(img) - - if six.PY2: - img = super(RandAugment, self).__call__(img) - else: - img = super().__call__(img) - - if isinstance(img, Image.Image): - img = np.asarray(img) - - return img diff --git a/ppcls/data/imaug/autoaugment.py b/ppcls/data/imaug/autoaugment.py deleted file mode 100644 index 6065697e2..000000000 --- a/ppcls/data/imaug/autoaugment.py +++ /dev/null @@ -1,264 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This code is based on https://github.com/DeepVoltaire/AutoAugment/blob/master/autoaugment.py - -from PIL import Image, ImageEnhance, ImageOps -import numpy as np -import random - - -class ImageNetPolicy(object): - """ Randomly choose one of the best 24 Sub-policies on ImageNet. - - Example: - >>> policy = ImageNetPolicy() - >>> transformed = policy(image) - - Example as a PyTorch Transform: - >>> transform=transforms.Compose([ - >>> transforms.Resize(256), - >>> ImageNetPolicy(), - >>> transforms.ToTensor()]) - """ - - def __init__(self, fillcolor=(128, 128, 128)): - self.policies = [ - SubPolicy(0.4, "posterize", 8, 0.6, "rotate", 9, fillcolor), - SubPolicy(0.6, "solarize", 5, 0.6, "autocontrast", 5, fillcolor), - SubPolicy(0.8, "equalize", 8, 0.6, "equalize", 3, fillcolor), - SubPolicy(0.6, "posterize", 7, 0.6, "posterize", 6, fillcolor), - SubPolicy(0.4, "equalize", 7, 0.2, "solarize", 4, fillcolor), - SubPolicy(0.4, "equalize", 4, 0.8, "rotate", 8, fillcolor), - SubPolicy(0.6, "solarize", 3, 0.6, "equalize", 7, fillcolor), - SubPolicy(0.8, "posterize", 5, 1.0, "equalize", 2, fillcolor), - SubPolicy(0.2, "rotate", 3, 0.6, "solarize", 8, fillcolor), - SubPolicy(0.6, "equalize", 8, 0.4, "posterize", 6, fillcolor), - SubPolicy(0.8, "rotate", 8, 0.4, "color", 0, fillcolor), - SubPolicy(0.4, "rotate", 9, 0.6, "equalize", 2, fillcolor), - SubPolicy(0.0, "equalize", 7, 0.8, "equalize", 8, fillcolor), - SubPolicy(0.6, "invert", 4, 1.0, "equalize", 8, fillcolor), - SubPolicy(0.6, "color", 4, 1.0, "contrast", 8, fillcolor), - SubPolicy(0.8, "rotate", 8, 1.0, "color", 2, fillcolor), - SubPolicy(0.8, "color", 8, 0.8, "solarize", 7, fillcolor), - SubPolicy(0.4, "sharpness", 7, 0.6, "invert", 8, fillcolor), - SubPolicy(0.6, "shearX", 5, 1.0, "equalize", 9, fillcolor), - SubPolicy(0.4, "color", 0, 0.6, "equalize", 3, fillcolor), - SubPolicy(0.4, "equalize", 7, 0.2, "solarize", 4, fillcolor), - SubPolicy(0.6, "solarize", 5, 0.6, "autocontrast", 5, fillcolor), - SubPolicy(0.6, "invert", 4, 1.0, "equalize", 8, fillcolor), - SubPolicy(0.6, "color", 4, 1.0, "contrast", 8, fillcolor), - SubPolicy(0.8, "equalize", 8, 0.6, "equalize", 3, fillcolor) - ] - - def __call__(self, img, policy_idx=None): - if policy_idx is None or not isinstance(policy_idx, int): - policy_idx = random.randint(0, len(self.policies) - 1) - else: - policy_idx = policy_idx % len(self.policies) - return self.policies[policy_idx](img) - - def __repr__(self): - return "AutoAugment ImageNet Policy" - - -class CIFAR10Policy(object): - """ Randomly choose one of the best 25 Sub-policies on CIFAR10. - - Example: - >>> policy = CIFAR10Policy() - >>> transformed = policy(image) - - Example as a PyTorch Transform: - >>> transform=transforms.Compose([ - >>> transforms.Resize(256), - >>> CIFAR10Policy(), - >>> transforms.ToTensor()]) - """ - - def __init__(self, fillcolor=(128, 128, 128)): - self.policies = [ - SubPolicy(0.1, "invert", 7, 0.2, "contrast", 6, fillcolor), - SubPolicy(0.7, "rotate", 2, 0.3, "translateX", 9, fillcolor), - SubPolicy(0.8, "sharpness", 1, 0.9, "sharpness", 3, fillcolor), - SubPolicy(0.5, "shearY", 8, 0.7, "translateY", 9, fillcolor), - SubPolicy(0.5, "autocontrast", 8, 0.9, "equalize", 2, fillcolor), - SubPolicy(0.2, "shearY", 7, 0.3, "posterize", 7, fillcolor), - SubPolicy(0.4, "color", 3, 0.6, "brightness", 7, fillcolor), - SubPolicy(0.3, "sharpness", 9, 0.7, "brightness", 9, fillcolor), - SubPolicy(0.6, "equalize", 5, 0.5, "equalize", 1, fillcolor), - SubPolicy(0.6, "contrast", 7, 0.6, "sharpness", 5, fillcolor), - SubPolicy(0.7, "color", 7, 0.5, "translateX", 8, fillcolor), - SubPolicy(0.3, "equalize", 7, 0.4, "autocontrast", 8, fillcolor), - SubPolicy(0.4, "translateY", 3, 0.2, "sharpness", 6, fillcolor), - SubPolicy(0.9, "brightness", 6, 0.2, "color", 8, fillcolor), - SubPolicy(0.5, "solarize", 2, 0.0, "invert", 3, fillcolor), - SubPolicy(0.2, "equalize", 0, 0.6, "autocontrast", 0, fillcolor), - SubPolicy(0.2, "equalize", 8, 0.8, "equalize", 4, fillcolor), - SubPolicy(0.9, "color", 9, 0.6, "equalize", 6, fillcolor), - SubPolicy(0.8, "autocontrast", 4, 0.2, "solarize", 8, fillcolor), - SubPolicy(0.1, "brightness", 3, 0.7, "color", 0, fillcolor), - SubPolicy(0.4, "solarize", 5, 0.9, "autocontrast", 3, fillcolor), - SubPolicy(0.9, "translateY", 9, 0.7, "translateY", 9, fillcolor), - SubPolicy(0.9, "autocontrast", 2, 0.8, "solarize", 3, fillcolor), - SubPolicy(0.8, "equalize", 8, 0.1, "invert", 3, fillcolor), - SubPolicy(0.7, "translateY", 9, 0.9, "autocontrast", 1, fillcolor) - ] - - def __call__(self, img, policy_idx=None): - if policy_idx is None or not isinstance(policy_idx, int): - policy_idx = random.randint(0, len(self.policies) - 1) - else: - policy_idx = policy_idx % len(self.policies) - return self.policies[policy_idx](img) - - def __repr__(self): - return "AutoAugment CIFAR10 Policy" - - -class SVHNPolicy(object): - """ Randomly choose one of the best 25 Sub-policies on SVHN. - - Example: - >>> policy = SVHNPolicy() - >>> transformed = policy(image) - - Example as a PyTorch Transform: - >>> transform=transforms.Compose([ - >>> transforms.Resize(256), - >>> SVHNPolicy(), - >>> transforms.ToTensor()]) - """ - - def __init__(self, fillcolor=(128, 128, 128)): - self.policies = [ - SubPolicy(0.9, "shearX", 4, 0.2, "invert", 3, fillcolor), - SubPolicy(0.9, "shearY", 8, 0.7, "invert", 5, fillcolor), - SubPolicy(0.6, "equalize", 5, 0.6, "solarize", 6, fillcolor), - SubPolicy(0.9, "invert", 3, 0.6, "equalize", 3, fillcolor), - SubPolicy(0.6, "equalize", 1, 0.9, "rotate", 3, fillcolor), - SubPolicy(0.9, "shearX", 4, 0.8, "autocontrast", 3, fillcolor), - SubPolicy(0.9, "shearY", 8, 0.4, "invert", 5, fillcolor), - SubPolicy(0.9, "shearY", 5, 0.2, "solarize", 6, fillcolor), - SubPolicy(0.9, "invert", 6, 0.8, "autocontrast", 1, fillcolor), - SubPolicy(0.6, "equalize", 3, 0.9, "rotate", 3, fillcolor), - SubPolicy(0.9, "shearX", 4, 0.3, "solarize", 3, fillcolor), - SubPolicy(0.8, "shearY", 8, 0.7, "invert", 4, fillcolor), - SubPolicy(0.9, "equalize", 5, 0.6, "translateY", 6, fillcolor), - SubPolicy(0.9, "invert", 4, 0.6, "equalize", 7, fillcolor), - SubPolicy(0.3, "contrast", 3, 0.8, "rotate", 4, fillcolor), - SubPolicy(0.8, "invert", 5, 0.0, "translateY", 2, fillcolor), - SubPolicy(0.7, "shearY", 6, 0.4, "solarize", 8, fillcolor), - SubPolicy(0.6, "invert", 4, 0.8, "rotate", 4, fillcolor), - SubPolicy( - 0.3, "shearY", 7, 0.9, "translateX", 3, fillcolor), SubPolicy( - 0.1, "shearX", 6, 0.6, "invert", 5, fillcolor), SubPolicy( - 0.7, "solarize", 2, 0.6, "translateY", 7, - fillcolor), SubPolicy(0.8, "shearY", 4, 0.8, "invert", - 8, fillcolor), SubPolicy( - 0.7, "shearX", 9, 0.8, - "translateY", 3, - fillcolor), SubPolicy( - 0.8, "shearY", 5, 0.7, - "autocontrast", 3, - fillcolor), - SubPolicy(0.7, "shearX", 2, 0.1, "invert", 5, fillcolor) - ] - - def __call__(self, img, policy_idx=None): - if policy_idx is None or not isinstance(policy_idx, int): - policy_idx = random.randint(0, len(self.policies) - 1) - else: - policy_idx = policy_idx % len(self.policies) - return self.policies[policy_idx](img) - - def __repr__(self): - return "AutoAugment SVHN Policy" - - -class SubPolicy(object): - def __init__(self, - p1, - operation1, - magnitude_idx1, - p2, - operation2, - magnitude_idx2, - fillcolor=(128, 128, 128)): - ranges = { - "shearX": np.linspace(0, 0.3, 10), - "shearY": np.linspace(0, 0.3, 10), - "translateX": np.linspace(0, 150 / 331, 10), - "translateY": np.linspace(0, 150 / 331, 10), - "rotate": np.linspace(0, 30, 10), - "color": np.linspace(0.0, 0.9, 10), - "posterize": np.round(np.linspace(8, 4, 10), 0).astype(np.int), - "solarize": np.linspace(256, 0, 10), - "contrast": np.linspace(0.0, 0.9, 10), - "sharpness": np.linspace(0.0, 0.9, 10), - "brightness": np.linspace(0.0, 0.9, 10), - "autocontrast": [0] * 10, - "equalize": [0] * 10, - "invert": [0] * 10 - } - - # from https://stackoverflow.com/questions/5252170/specify-image-filling-color-when-rotating-in-python-with-pil-and-setting-expand - def rotate_with_fill(img, magnitude): - rot = img.convert("RGBA").rotate(magnitude) - return Image.composite(rot, - Image.new("RGBA", rot.size, (128, ) * 4), - rot).convert(img.mode) - - func = { - "shearX": lambda img, magnitude: img.transform( - img.size, Image.AFFINE, (1, magnitude * random.choice([-1, 1]), 0, 0, 1, 0), - Image.BICUBIC, fillcolor=fillcolor), - "shearY": lambda img, magnitude: img.transform( - img.size, Image.AFFINE, (1, 0, 0, magnitude * random.choice([-1, 1]), 1, 0), - Image.BICUBIC, fillcolor=fillcolor), - "translateX": lambda img, magnitude: img.transform( - img.size, Image.AFFINE, (1, 0, magnitude * img.size[0] * random.choice([-1, 1]), 0, 1, 0), - fillcolor=fillcolor), - "translateY": lambda img, magnitude: img.transform( - img.size, Image.AFFINE, (1, 0, 0, 0, 1, magnitude * img.size[1] * random.choice([-1, 1])), - fillcolor=fillcolor), - "rotate": lambda img, magnitude: rotate_with_fill(img, magnitude), - # "rotate": lambda img, magnitude: img.rotate(magnitude * random.choice([-1, 1])), - "color": lambda img, magnitude: ImageEnhance.Color(img).enhance(1 + magnitude * random.choice([-1, 1])), - "posterize": lambda img, magnitude: ImageOps.posterize(img, magnitude), - "solarize": lambda img, magnitude: ImageOps.solarize(img, magnitude), - "contrast": lambda img, magnitude: ImageEnhance.Contrast(img).enhance( - 1 + magnitude * random.choice([-1, 1])), - "sharpness": lambda img, magnitude: ImageEnhance.Sharpness(img).enhance( - 1 + magnitude * random.choice([-1, 1])), - "brightness": lambda img, magnitude: ImageEnhance.Brightness(img).enhance( - 1 + magnitude * random.choice([-1, 1])), - "autocontrast": lambda img, magnitude: ImageOps.autocontrast(img), - "equalize": lambda img, magnitude: ImageOps.equalize(img), - "invert": lambda img, magnitude: ImageOps.invert(img) - } - - self.p1 = p1 - self.operation1 = func[operation1] - self.magnitude1 = ranges[operation1][magnitude_idx1] - self.p2 = p2 - self.operation2 = func[operation2] - self.magnitude2 = ranges[operation2][magnitude_idx2] - - def __call__(self, img): - if random.random() < self.p1: - img = self.operation1(img, self.magnitude1) - if random.random() < self.p2: - img = self.operation2(img, self.magnitude2) - return img diff --git a/ppcls/data/imaug/batch_operators.py b/ppcls/data/imaug/batch_operators.py deleted file mode 100644 index e12b7b4d2..000000000 --- a/ppcls/data/imaug/batch_operators.py +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - -import numpy as np - -from .fmix import sample_mask - - -class BatchOperator(object): - """ BatchOperator """ - - def __init__(self, *args, **kwargs): - pass - - def _unpack(self, batch): - """ _unpack """ - assert isinstance(batch, list), \ - 'batch should be a list filled with tuples (img, label)' - bs = len(batch) - assert bs > 0, 'size of the batch data should > 0' - imgs, labels = list(zip(*batch)) - return np.array(imgs), np.array(labels), bs - - def __call__(self, batch): - return batch - - -class MixupOperator(BatchOperator): - """ Mixup operator """ - - def __init__(self, alpha=0.2): - assert alpha > 0., \ - 'parameter alpha[%f] should > 0.0' % (alpha) - self._alpha = alpha - - def __call__(self, batch): - imgs, labels, bs = self._unpack(batch) - idx = np.random.permutation(bs) - lam = np.random.beta(self._alpha, self._alpha) - lams = np.array([lam] * bs, dtype=np.float32) - imgs = lam * imgs + (1 - lam) * imgs[idx] - return list(zip(imgs, labels, labels[idx], lams)) - - -class CutmixOperator(BatchOperator): - """ Cutmix operator """ - - def __init__(self, alpha=0.2): - assert alpha > 0., \ - 'parameter alpha[%f] should > 0.0' % (alpha) - self._alpha = alpha - - def _rand_bbox(self, size, lam): - """ _rand_bbox """ - w = size[2] - h = size[3] - cut_rat = np.sqrt(1. - lam) - cut_w = np.int(w * cut_rat) - cut_h = np.int(h * cut_rat) - - # uniform - cx = np.random.randint(w) - cy = np.random.randint(h) - - bbx1 = np.clip(cx - cut_w // 2, 0, w) - bby1 = np.clip(cy - cut_h // 2, 0, h) - bbx2 = np.clip(cx + cut_w // 2, 0, w) - bby2 = np.clip(cy + cut_h // 2, 0, h) - - return bbx1, bby1, bbx2, bby2 - - def __call__(self, batch): - imgs, labels, bs = self._unpack(batch) - idx = np.random.permutation(bs) - lam = np.random.beta(self._alpha, self._alpha) - - bbx1, bby1, bbx2, bby2 = self._rand_bbox(imgs.shape, lam) - imgs[:, :, bbx1:bbx2, bby1:bby2] = imgs[idx, :, bbx1:bbx2, bby1:bby2] - lam = 1 - (float(bbx2 - bbx1) * (bby2 - bby1) / - (imgs.shape[-2] * imgs.shape[-1])) - lams = np.array([lam] * bs, dtype=np.float32) - return list(zip(imgs, labels, labels[idx], lams)) - - -class FmixOperator(BatchOperator): - """ Fmix operator """ - - def __init__(self, alpha=1, decay_power=3, max_soft=0., reformulate=False): - self._alpha = alpha - self._decay_power = decay_power - self._max_soft = max_soft - self._reformulate = reformulate - - def __call__(self, batch): - imgs, labels, bs = self._unpack(batch) - idx = np.random.permutation(bs) - size = (imgs.shape[2], imgs.shape[3]) - lam, mask = sample_mask(self._alpha, self._decay_power, \ - size, self._max_soft, self._reformulate) - imgs = mask * imgs + (1 - mask) * imgs[idx] - return list(zip(imgs, labels, labels[idx], [lam] * bs)) diff --git a/ppcls/data/imaug/cutout.py b/ppcls/data/imaug/cutout.py deleted file mode 100644 index 43d557f86..000000000 --- a/ppcls/data/imaug/cutout.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This code is based on https://github.com/uoguelph-mlrg/Cutout - -import numpy as np -import random - - -class Cutout(object): - def __init__(self, n_holes=1, length=112): - self.n_holes = n_holes - self.length = length - - def __call__(self, img): - """ cutout_image """ - h, w = img.shape[:2] - mask = np.ones((h, w), np.float32) - - for n in range(self.n_holes): - y = np.random.randint(h) - x = np.random.randint(w) - - y1 = np.clip(y - self.length // 2, 0, h) - y2 = np.clip(y + self.length // 2, 0, h) - x1 = np.clip(x - self.length // 2, 0, w) - x2 = np.clip(x + self.length // 2, 0, w) - - img[y1:y2, x1:x2] = 0 - return img diff --git a/ppcls/data/imaug/fmix.py b/ppcls/data/imaug/fmix.py deleted file mode 100644 index fb9382115..000000000 --- a/ppcls/data/imaug/fmix.py +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import math -import random - -import numpy as np -from scipy.stats import beta - - -def fftfreqnd(h, w=None, z=None): - """ Get bin values for discrete fourier transform of size (h, w, z) - - :param h: Required, first dimension size - :param w: Optional, second dimension size - :param z: Optional, third dimension size - """ - fz = fx = 0 - fy = np.fft.fftfreq(h) - - if w is not None: - fy = np.expand_dims(fy, -1) - - if w % 2 == 1: - fx = np.fft.fftfreq(w)[:w // 2 + 2] - else: - fx = np.fft.fftfreq(w)[:w // 2 + 1] - - if z is not None: - fy = np.expand_dims(fy, -1) - if z % 2 == 1: - fz = np.fft.fftfreq(z)[:, None] - else: - fz = np.fft.fftfreq(z)[:, None] - - return np.sqrt(fx * fx + fy * fy + fz * fz) - - -def get_spectrum(freqs, decay_power, ch, h, w=0, z=0): - """ Samples a fourier image with given size and frequencies decayed by decay power - - :param freqs: Bin values for the discrete fourier transform - :param decay_power: Decay power for frequency decay prop 1/f**d - :param ch: Number of channels for the resulting mask - :param h: Required, first dimension size - :param w: Optional, second dimension size - :param z: Optional, third dimension size - """ - scale = np.ones(1) / (np.maximum(freqs, np.array([1. / max(w, h, z)])) - **decay_power) - - param_size = [ch] + list(freqs.shape) + [2] - param = np.random.randn(*param_size) - - scale = np.expand_dims(scale, -1)[None, :] - - return scale * param - - -def make_low_freq_image(decay, shape, ch=1): - """ Sample a low frequency image from fourier space - - :param decay_power: Decay power for frequency decay prop 1/f**d - :param shape: Shape of desired mask, list up to 3 dims - :param ch: Number of channels for desired mask - """ - freqs = fftfreqnd(*shape) - spectrum = get_spectrum(freqs, decay, ch, - *shape) #.reshape((1, *shape[:-1], -1)) - spectrum = spectrum[:, 0] + 1j * spectrum[:, 1] - mask = np.real(np.fft.irfftn(spectrum, shape)) - - if len(shape) == 1: - mask = mask[:1, :shape[0]] - if len(shape) == 2: - mask = mask[:1, :shape[0], :shape[1]] - if len(shape) == 3: - mask = mask[:1, :shape[0], :shape[1], :shape[2]] - - mask = mask - mask = (mask - mask.min()) - mask = mask / mask.max() - return mask - - -def sample_lam(alpha, reformulate=False): - """ Sample a lambda from symmetric beta distribution with given alpha - - :param alpha: Alpha value for beta distribution - :param reformulate: If True, uses the reformulation of [1]. - """ - if reformulate: - lam = beta.rvs(alpha + 1, alpha) - else: - lam = beta.rvs(alpha, alpha) - - return lam - - -def binarise_mask(mask, lam, in_shape, max_soft=0.0): - """ Binarises a given low frequency image such that it has mean lambda. - - :param mask: Low frequency image, usually the result of `make_low_freq_image` - :param lam: Mean value of final mask - :param in_shape: Shape of inputs - :param max_soft: Softening value between 0 and 0.5 which smooths hard edges in the mask. - :return: - """ - idx = mask.reshape(-1).argsort()[::-1] - mask = mask.reshape(-1) - num = math.ceil(lam * mask.size) if random.random() > 0.5 else math.floor( - lam * mask.size) - - eff_soft = max_soft - if max_soft > lam or max_soft > (1 - lam): - eff_soft = min(lam, 1 - lam) - - soft = int(mask.size * eff_soft) - num_low = int(num - soft) - num_high = int(num + soft) - - mask[idx[:num_high]] = 1 - mask[idx[num_low:]] = 0 - mask[idx[num_low:num_high]] = np.linspace(1, 0, (num_high - num_low)) - - mask = mask.reshape((1, 1, in_shape[0], in_shape[1])) - return mask - - -def sample_mask(alpha, decay_power, shape, max_soft=0.0, reformulate=False): - """ Samples a mean lambda from beta distribution parametrised by alpha, creates a low frequency image and binarises - it based on this lambda - - :param alpha: Alpha value for beta distribution from which to sample mean of mask - :param decay_power: Decay power for frequency decay prop 1/f**d - :param shape: Shape of desired mask, list up to 3 dims - :param max_soft: Softening value between 0 and 0.5 which smooths hard edges in the mask. - :param reformulate: If True, uses the reformulation of [1]. - """ - if isinstance(shape, int): - shape = (shape, ) - - # Choose lambda - lam = sample_lam(alpha, reformulate) - - # Make mask, get mean / std - mask = make_low_freq_image(decay_power, shape) - mask = binarise_mask(mask, lam, shape, max_soft) - - return float(lam), mask - - -def sample_and_apply(x, - alpha, - decay_power, - shape, - max_soft=0.0, - reformulate=False): - """ - - :param x: Image batch on which to apply fmix of shape [b, c, shape*] - :param alpha: Alpha value for beta distribution from which to sample mean of mask - :param decay_power: Decay power for frequency decay prop 1/f**d - :param shape: Shape of desired mask, list up to 3 dims - :param max_soft: Softening value between 0 and 0.5 which smooths hard edges in the mask. - :param reformulate: If True, uses the reformulation of [1]. - :return: mixed input, permutation indices, lambda value of mix, - """ - lam, mask = sample_mask(alpha, decay_power, shape, max_soft, reformulate) - index = np.random.permutation(x.shape[0]) - - x1, x2 = x * mask, x[index] * (1 - mask) - return x1 + x2, index, lam - - -class FMixBase: - """ FMix augmentation - - Args: - decay_power (float): Decay power for frequency decay prop 1/f**d - alpha (float): Alpha value for beta distribution from which to sample mean of mask - size ([int] | [int, int] | [int, int, int]): Shape of desired mask, list up to 3 dims - max_soft (float): Softening value between 0 and 0.5 which smooths hard edges in the mask. - reformulate (bool): If True, uses the reformulation of [1]. - """ - - def __init__(self, - decay_power=3, - alpha=1, - size=(32, 32), - max_soft=0.0, - reformulate=False): - super().__init__() - self.decay_power = decay_power - self.reformulate = reformulate - self.size = size - self.alpha = alpha - self.max_soft = max_soft - self.index = None - self.lam = None - - def __call__(self, x): - raise NotImplementedError - - def loss(self, *args, **kwargs): - raise NotImplementedError diff --git a/ppcls/data/imaug/grid.py b/ppcls/data/imaug/grid.py deleted file mode 100644 index 93e0c58ac..000000000 --- a/ppcls/data/imaug/grid.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This code is based on https://github.com/akuxcw/GridMask - -import numpy as np -from PIL import Image -import pdb - -# curr -CURR_EPOCH = 0 -# epoch for the prob to be the upper limit -NUM_EPOCHS = 240 - - -class GridMask(object): - def __init__(self, d1=96, d2=224, rotate=1, ratio=0.5, mode=0, prob=1.): - self.d1 = d1 - self.d2 = d2 - self.rotate = rotate - self.ratio = ratio - self.mode = mode - self.st_prob = prob - self.prob = prob - self.last_prob = -1 - - def set_prob(self): - global CURR_EPOCH - global NUM_EPOCHS - self.prob = self.st_prob * min(1, 1.0 * CURR_EPOCH / NUM_EPOCHS) - - def __call__(self, img): - self.set_prob() - if abs(self.last_prob - self.prob) > 1e-10: - global CURR_EPOCH - global NUM_EPOCHS - print( - "self.prob is updated, self.prob={}, CURR_EPOCH: {}, NUM_EPOCHS: {}". - format(self.prob, CURR_EPOCH, NUM_EPOCHS)) - self.last_prob = self.prob - # print("CURR_EPOCH: {}, NUM_EPOCHS: {}, self.prob is set as: {}".format(CURR_EPOCH, NUM_EPOCHS, self.prob) ) - if np.random.rand() > self.prob: - return img - _, h, w = img.shape - hh = int(1.5 * h) - ww = int(1.5 * w) - d = np.random.randint(self.d1, self.d2) - #d = self.d - self.l = int(d * self.ratio + 0.5) - mask = np.ones((hh, ww), np.float32) - st_h = np.random.randint(d) - st_w = np.random.randint(d) - for i in range(-1, hh // d + 1): - s = d * i + st_h - t = s + self.l - s = max(min(s, hh), 0) - t = max(min(t, hh), 0) - mask[s:t, :] *= 0 - for i in range(-1, ww // d + 1): - s = d * i + st_w - t = s + self.l - s = max(min(s, ww), 0) - t = max(min(t, ww), 0) - mask[:, s:t] *= 0 - r = np.random.randint(self.rotate) - mask = Image.fromarray(np.uint8(mask)) - mask = mask.rotate(r) - mask = np.asarray(mask) - mask = mask[(hh - h) // 2:(hh - h) // 2 + h, (ww - w) // 2:(ww - w) // - 2 + w] - - if self.mode == 1: - mask = 1 - mask - - mask = np.expand_dims(mask, axis=0) - img = (img * mask).astype(img.dtype) - - return img diff --git a/ppcls/data/imaug/hide_and_seek.py b/ppcls/data/imaug/hide_and_seek.py deleted file mode 100644 index 5d4a8f97d..000000000 --- a/ppcls/data/imaug/hide_and_seek.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This code is based on https://github.com/kkanshul/Hide-and-Seek - -import numpy as np -import random - - -class HideAndSeek(object): - def __init__(self): - # possible grid size, 0 means no hiding - self.grid_sizes = [0, 16, 32, 44, 56] - # hiding probability - self.hide_prob = 0.5 - - def __call__(self, img): - # randomly choose one grid size - grid_size = np.random.choice(self.grid_sizes) - - _, h, w = img.shape - - # hide the patches - if grid_size == 0: - return img - for x in range(0, w, grid_size): - for y in range(0, h, grid_size): - x_end = min(w, x + grid_size) - y_end = min(h, y + grid_size) - if (random.random() <= self.hide_prob): - img[:, x:x_end, y:y_end] = 0 - - return img diff --git a/ppcls/data/imaug/operators.py b/ppcls/data/imaug/operators.py deleted file mode 100644 index f4e2a27a2..000000000 --- a/ppcls/data/imaug/operators.py +++ /dev/null @@ -1,244 +0,0 @@ -""" -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - -import six -import math -import random -import cv2 -import numpy as np - -from .autoaugment import ImageNetPolicy - - -class OperatorParamError(ValueError): - """ OperatorParamError - """ - pass - - -class DecodeImage(object): - """ decode image """ - - def __init__(self, to_rgb=True, to_np=False, channel_first=False): - self.to_rgb = to_rgb - self.to_np = to_np # to numpy - self.channel_first = channel_first # only enabled when to_np is True - - def __call__(self, img): - if six.PY2: - assert type(img) is str and len( - img) > 0, "invalid input 'img' in DecodeImage" - else: - assert type(img) is bytes and len( - img) > 0, "invalid input 'img' in DecodeImage" - data = np.frombuffer(img, dtype='uint8') - img = cv2.imdecode(data, 1) - if self.to_rgb: - assert img.shape[2] == 3, 'invalid shape of image[%s]' % ( - img.shape) - img = img[:, :, ::-1] - - if self.channel_first: - img = img.transpose((2, 0, 1)) - - return img - - -class ResizeImage(object): - """ resize image """ - - def __init__(self, size=None, resize_short=None, interpolation=-1): - self.interpolation = interpolation if interpolation >= 0 else None - if resize_short is not None and resize_short > 0: - self.resize_short = resize_short - self.w = None - self.h = None - elif size is not None: - self.resize_short = None - self.w = size if type(size) is int else size[0] - self.h = size if type(size) is int else size[1] - else: - raise OperatorParamError("invalid params for ReisizeImage for '\ - 'both 'size' and 'resize_short' are None") - - def __call__(self, img): - img_h, img_w = img.shape[:2] - if self.resize_short is not None: - percent = float(self.resize_short) / min(img_w, img_h) - w = int(round(img_w * percent)) - h = int(round(img_h * percent)) - else: - w = self.w - h = self.h - if self.interpolation is None: - return cv2.resize(img, (w, h)) - else: - return cv2.resize(img, (w, h), interpolation=self.interpolation) - - -class CropImage(object): - """ crop image """ - - def __init__(self, size): - if type(size) is int: - self.size = (size, size) - else: - self.size = size # (h, w) - - def __call__(self, img): - w, h = self.size - img_h, img_w = img.shape[:2] - w_start = (img_w - w) // 2 - h_start = (img_h - h) // 2 - - w_end = w_start + w - h_end = h_start + h - return img[h_start:h_end, w_start:w_end, :] - - -class RandCropImage(object): - """ random crop image """ - - def __init__(self, size, scale=None, ratio=None, interpolation=-1): - - self.interpolation = interpolation if interpolation >= 0 else None - if type(size) is int: - self.size = (size, size) # (h, w) - else: - self.size = size - - self.scale = [0.08, 1.0] if scale is None else scale - self.ratio = [3. / 4., 4. / 3.] if ratio is None else ratio - - def __call__(self, img): - size = self.size - scale = self.scale - ratio = self.ratio - - aspect_ratio = math.sqrt(random.uniform(*ratio)) - w = 1. * aspect_ratio - h = 1. / aspect_ratio - - img_h, img_w = img.shape[:2] - - bound = min((float(img_w) / img_h) / (w**2), - (float(img_h) / img_w) / (h**2)) - scale_max = min(scale[1], bound) - scale_min = min(scale[0], bound) - - target_area = img_w * img_h * random.uniform(scale_min, scale_max) - target_size = math.sqrt(target_area) - w = int(target_size * w) - h = int(target_size * h) - - i = random.randint(0, img_w - w) - j = random.randint(0, img_h - h) - - img = img[j:j + h, i:i + w, :] - if self.interpolation is None: - return cv2.resize(img, size) - else: - return cv2.resize(img, size, interpolation=self.interpolation) - - -class RandFlipImage(object): - """ random flip image - flip_code: - 1: Flipped Horizontally - 0: Flipped Vertically - -1: Flipped Horizontally & Vertically - """ - - def __init__(self, flip_code=1): - assert flip_code in [-1, 0, 1 - ], "flip_code should be a value in [-1, 0, 1]" - self.flip_code = flip_code - - def __call__(self, img): - if random.randint(0, 1) == 1: - return cv2.flip(img, self.flip_code) - else: - return img - - -class AutoAugment(object): - def __init__(self): - self.policy = ImageNetPolicy() - - def __call__(self, img): - from PIL import Image - img = np.ascontiguousarray(img) - img = Image.fromarray(img) - img = self.policy(img) - img = np.asarray(img) - - -class NormalizeImage(object): - """ normalize image such as substract mean, divide std - """ - - def __init__(self, scale=None, mean=None, std=None, order='chw', output_fp16=False, channel_num=3): - if isinstance(scale, str): - scale = eval(scale) - assert channel_num in [3, 4], "channel number of input image should be set to 3 or 4." - self.channel_num = channel_num - self.output_dtype = 'float16' if output_fp16 else 'float32' - self.scale = np.float32(scale if scale is not None else 1.0 / 255.0) - self.order = order - mean = mean if mean is not None else [0.485, 0.456, 0.406] - std = std if std is not None else [0.229, 0.224, 0.225] - - shape = (3, 1, 1) if self.order == 'chw' else (1, 1, 3) - self.mean = np.array(mean).reshape(shape).astype('float32') - self.std = np.array(std).reshape(shape).astype('float32') - - def __call__(self, img): - from PIL import Image - if isinstance(img, Image.Image): - img = np.array(img) - - assert isinstance(img, - np.ndarray), "invalid input 'img' in NormalizeImage" - - img = (img.astype('float32') * self.scale - self.mean) / self.std - - if self.channel_num == 4: - img_h = img.shape[1] if self.order == 'chw' else img.shape[0] - img_w = img.shape[2] if self.order == 'chw' else img.shape[1] - pad_zeros = np.zeros((1, img_h, img_w)) if self.order == 'chw' else np.zeros((img_h, img_w, 1)) - img = (np.concatenate((img, pad_zeros), axis=0) if self.order == 'chw' - else np.concatenate((img, pad_zeros), axis=2)) - return img.astype(self.output_dtype) - - -class ToCHWImage(object): - """ convert hwc image to chw image - """ - - def __init__(self): - pass - - def __call__(self, img): - from PIL import Image - if isinstance(img, Image.Image): - img = np.array(img) - - return img.transpose((2, 0, 1)) diff --git a/ppcls/data/imaug/randaugment.py b/ppcls/data/imaug/randaugment.py deleted file mode 100644 index cb3e9695c..000000000 --- a/ppcls/data/imaug/randaugment.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This code is based on https://github.com/heartInsert/randaugment - -from PIL import Image, ImageEnhance, ImageOps -import numpy as np -import random - - -class RandAugment(object): - def __init__(self, num_layers=2, magnitude=5, fillcolor=(128, 128, 128)): - self.num_layers = num_layers - self.magnitude = magnitude - self.max_level = 10 - - abso_level = self.magnitude / self.max_level - self.level_map = { - "shearX": 0.3 * abso_level, - "shearY": 0.3 * abso_level, - "translateX": 150.0 / 331 * abso_level, - "translateY": 150.0 / 331 * abso_level, - "rotate": 30 * abso_level, - "color": 0.9 * abso_level, - "posterize": int(4.0 * abso_level), - "solarize": 256.0 * abso_level, - "contrast": 0.9 * abso_level, - "sharpness": 0.9 * abso_level, - "brightness": 0.9 * abso_level, - "autocontrast": 0, - "equalize": 0, - "invert": 0 - } - - # from https://stackoverflow.com/questions/5252170/ - # specify-image-filling-color-when-rotating-in-python-with-pil-and-setting-expand - def rotate_with_fill(img, magnitude): - rot = img.convert("RGBA").rotate(magnitude) - return Image.composite(rot, - Image.new("RGBA", rot.size, (128, ) * 4), - rot).convert(img.mode) - - rnd_ch_op = random.choice - - self.func = { - "shearX": lambda img, magnitude: img.transform( - img.size, - Image.AFFINE, - (1, magnitude * rnd_ch_op([-1, 1]), 0, 0, 1, 0), - Image.BICUBIC, - fillcolor=fillcolor), - "shearY": lambda img, magnitude: img.transform( - img.size, - Image.AFFINE, - (1, 0, 0, magnitude * rnd_ch_op([-1, 1]), 1, 0), - Image.BICUBIC, - fillcolor=fillcolor), - "translateX": lambda img, magnitude: img.transform( - img.size, - Image.AFFINE, - (1, 0, magnitude * img.size[0] * rnd_ch_op([-1, 1]), 0, 1, 0), - fillcolor=fillcolor), - "translateY": lambda img, magnitude: img.transform( - img.size, - Image.AFFINE, - (1, 0, 0, 0, 1, magnitude * img.size[1] * rnd_ch_op([-1, 1])), - fillcolor=fillcolor), - "rotate": lambda img, magnitude: rotate_with_fill(img, magnitude), - "color": lambda img, magnitude: ImageEnhance.Color(img).enhance( - 1 + magnitude * rnd_ch_op([-1, 1])), - "posterize": lambda img, magnitude: - ImageOps.posterize(img, magnitude), - "solarize": lambda img, magnitude: - ImageOps.solarize(img, magnitude), - "contrast": lambda img, magnitude: - ImageEnhance.Contrast(img).enhance( - 1 + magnitude * rnd_ch_op([-1, 1])), - "sharpness": lambda img, magnitude: - ImageEnhance.Sharpness(img).enhance( - 1 + magnitude * rnd_ch_op([-1, 1])), - "brightness": lambda img, magnitude: - ImageEnhance.Brightness(img).enhance( - 1 + magnitude * rnd_ch_op([-1, 1])), - "autocontrast": lambda img, magnitude: - ImageOps.autocontrast(img), - "equalize": lambda img, magnitude: ImageOps.equalize(img), - "invert": lambda img, magnitude: ImageOps.invert(img) - } - - def __call__(self, img): - avaiable_op_names = list(self.level_map.keys()) - for layer_num in range(self.num_layers): - op_name = np.random.choice(avaiable_op_names) - img = self.func[op_name](img, self.level_map[op_name]) - return img diff --git a/ppcls/data/imaug/random_erasing.py b/ppcls/data/imaug/random_erasing.py deleted file mode 100644 index 76e4abf39..000000000 --- a/ppcls/data/imaug/random_erasing.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#This code is based on https://github.com/zhunzhong07/Random-Erasing - -import math -import random - -import numpy as np - - -class RandomErasing(object): - def __init__(self, EPSILON=0.5, sl=0.02, sh=0.4, r1=0.3, - mean=[0., 0., 0.]): - self.EPSILON = EPSILON - self.mean = mean - self.sl = sl - self.sh = sh - self.r1 = r1 - - def __call__(self, img): - if random.uniform(0, 1) > self.EPSILON: - return img - - for attempt in range(100): - area = img.shape[1] * img.shape[2] - - target_area = random.uniform(self.sl, self.sh) * area - aspect_ratio = random.uniform(self.r1, 1 / self.r1) - - h = int(round(math.sqrt(target_area * aspect_ratio))) - w = int(round(math.sqrt(target_area / aspect_ratio))) - - if w < img.shape[2] and h < img.shape[1]: - x1 = random.randint(0, img.shape[1] - h) - y1 = random.randint(0, img.shape[2] - w) - if img.shape[0] == 3: - img[0, x1:x1 + h, y1:y1 + w] = self.mean[0] - img[1, x1:x1 + h, y1:y1 + w] = self.mean[1] - img[2, x1:x1 + h, y1:y1 + w] = self.mean[2] - else: - img[0, x1:x1 + h, y1:y1 + w] = self.mean[1] - return img - return img From 8cc5d33823d2464f849cd7f795f8be171e805125 Mon Sep 17 00:00:00 2001 From: weishengyu Date: Sat, 12 Jun 2021 12:49:59 +0800 Subject: [PATCH 2/3] split readme and update --- README_cn.md | 442 ++----------------------------- docs/zh_CN/ImageNet_models_cn.md | 388 +++++++++++++++++++++++++++ 2 files changed, 410 insertions(+), 420 deletions(-) create mode 100644 docs/zh_CN/ImageNet_models_cn.md diff --git a/README_cn.md b/README_cn.md index e3291c263..42d76cc74 100644 --- a/README_cn.md +++ b/README_cn.md @@ -8,33 +8,23 @@ **近期更新** -- 2021.05.14 添加`SwinTransformer` 系列模型,在ImageNet-1k上,Top1 Acc可达87.19% -- 2021.04.15 添加`MixNet`和`ReXNet`系列模型,在ImageNet-1k上`MixNet_L`模型Top1 Acc可达78.6%,`ReXNet_3_0`模型可达82.09% -- 2021.03.02 添加分类模型量化方法与使用教程。 -- 2021.02.01 添加`RepVGG`系列模型,在ImageNet-1k上Top-1 Acc可达79.65%。 -- 2021.01.27 添加`ViT`与`DeiT`模型,在ImageNet-1k上,`ViT`模型Top-1 Acc可达85.13%,`DeiT`模型可达85.1%。 -- 2021.01.08 添加whl包及其使用说明,直接安装paddleclas whl包,即可快速完成模型预测。 -- 2020.12.16 添加对cpp预测的tensorRT支持,预测加速更明显。 +- 2021.06.16 PaddleClas v2.2版本升级,集成Metric learning,向量检索等组件,新增4个图像识别应用。 - [more](./docs/zh_CN/update_history.md) ## 特性 -- 丰富的模型库:基于ImageNet1k分类数据集,PaddleClas提供了29个系列的分类网络结构和训练配置,134个预训练模型和性能评估。 +- 完整的图像识别解决方案:集成了检测、特征学习、检索等模块,广泛适用于各类图像识别任务。 +提供商品识别、车辆识别、logo识别和动漫人物识别等4个示例解决方案。 + +- 丰富的预训练模型库:提供了29个系列共134个ImageNet预训练模型,其中6个精选系列模型支持结构快速修改。 + +- 全面易用的特征学习组件:集成大量度量学习方法,通过配置文件即可随意组合切换。 - SSLD知识蒸馏:基于该方案蒸馏模型的识别准确率普遍提升3%以上。 - 数据增广:支持AutoAugment、Cutout、Cutmix等8种数据增广算法详细介绍、代码复现和在统一实验环境下的效果评估。 -- 10万类图像分类预训练模型:百度自研并开源了基于10万类数据集训练的 `ResNet50_vd `模型,在一些实际场景中,使用该预训练模型的识别准确率最多可以提升30%。 - -- 多种训练方案,包括多机训练、混合精度训练等。 - -- 多种预测推理、部署方案,包括TensorRT预测、Paddle-Lite预测、模型服务化部署、模型量化、Paddle Hub等。 - -- 可运行于Linux、Windows、MacOS等多种系统。 - - ## 欢迎加入技术交流群 * 微信扫描下面左方二维码添加飞桨小姐姐的微信,添加成功后私信小姐姐暗号【分类】,即可收到微信群进群邀请。 @@ -53,31 +43,19 @@ ## 文档教程 - [快速安装](./docs/zh_CN/tutorials/install.md) -- [30分钟玩转PaddleClas(尝鲜版)](./docs/zh_CN/tutorials/quick_start_new_user.md) -- [30分钟玩转PaddleClas(进阶版)](./docs/zh_CN/tutorials/quick_start_professional.md) -- [模型库介绍和预训练模型](./docs/zh_CN/models/models_intro.md) - - [模型库概览图](#模型库概览图) - - [SSLD知识蒸馏系列](#SSLD知识蒸馏系列) - - [ResNet及其Vd系列](#ResNet及其Vd系列) - - [移动端系列](#移动端系列) - - [SEResNeXt与Res2Net系列](#SEResNeXt与Res2Net系列) - - [DPN与DenseNet系列](#DPN与DenseNet系列) - - [HRNet](HRNet系列) - - [Inception系列](#Inception系列) - - [EfficientNet与ResNeXt101_wsl系列](#EfficientNet与ResNeXt101_wsl系列) - - [ResNeSt与RegNet系列](#ResNeSt与RegNet系列) - - [ViT与DeiT系列](#ViT_and_DeiT系列) - - [RepVGG系列](#RepVGG系列) - - [MixNet系列](#MixNet系列) - - [ReXNet系列](#ReXNet系列) - - [SwinTransformer系列](#SwinTransformer系列) - - [其他模型](#其他模型) - - HS-ResNet: arxiv文章链接: [https://arxiv.org/pdf/2010.07621.pdf](https://arxiv.org/pdf/2010.07621.pdf)。 代码和预训练模型即将开源,敬请期待。 +- [图像识别快速体验] +- 算法介绍 + - [图像识别系统] + - [模型库介绍和预训练模型](./docs/zh_CN/models/models_intro.md) + - [特征学习] + - 商品识别 + - 车辆识别 + - logo识别 + - 动漫人物识别 + - [向量检索] - 模型训练/评估 - - [数据准备](./docs/zh_CN/tutorials/data.md) - - [模型训练与微调](./docs/zh_CN/tutorials/getting_started.md) - - [模型评估](./docs/zh_CN/tutorials/getting_started.md) - - [配置文件详解](./docs/zh_CN/tutorials/config.md) + - 图像分类任务 + - 特征学习任务 - 模型预测 - [基于训练引擎预测推理](./docs/zh_CN/tutorials/getting_started.md) - [基于Python预测引擎预测推理](./docs/zh_CN/tutorials/getting_started.md) @@ -88,391 +66,15 @@ - [模型量化压缩](deploy/slim/quant/README.md) - 高阶使用 - [知识蒸馏](./docs/zh_CN/advanced_tutorials/distillation/distillation.md) + - [模型量化](./docs/zh_CN/extension/paddle_quantization.md) - [数据增广](./docs/zh_CN/advanced_tutorials/image_augmentation/ImageAugment.md) - - [多标签分类](./docs/zh_CN/advanced_tutorials/multilabel/multilabel.md) - [代码解析与社区贡献指南](./docs/zh_CN/tutorials/quick_start_community.md) -- 特色拓展应用 - - [迁移学习](./docs/zh_CN/application/transfer_learning.md) - - [10万类图像分类预训练模型](./docs/zh_CN/application/transfer_learning.md) - - [通用目标检测](./docs/zh_CN/application/object_detection.md) -- FAQ - - [图像分类2021第一季精选问题(近期更新2021.02.03)](./docs/zh_CN/faq_series/faq_2021_s1.md) - - [图像分类通用30个问题](./docs/zh_CN/faq.md) - - [PaddleClas实战15个问题](./docs/zh_CN/faq.md) -- [赛事支持](./docs/zh_CN/competition_support.md) +- FAQ(暂停更新) + - [图像分类任务FAQ] - [许可证书](#许可证书) - [贡献代码](#贡献代码) -## 模型库 - - -### 模型库概览图 - -基于ImageNet1k分类数据集,PaddleClas支持24种系列分类网络结构以及对应的122个图像分类预训练模型,训练技巧、每个系列网络结构的简单介绍和性能评估将在相应章节展现,下面所有的速度指标评估环境如下: -* CPU的评估环境基于骁龙855(SD855)。 -* GPU评估环境基于T4机器,在FP32+TensorRT配置下运行500次测得(去除前10次的warmup时间)。 - -常见服务器端模型的精度指标与其预测耗时的变化曲线如下图所示。 - -![](./docs/images/models/T4_benchmark/t4.fp32.bs1.main_fps_top1.png) - - -常见移动端模型的精度指标与其预测耗时、模型存储大小的变化曲线如下图所示。 - -![](./docs/images/models/mobile_arm_storage.png) - -![](./docs/images/models/mobile_arm_top1.png) - - - -### SSLD知识蒸馏预训练模型 -基于SSLD知识蒸馏的预训练模型列表如下所示,更多关于SSLD知识蒸馏方案的介绍可以参考:[SSLD知识蒸馏文档](./docs/zh_CN/advanced_tutorials/distillation/distillation.md)。 - -* 服务器端知识蒸馏模型 - -| 模型 | Top-1 Acc | Reference
Top-1 Acc | Acc gain | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|---------------------|-----------|-----------|---------------|----------------|-----------|----------|-----------|-----------------------------------| -| ResNet34_vd_ssld | 0.797 | 0.760 | 0.037 | 2.434 | 6.222 | 7.39 | 21.82 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_vd_ssld_pretrained.pdparams) | -| ResNet50_vd_
ssld | 0.824 | 0.791 | 0.033 | 3.531 | 8.090 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams) | -| ResNet50_vd_
ssld_v2 | 0.830 | 0.792 | 0.039 | 3.531 | 8.090 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_v2_pretrained.pdparams) | -| ResNet101_vd_
ssld | 0.837 | 0.802 | 0.035 | 6.117 | 13.762 | 16.1 | 44.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_vd_ssld_pretrained.pdparams) | -| Res2Net50_vd_
26w_4s_ssld | 0.831 | 0.798 | 0.033 | 4.527 | 9.657 | 8.37 | 25.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_vd_26w_4s_ssld_pretrained.pdparams) | -| Res2Net101_vd_
26w_4s_ssld | 0.839 | 0.806 | 0.033 | 8.087 | 17.312 | 16.67 | 45.22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net101_vd_26w_4s_ssld_pretrained.pdparams) | -| Res2Net200_vd_
26w_4s_ssld | 0.851 | 0.812 | 0.049 | 14.678 | 32.350 | 31.49 | 76.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net200_vd_26w_4s_ssld_pretrained.pdparams) | -| HRNet_W18_C_ssld | 0.812 | 0.769 | 0.043 | 7.406 | 13.297 | 4.14 | 21.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W18_C_ssld_pretrained.pdparams) | -| HRNet_W48_C_ssld | 0.836 | 0.790 | 0.046 | 13.707 | 34.435 | 34.58 | 77.47 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W48_C_ssld_pretrained.pdparams) | -| SE_HRNet_W64_C_ssld | 0.848 | - | - | 31.697 | 94.995 | 57.83 | 128.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_HRNet_W64_C_ssld_pretrained.pdparams) | - - -* 端侧知识蒸馏模型 - -| 模型 | Top-1 Acc | Reference
Top-1 Acc | Acc gain | SD855 time(ms)
bs=1 | Flops(G) | Params(M) | 模型大小(M) | 下载地址 | -|---------------------|-----------|-----------|---------------|----------------|-----------|----------|-----------|-----------------------------------| -| MobileNetV1_
ssld | 0.779 | 0.710 | 0.069 | 32.523 | 1.11 | 4.19 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_ssld_pretrained.pdparams) | -| MobileNetV2_
ssld | 0.767 | 0.722 | 0.045 | 23.318 | 0.6 | 3.44 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_ssld_pretrained.pdparams) | -| MobileNetV3_
small_x0_35_ssld | 0.556 | 0.530 | 0.026 | 2.635 | 0.026 | 1.66 | 6.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_35_ssld_pretrained.pdparams) | -| MobileNetV3_
large_x1_0_ssld | 0.790 | 0.753 | 0.036 | 19.308 | 0.45 | 5.47 | 21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_ssld_pretrained.pdparams) | -| MobileNetV3_small_
x1_0_ssld | 0.713 | 0.682 | 0.031 | 6.546 | 0.123 | 2.94 | 12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_0_ssld_pretrained.pdparams) | -| GhostNet_
x1_3_ssld | 0.794 | 0.757 | 0.037 | 19.983 | 0.44 | 7.3 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_3_ssld_pretrained.pdparams) | - - -* 注: `Reference Top-1 Acc`表示PaddleClas基于ImageNet1k数据集训练得到的预训练模型精度。 - - -### ResNet及其Vd系列 - -ResNet及其Vd系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[ResNet及其Vd系列模型文档](./docs/zh_CN/models/ResNet_and_vd.md)。 - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|---------------------|-----------|-----------|-----------------------|----------------------|----------|-----------|----------------------------------------------------------------------------------------------| -| ResNet18 | 0.7098 | 0.8992 | 1.45606 | 3.56305 | 3.66 | 11.69 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet18_pretrained.pdparams) | -| ResNet18_vd | 0.7226 | 0.9080 | 1.54557 | 3.85363 | 4.14 | 11.71 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet18_vd_pretrained.pdparams) | -| ResNet34 | 0.7457 | 0.9214 | 2.34957 | 5.89821 | 7.36 | 21.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_pretrained.pdparams) | -| ResNet34_vd | 0.7598 | 0.9298 | 2.43427 | 6.22257 | 7.39 | 21.82 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_vd_pretrained.pdparams) | -| ResNet34_vd_ssld | 0.7972 | 0.9490 | 2.43427 | 6.22257 | 7.39 | 21.82 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_vd_ssld_pretrained.pdparams) | -| ResNet50 | 0.7650 | 0.9300 | 3.47712 | 7.84421 | 8.19 | 25.56 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_pretrained.pdparams) | -| ResNet50_vc | 0.7835 | 0.9403 | 3.52346 | 8.10725 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vc_pretrained.pdparams) | -| ResNet50_vd | 0.7912 | 0.9444 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_pretrained.pdparams) | -| ResNet50_vd_v2 | 0.7984 | 0.9493 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_v2_pretrained.pdparams) | -| ResNet101 | 0.7756 | 0.9364 | 6.07125 | 13.40573 | 15.52 | 44.55 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_pretrained.pdparams) | -| ResNet101_vd | 0.8017 | 0.9497 | 6.11704 | 13.76222 | 16.1 | 44.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_vd_pretrained.pdparams) | -| ResNet152 | 0.7826 | 0.9396 | 8.50198 | 19.17073 | 23.05 | 60.19 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet152_pretrained.pdparams) | -| ResNet152_vd | 0.8059 | 0.9530 | 8.54376 | 19.52157 | 23.53 | 60.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet152_vd_pretrained.pdparams) | -| ResNet200_vd | 0.8093 | 0.9533 | 10.80619 | 25.01731 | 30.53 | 74.74 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet200_vd_pretrained.pdparams) | -| ResNet50_vd_
ssld | 0.8239 | 0.9610 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams) | -| ResNet50_vd_
ssld_v2 | 0.8300 | 0.9640 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_v2_pretrained.pdparams) | -| ResNet101_vd_
ssld | 0.8373 | 0.9669 | 6.11704 | 13.76222 | 16.1 | 44.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_vd_ssld_pretrained.pdparams) | - - - -### 移动端系列 - -移动端系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[移动端系列模型文档](./docs/zh_CN/models/Mobile.md)。 - -| 模型 | Top-1 Acc | Top-5 Acc | SD855 time(ms)
bs=1 | Flops(G) | Params(M) | 模型大小(M) | 下载地址 | -|----------------------------------|-----------|-----------|------------------------|----------|-----------|---------|-----------------------------------------------------------------------------------------------------------| -| MobileNetV1_
x0_25 | 0.5143 | 0.7546 | 3.21985 | 0.07 | 0.46 | 1.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_x0_25_pretrained.pdparams) | -| MobileNetV1_
x0_5 | 0.6352 | 0.8473 | 9.579599 | 0.28 | 1.31 | 5.2 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_x0_5_pretrained.pdparams) | -| MobileNetV1_
x0_75 | 0.6881 | 0.8823 | 19.436399 | 0.63 | 2.55 | 10 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_x0_75_pretrained.pdparams) | -| MobileNetV1 | 0.7099 | 0.8968 | 32.523048 | 1.11 | 4.19 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_pretrained.pdparams) | -| MobileNetV1_
ssld | 0.7789 | 0.9394 | 32.523048 | 1.11 | 4.19 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_ssld_pretrained.pdparams) | -| MobileNetV2_
x0_25 | 0.5321 | 0.7652 | 3.79925 | 0.05 | 1.5 | 6.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x0_25_pretrained.pdparams) | -| MobileNetV2_
x0_5 | 0.6503 | 0.8572 | 8.7021 | 0.17 | 1.93 | 7.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x0_5_pretrained.pdparams) | -| MobileNetV2_
x0_75 | 0.6983 | 0.8901 | 15.531351 | 0.35 | 2.58 | 10 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x0_75_pretrained.pdparams) | -| MobileNetV2 | 0.7215 | 0.9065 | 23.317699 | 0.6 | 3.44 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_pretrained.pdparams) | -| MobileNetV2_
x1_5 | 0.7412 | 0.9167 | 45.623848 | 1.32 | 6.76 | 26 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x1_5_pretrained.pdparams) | -| MobileNetV2_
x2_0 | 0.7523 | 0.9258 | 74.291649 | 2.32 | 11.13 | 43 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x2_0_pretrained.pdparams) | -| MobileNetV2_
ssld | 0.7674 | 0.9339 | 23.317699 | 0.6 | 3.44 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_ssld_pretrained.pdparams) | -| MobileNetV3_
large_x1_25 | 0.7641 | 0.9295 | 28.217701 | 0.714 | 7.44 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_25_pretrained.pdparams) | -| MobileNetV3_
large_x1_0 | 0.7532 | 0.9231 | 19.30835 | 0.45 | 5.47 | 21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_pretrained.pdparams) | -| MobileNetV3_
large_x0_75 | 0.7314 | 0.9108 | 13.5646 | 0.296 | 3.91 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_75_pretrained.pdparams) | -| MobileNetV3_
large_x0_5 | 0.6924 | 0.8852 | 7.49315 | 0.138 | 2.67 | 11 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams) | -| MobileNetV3_
large_x0_35 | 0.6432 | 0.8546 | 5.13695 | 0.077 | 2.1 | 8.6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_35_pretrained.pdparams) | -| MobileNetV3_
small_x1_25 | 0.7067 | 0.8951 | 9.2745 | 0.195 | 3.62 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_25_pretrained.pdparams) | -| MobileNetV3_
small_x1_0 | 0.6824 | 0.8806 | 6.5463 | 0.123 | 2.94 | 12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_0_pretrained.pdparams) | -| MobileNetV3_
small_x0_75 | 0.6602 | 0.8633 | 5.28435 | 0.088 | 2.37 | 9.6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_75_pretrained.pdparams) | -| MobileNetV3_
small_x0_5 | 0.5921 | 0.8152 | 3.35165 | 0.043 | 1.9 | 7.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_5_pretrained.pdparams) | -| MobileNetV3_
small_x0_35 | 0.5303 | 0.7637 | 2.6352 | 0.026 | 1.66 | 6.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_35_pretrained.pdparams) | -| MobileNetV3_
small_x0_35_ssld | 0.5555 | 0.7771 | 2.6352 | 0.026 | 1.66 | 6.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_35_ssld_pretrained.pdparams) | -| MobileNetV3_
large_x1_0_ssld | 0.7896 | 0.9448 | 19.30835 | 0.45 | 5.47 | 21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_ssld_pretrained.pdparams) | -| MobileNetV3_small_
x1_0_ssld | 0.7129 | 0.9010 | 6.5463 | 0.123 | 2.94 | 12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_0_ssld_pretrained.pdparams) | -| ShuffleNetV2 | 0.6880 | 0.8845 | 10.941 | 0.28 | 2.26 | 9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x1_0_pretrained.pdparams) | -| ShuffleNetV2_
x0_25 | 0.4990 | 0.7379 | 2.329 | 0.03 | 0.6 | 2.7 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x0_25_pretrained.pdparams) | -| ShuffleNetV2_
x0_33 | 0.5373 | 0.7705 | 2.64335 | 0.04 | 0.64 | 2.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x0_33_pretrained.pdparams) | -| ShuffleNetV2_
x0_5 | 0.6032 | 0.8226 | 4.2613 | 0.08 | 1.36 | 5.6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x0_5_pretrained.pdparams) | -| ShuffleNetV2_
x1_5 | 0.7163 | 0.9015 | 19.3522 | 0.58 | 3.47 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x1_5_pretrained.pdparams) | -| ShuffleNetV2_
x2_0 | 0.7315 | 0.9120 | 34.770149 | 1.12 | 7.32 | 28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x2_0_pretrained.pdparams) | -| ShuffleNetV2_
swish | 0.7003 | 0.8917 | 16.023151 | 0.29 | 2.26 | 9.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_swish_pretrained.pdparams) | -| GhostNet_
x0_5 | 0.6688 | 0.8695 | 5.7143 | 0.082 | 2.6 | 10 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x0_5_pretrained.pdparams) | -| GhostNet_
x1_0 | 0.7402 | 0.9165 | 13.5587 | 0.294 | 5.2 | 20 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_0_pretrained.pdparams) | -| GhostNet_
x1_3 | 0.7579 | 0.9254 | 19.9825 | 0.44 | 7.3 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_3_pretrained.pdparams) | -| GhostNet_
x1_3_ssld | 0.7938 | 0.9449 | 19.9825 | 0.44 | 7.3 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_3_ssld_pretrained.pdparams) | - - - -### SEResNeXt与Res2Net系列 - -SEResNeXt与Res2Net系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[SEResNeXt与Res2Net系列模型文档](./docs/zh_CN/models/SEResNext_and_Res2Net.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|---------------------------|-----------|-----------|-----------------------|----------------------|----------|-----------|----------------------------------------------------------------------------------------------------| -| Res2Net50_
26w_4s | 0.7933 | 0.9457 | 4.47188 | 9.65722 | 8.52 | 25.7 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_26w_4s_pretrained.pdparams) | -| Res2Net50_vd_
26w_4s | 0.7975 | 0.9491 | 4.52712 | 9.93247 | 8.37 | 25.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_vd_26w_4s_pretrained.pdparams) | -| Res2Net50_
14w_8s | 0.7946 | 0.9470 | 5.4026 | 10.60273 | 9.01 | 25.72 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_14w_8s_pretrained.pdparams) | -| Res2Net101_vd_
26w_4s | 0.8064 | 0.9522 | 8.08729 | 17.31208 | 16.67 | 45.22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net101_vd_26w_4s_pretrained.pdparams) | -| Res2Net200_vd_
26w_4s | 0.8121 | 0.9571 | 14.67806 | 32.35032 | 31.49 | 76.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net200_vd_26w_4s_pretrained.pdparams) | -| Res2Net200_vd_
26w_4s_ssld | 0.8513 | 0.9742 | 14.67806 | 32.35032 | 31.49 | 76.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net200_vd_26w_4s_ssld_pretrained.pdparams) | -| ResNeXt50_
32x4d | 0.7775 | 0.9382 | 7.56327 | 10.6134 | 8.02 | 23.64 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_32x4d_pretrained.pdparams) | -| ResNeXt50_vd_
32x4d | 0.7956 | 0.9462 | 7.62044 | 11.03385 | 8.5 | 23.66 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_vd_32x4d_pretrained.pdparams) | -| ResNeXt50_
64x4d | 0.7843 | 0.9413 | 13.80962 | 18.4712 | 15.06 | 42.36 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_64x4d_pretrained.pdparams) | -| ResNeXt50_vd_
64x4d | 0.8012 | 0.9486 | 13.94449 | 18.88759 | 15.54 | 42.38 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_vd_64x4d_pretrained.pdparams) | -| ResNeXt101_
32x4d | 0.7865 | 0.9419 | 16.21503 | 19.96568 | 15.01 | 41.54 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x4d_pretrained.pdparams) | -| ResNeXt101_vd_
32x4d | 0.8033 | 0.9512 | 16.28103 | 20.25611 | 15.49 | 41.56 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_vd_32x4d_pretrained.pdparams) | -| ResNeXt101_
64x4d | 0.7835 | 0.9452 | 30.4788 | 36.29801 | 29.05 | 78.12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_64x4d_pretrained.pdparams) | -| ResNeXt101_vd_
64x4d | 0.8078 | 0.9520 | 30.40456 | 36.77324 | 29.53 | 78.14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_vd_64x4d_pretrained.pdparams) | -| ResNeXt152_
32x4d | 0.7898 | 0.9433 | 24.86299 | 29.36764 | 22.01 | 56.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_32x4d_pretrained.pdparams) | -| ResNeXt152_vd_
32x4d | 0.8072 | 0.9520 | 25.03258 | 30.08987 | 22.49 | 56.3 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_vd_32x4d_pretrained.pdparams) | -| ResNeXt152_
64x4d | 0.7951 | 0.9471 | 46.7564 | 56.34108 | 43.03 | 107.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_64x4d_pretrained.pdparams) | -| ResNeXt152_vd_
64x4d | 0.8108 | 0.9534 | 47.18638 | 57.16257 | 43.52 | 107.59 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_vd_64x4d_pretrained.pdparams) | -| SE_ResNet18_vd | 0.7333 | 0.9138 | 1.7691 | 4.19877 | 4.14 | 11.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNet18_vd_pretrained.pdparams) | -| SE_ResNet34_vd | 0.7651 | 0.9320 | 2.88559 | 7.03291 | 7.84 | 21.98 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNet34_vd_pretrained.pdparams) | -| SE_ResNet50_vd | 0.7952 | 0.9475 | 4.28393 | 10.38846 | 8.67 | 28.09 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNet50_vd_pretrained.pdparams) | -| SE_ResNeXt50_
32x4d | 0.7844 | 0.9396 | 8.74121 | 13.563 | 8.02 | 26.16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNeXt50_32x4d_pretrained.pdparams) | -| SE_ResNeXt50_vd_
32x4d | 0.8024 | 0.9489 | 9.17134 | 14.76192 | 10.76 | 26.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNeXt50_vd_32x4d_pretrained.pdparams) | -| SE_ResNeXt101_
32x4d | 0.7939 | 0.9443 | 18.82604 | 25.31814 | 15.02 | 46.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNeXt101_32x4d_pretrained.pdparams) | -| SENet154_vd | 0.8140 | 0.9548 | 53.79794 | 66.31684 | 45.83 | 114.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SENet154_vd_pretrained.pdparams) | - - - -### DPN与DenseNet系列 - -DPN与DenseNet系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[DPN与DenseNet系列模型文档](./docs/zh_CN/models/DPN_DenseNet.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|-------------|-----------|-----------|-----------------------|----------------------|----------|-----------|--------------------------------------------------------------------------------------| -| DenseNet121 | 0.7566 | 0.9258 | 4.40447 | 9.32623 | 5.69 | 7.98 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet121_pretrained.pdparams) | -| DenseNet161 | 0.7857 | 0.9414 | 10.39152 | 22.15555 | 15.49 | 28.68 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet161_pretrained.pdparams) | -| DenseNet169 | 0.7681 | 0.9331 | 6.43598 | 12.98832 | 6.74 | 14.15 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet169_pretrained.pdparams) | -| DenseNet201 | 0.7763 | 0.9366 | 8.20652 | 17.45838 | 8.61 | 20.01 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet201_pretrained.pdparams) | -| DenseNet264 | 0.7796 | 0.9385 | 12.14722 | 26.27707 | 11.54 | 33.37 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet264_pretrained.pdparams) | -| DPN68 | 0.7678 | 0.9343 | 11.64915 | 12.82807 | 4.03 | 10.78 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN68_pretrained.pdparams) | -| DPN92 | 0.7985 | 0.9480 | 18.15746 | 23.87545 | 12.54 | 36.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN92_pretrained.pdparams) | -| DPN98 | 0.8059 | 0.9510 | 21.18196 | 33.23925 | 22.22 | 58.46 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN98_pretrained.pdparams) | -| DPN107 | 0.8089 | 0.9532 | 27.62046 | 52.65353 | 35.06 | 82.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN107_pretrained.pdparams) | -| DPN131 | 0.8070 | 0.9514 | 28.33119 | 46.19439 | 30.51 | 75.36 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN131_pretrained.pdparams) | - - - - -### HRNet系列 - -HRNet系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[HRNet系列模型文档](./docs/zh_CN/models/HRNet.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|-------------|-----------|-----------|------------------|------------------|----------|-----------|--------------------------------------------------------------------------------------| -| HRNet_W18_C | 0.7692 | 0.9339 | 7.40636 | 13.29752 | 4.14 | 21.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W18_C_pretrained.pdparams) | -| HRNet_W18_C_ssld | 0.81162 | 0.95804 | 7.40636 | 13.29752 | 4.14 | 21.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W18_C_ssld_pretrained.pdparams) | -| HRNet_W30_C | 0.7804 | 0.9402 | 9.57594 | 17.35485 | 16.23 | 37.71 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W30_C_pretrained.pdparams) | -| HRNet_W32_C | 0.7828 | 0.9424 | 9.49807 | 17.72921 | 17.86 | 41.23 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W32_C_pretrained.pdparams) | -| HRNet_W40_C | 0.7877 | 0.9447 | 12.12202 | 25.68184 | 25.41 | 57.55 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W40_C_pretrained.pdparams) | -| HRNet_W44_C | 0.7900 | 0.9451 | 13.19858 | 32.25202 | 29.79 | 67.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W44_C_pretrained.pdparams) | -| HRNet_W48_C | 0.7895 | 0.9442 | 13.70761 | 34.43572 | 34.58 | 77.47 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W48_C_pretrained.pdparams) | -| HRNet_W48_C_ssld | 0.8363 | 0.9682 | 13.70761 | 34.43572 | 34.58 | 77.47 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W48_C_ssld_pretrained.pdparams) | -| HRNet_W64_C | 0.7930 | 0.9461 | 17.57527 | 47.9533 | 57.83 | 128.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W64_C_pretrained.pdparams) | -| SE_HRNet_W64_C_ssld | 0.8475 | 0.9726 | 31.69770 | 94.99546 | 57.83 | 128.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_HRNet_W64_C_ssld_pretrained.pdparams) | - - - -### Inception系列 - -Inception系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[Inception系列模型文档](./docs/zh_CN/models/Inception.md)。 - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|--------------------|-----------|-----------|-----------------------|----------------------|----------|-----------|---------------------------------------------------------------------------------------------| -| GoogLeNet | 0.7070 | 0.8966 | 1.88038 | 4.48882 | 2.88 | 8.46 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GoogLeNet_pretrained.pdparams) | -| Xception41 | 0.7930 | 0.9453 | 4.96939 | 17.01361 | 16.74 | 22.69 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception41_pretrained.pdparams) | -| Xception41_deeplab | 0.7955 | 0.9438 | 5.33541 | 17.55938 | 18.16 | 26.73 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception41_deeplab_pretrained.pdparams) | -| Xception65 | 0.8100 | 0.9549 | 7.26158 | 25.88778 | 25.95 | 35.48 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception65_pretrained.pdparams) | -| Xception65_deeplab | 0.8032 | 0.9449 | 7.60208 | 26.03699 | 27.37 | 39.52 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception65_deeplab_pretrained.pdparams) | -| Xception71 | 0.8111 | 0.9545 | 8.72457 | 31.55549 | 31.77 | 37.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception71_pretrained.pdparams) | -| InceptionV3 | 0.7914 | 0.9459 | 6.64054 | 13.53630 | 11.46 | 23.83 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/InceptionV3_pretrained.pdparams) | -| InceptionV4 | 0.8077 | 0.9526 | 12.99342 | 25.23416 | 24.57 | 42.68 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/InceptionV4_pretrained.pdparams) | - - - -### EfficientNet与ResNeXt101_wsl系列 - -EfficientNet与ResNeXt101_wsl系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[EfficientNet与ResNeXt101_wsl系列模型文档](./docs/zh_CN/models/EfficientNet_and_ResNeXt101_wsl.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|---------------------------|-----------|-----------|------------------|------------------|----------|-----------|----------------------------------------------------------------------------------------------------| -| ResNeXt101_
32x8d_wsl | 0.8255 | 0.9674 | 18.52528 | 34.25319 | 29.14 | 78.44 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x8d_wsl_pretrained.pdparams) | -| ResNeXt101_
32x16d_wsl | 0.8424 | 0.9726 | 25.60395 | 71.88384 | 57.55 | 152.66 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x16d_wsl_pretrained.pdparams) | -| ResNeXt101_
32x32d_wsl | 0.8497 | 0.9759 | 54.87396 | 160.04337 | 115.17 | 303.11 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x32d_wsl_pretrained.pdparams) | -| ResNeXt101_
32x48d_wsl | 0.8537 | 0.9769 | 99.01698256 | 315.91261 | 173.58 | 456.2 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x48d_wsl_pretrained.pdparams) | -| Fix_ResNeXt101_
32x48d_wsl | 0.8626 | 0.9797 | 160.0838242 | 595.99296 | 354.23 | 456.2 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Fix_ResNeXt101_32x48d_wsl_pretrained.pdparams) | -| EfficientNetB0 | 0.7738 | 0.9331 | 3.442 | 6.11476 | 0.72 | 5.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB0_pretrained.pdparams) | -| EfficientNetB1 | 0.7915 | 0.9441 | 5.3322 | 9.41795 | 1.27 | 7.52 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB1_pretrained.pdparams) | -| EfficientNetB2 | 0.7985 | 0.9474 | 6.29351 | 10.95702 | 1.85 | 8.81 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB2_pretrained.pdparams) | -| EfficientNetB3 | 0.8115 | 0.9541 | 7.67749 | 16.53288 | 3.43 | 11.84 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB3_pretrained.pdparams) | -| EfficientNetB4 | 0.8285 | 0.9623 | 12.15894 | 30.94567 | 8.29 | 18.76 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB4_pretrained.pdparams) | -| EfficientNetB5 | 0.8362 | 0.9672 | 20.48571 | 61.60252 | 19.51 | 29.61 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB5_pretrained.pdparams) | -| EfficientNetB6 | 0.8400 | 0.9688 | 32.62402 | - | 36.27 | 42 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB6_pretrained.pdparams) | -| EfficientNetB7 | 0.8430 | 0.9689 | 53.93823 | - | 72.35 | 64.92 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB7_pretrained.pdparams) | -| EfficientNetB0_
small | 0.7580 | 0.9258 | 2.3076 | 4.71886 | 0.72 | 4.65 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB0_small_pretrained.pdparams) | - - - -### ResNeSt与RegNet系列 - -ResNeSt与RegNet系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[ResNeSt与RegNet系列模型文档](./docs/zh_CN/models/ResNeSt_RegNet.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------| -| ResNeSt50_
fast_1s1x64d | 0.8035 | 0.9528 | 3.45405 | 8.72680 | 8.68 | 26.3 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeSt50_fast_1s1x64d_pretrained.pdparams) | -| ResNeSt50 | 0.8083 | 0.9542 | 6.69042 | 8.01664 | 10.78 | 27.5 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeSt50_pretrained.pdparams) | -| RegNetX_4GF | 0.785 | 0.9416 | 6.46478 | 11.19862 | 8 | 22.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RegNetX_4GF_pretrained.pdparams) | - - - -### ViT_and_DeiT系列 - -ViT(Vision Transformer)与DeiT(Data-efficient Image Transformers)系列模型的精度、速度指标如下表所示. 更多关于该系列模型的介绍可以参考: [ViT_and_DeiT系列模型文档](./docs/zh_CN/models/ViT_and_DeiT.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|------------------------|-----------|-----------|------------------|------------------|----------|------------------------|------------------------| -| ViT_small_
patch16_224 | 0.7769 | 0.9342 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_small_patch16_224_pretrained.pdparams) | -| ViT_base_
patch16_224 | 0.8195 | 0.9617 | - | - | | 86 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_base_patch16_224_pretrained.pdparams) | -| ViT_base_
patch16_384 | 0.8414 | 0.9717 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_base_patch16_384_pretrained.pdparams) | -| ViT_base_
patch32_384 | 0.8176 | 0.9613 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_base_patch32_384_pretrained.pdparams) | -| ViT_large_
patch16_224 | 0.8323 | 0.9650 | - | - | | 307 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_large_patch16_224_pretrained.pdparams) | -| ViT_large_
patch16_384 | 0.8513 | 0.9736 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_large_patch16_384_pretrained.pdparams) | -| ViT_large_
patch32_384 | 0.8153 | 0.9608 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_large_patch32_384_pretrained.pdparams) | -| | | | | | | | | - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|------------------------|-----------|-----------|------------------|------------------|----------|------------------------|------------------------| -| DeiT_tiny_
patch16_224 | 0.718 | 0.910 | - | - | | 5 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_tiny_patch16_224_pretrained.pdparams) | -| DeiT_small_
patch16_224 | 0.796 | 0.949 | - | - | | 22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_small_patch16_224_pretrained.pdparams) | -| DeiT_base_
patch16_224 | 0.817 | 0.957 | - | - | | 86 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_patch16_224_pretrained.pdparams) | -| DeiT_base_
patch16_384 | 0.830 | 0.962 | - | - | | 87 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_patch16_384_pretrained.pdparams) | -| DeiT_tiny_
distilled_patch16_224 | 0.741 | 0.918 | - | - | | 6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_tiny_distilled_patch16_224_pretrained.pdparams) | -| DeiT_small_
distilled_patch16_224 | 0.809 | 0.953 | - | - | | 22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_small_distilled_patch16_224_pretrained.pdparams) | -| DeiT_base_
distilled_patch16_224 | 0.831 | 0.964 | - | - | | 87 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_distilled_patch16_224_pretrained.pdparams) | -| DeiT_base_
distilled_patch16_384 | 0.851 | 0.973 | - | - | | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_distilled_patch16_384_pretrained.pdparams) | -| | | | | | | | | - - - -### RepVGG系列 - -关于RepVGG系列模型的精度、速度指标如下表所示,更多介绍可以参考:[RepVGG系列模型文档](./docs/zh_CN/models/RepVGG.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------| -| RepVGG_A0 | 0.7131 | 0.9016 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_A0_pretrained.pdparams) | -| RepVGG_A1 | 0.7380 | 0.9146 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_A1_pretrained.pdparams) | -| RepVGG_A2 | 0.7571 | 0.9264 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_A2_pretrained.pdparams) | -| RepVGG_B0 | 0.7450 | 0.9213 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B0_pretrained.pdparams) | -| RepVGG_B1 | 0.7773 | 0.9385 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B1_pretrained.pdparams) | -| RepVGG_B2 | 0.7813 | 0.9410 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B2_pretrained.pdparams) | -| RepVGG_B1g2 | 0.7732 | 0.9359 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B1g2_pretrained.pdparams) | -| RepVGG_B1g4 | 0.7675 | 0.9335 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B1g4_pretrained.pdparams) | -| RepVGG_B2g4 | 0.7881 | 0.9448 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B2g4_pretrained.pdparams) | -| RepVGG_B3g4 | 0.7965 | 0.9485 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B3g4_pretrained.pdparams) | - - - -### MixNet系列 - -关于MixNet系列模型的精度、速度指标如下表所示,更多介绍可以参考:[MixNet系列模型文档](./docs/zh_CN/models/MixNet.md)。 - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(M) | Params(M) | 下载地址 | -| -------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | -| MixNet_S | 0.7628 | 0.9299 | | | 252.977 | 4.167 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MixNet_S_pretrained.pdparams) | -| MixNet_M | 0.7767 | 0.9364 | | | 357.119 | 5.065 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MixNet_M_pretrained.pdparams) | -| MixNet_L | 0.7860 | 0.9437 | | | 579.017 | 7.384 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MixNet_L_pretrained.pdparams) | - - - -### ReXNet系列 - -关于ReXNet系列模型的精度、速度指标如下表所示,更多介绍可以参考:[ReXNet系列模型文档](./docs/zh_CN/models/ReXNet.md)。 - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | -| ReXNet_1_0 | 0.7746 | 0.9370 | | | 0.415 | 4.838 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_1_0_pretrained.pdparams) | -| ReXNet_1_3 | 0.7913 | 0.9464 | | | 0.683 | 7.611 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_1_3_pretrained.pdparams) | -| ReXNet_1_5 | 0.8006 | 0.9512 | | | 0.900 | 9.791 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_1_5_pretrained.pdparams) | -| ReXNet_2_0 | 0.8122 | 0.9536 | | | 1.561 | 16.449 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_2_0_pretrained.pdparams) | -| ReXNet_3_0 | 0.8209 | 0.9612 | | | 3.445 | 34.833 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_3_0_pretrained.pdparams) | - - - -### SwinTransformer系列 - -关于SwinTransformer系列模型的精度、速度指标如下表所示,更多介绍可以参考:[SwinTransformer系列模型文档](./docs/zh_CN/models/SwinTransformer.md)。 - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | -| SwinTransformer_tiny_patch4_window7_224 | 0.8069 | 0.9534 | | | 4.5 | 28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_tiny_patch4_window7_224_pretrained.pdparams) | -| SwinTransformer_small_patch4_window7_224 | 0.8275 | 0.9613 | | | 8.7 | 50 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_small_patch4_window7_224_pretrained.pdparams) | -| SwinTransformer_base_patch4_window7_224 | 0.8300 | 0.9626 | | | 15.4 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window7_224_pretrained.pdparams) | -| SwinTransformer_base_patch4_window12_384 | 0.8439 | 0.9693 | | | 47.1 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window12_384_pretrained.pdparams) | -| SwinTransformer_base_patch4_window7_224[1] | 0.8487 | 0.9746 | | | 15.4 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window7_224_22kto1k_pretrained.pdparams) | -| SwinTransformer_base_patch4_window12_384[1] | 0.8642 | 0.9807 | | | 47.1 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window12_384_22kto1k_pretrained.pdparams) | -| SwinTransformer_large_patch4_window7_224[1] | 0.8596 | 0.9783 | | | 34.5 | 197 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_large_patch4_window7_224_22kto1k_pretrained.pdparams) | -| SwinTransformer_large_patch4_window12_384[1] | 0.8719 | 0.9823 | | | 103.9 | 197 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_large_patch4_window12_384_22kto1k_pretrained.pdparams) | - -[1]:基于ImageNet22k数据集预训练,然后在ImageNet1k数据集迁移学习得到。 - - - -### 其他模型 - -关于AlexNet、SqueezeNet系列、VGG系列、DarkNet53等模型的精度、速度指标如下表所示,更多介绍可以参考:[其他模型文档](./docs/zh_CN/models/Others.md)。 - - -| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | -|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------| -| AlexNet | 0.567 | 0.792 | 1.44993 | 2.46696 | 1.370 | 61.090 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/AlexNet_pretrained.pdparams) | -| SqueezeNet1_0 | 0.596 | 0.817 | 0.96736 | 2.53221 | 1.550 | 1.240 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_0_pretrained.pdparams) | -| SqueezeNet1_1 | 0.601 | 0.819 | 0.76032 | 1.877 | 0.690 | 1.230 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_1_pretrained.pdparams) | -| VGG11 | 0.693 | 0.891 | 3.90412 | 9.51147 | 15.090 | 132.850 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG11_pretrained.pdparams) | -| VGG13 | 0.700 | 0.894 | 4.64684 | 12.61558 | 22.480 | 133.030 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG13_pretrained.pdparams) | -| VGG16 | 0.720 | 0.907 | 5.61769 | 16.40064 | 30.810 | 138.340 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG16_pretrained.pdparams) | -| VGG19 | 0.726 | 0.909 | 6.65221 | 20.4334 | 39.130 | 143.650 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG19_pretrained.pdparams) | -| DarkNet53 | 0.780 | 0.941 | 4.10829 | 12.1714 | 18.580 | 41.600 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DarkNet53_pretrained.pdparams) | - ## 许可证书 diff --git a/docs/zh_CN/ImageNet_models_cn.md b/docs/zh_CN/ImageNet_models_cn.md new file mode 100644 index 000000000..d135c9572 --- /dev/null +++ b/docs/zh_CN/ImageNet_models_cn.md @@ -0,0 +1,388 @@ +简体中文 | [English](README.md) + + +## ImageNet预训练模型库 + + +### 模型库概览图 + +基于ImageNet1k分类数据集,PaddleClas支持24种系列分类网络结构以及对应的122个图像分类预训练模型,训练技巧、每个系列网络结构的简单介绍和性能评估将在相应章节展现,下面所有的速度指标评估环境如下: +* CPU的评估环境基于骁龙855(SD855)。 +* GPU评估环境基于T4机器,在FP32+TensorRT配置下运行500次测得(去除前10次的warmup时间)。 + +常见服务器端模型的精度指标与其预测耗时的变化曲线如下图所示。 + +![](./docs/images/models/T4_benchmark/t4.fp32.bs1.main_fps_top1.png) + + +常见移动端模型的精度指标与其预测耗时、模型存储大小的变化曲线如下图所示。 + +![](./docs/images/models/mobile_arm_storage.png) + +![](./docs/images/models/mobile_arm_top1.png) + + + +### SSLD知识蒸馏预训练模型 +基于SSLD知识蒸馏的预训练模型列表如下所示,更多关于SSLD知识蒸馏方案的介绍可以参考:[SSLD知识蒸馏文档](./docs/zh_CN/advanced_tutorials/distillation/distillation.md)。 + +* 服务器端知识蒸馏模型 + +| 模型 | Top-1 Acc | Reference
Top-1 Acc | Acc gain | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|---------------------|-----------|-----------|---------------|----------------|-----------|----------|-----------|-----------------------------------| +| ResNet34_vd_ssld | 0.797 | 0.760 | 0.037 | 2.434 | 6.222 | 7.39 | 21.82 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_vd_ssld_pretrained.pdparams) | +| ResNet50_vd_
ssld | 0.824 | 0.791 | 0.033 | 3.531 | 8.090 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams) | +| ResNet50_vd_
ssld_v2 | 0.830 | 0.792 | 0.039 | 3.531 | 8.090 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_v2_pretrained.pdparams) | +| ResNet101_vd_
ssld | 0.837 | 0.802 | 0.035 | 6.117 | 13.762 | 16.1 | 44.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_vd_ssld_pretrained.pdparams) | +| Res2Net50_vd_
26w_4s_ssld | 0.831 | 0.798 | 0.033 | 4.527 | 9.657 | 8.37 | 25.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_vd_26w_4s_ssld_pretrained.pdparams) | +| Res2Net101_vd_
26w_4s_ssld | 0.839 | 0.806 | 0.033 | 8.087 | 17.312 | 16.67 | 45.22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net101_vd_26w_4s_ssld_pretrained.pdparams) | +| Res2Net200_vd_
26w_4s_ssld | 0.851 | 0.812 | 0.049 | 14.678 | 32.350 | 31.49 | 76.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net200_vd_26w_4s_ssld_pretrained.pdparams) | +| HRNet_W18_C_ssld | 0.812 | 0.769 | 0.043 | 7.406 | 13.297 | 4.14 | 21.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W18_C_ssld_pretrained.pdparams) | +| HRNet_W48_C_ssld | 0.836 | 0.790 | 0.046 | 13.707 | 34.435 | 34.58 | 77.47 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W48_C_ssld_pretrained.pdparams) | +| SE_HRNet_W64_C_ssld | 0.848 | - | - | 31.697 | 94.995 | 57.83 | 128.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_HRNet_W64_C_ssld_pretrained.pdparams) | + + +* 端侧知识蒸馏模型 + +| 模型 | Top-1 Acc | Reference
Top-1 Acc | Acc gain | SD855 time(ms)
bs=1 | Flops(G) | Params(M) | 模型大小(M) | 下载地址 | +|---------------------|-----------|-----------|---------------|----------------|-----------|----------|-----------|-----------------------------------| +| MobileNetV1_
ssld | 0.779 | 0.710 | 0.069 | 32.523 | 1.11 | 4.19 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_ssld_pretrained.pdparams) | +| MobileNetV2_
ssld | 0.767 | 0.722 | 0.045 | 23.318 | 0.6 | 3.44 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_ssld_pretrained.pdparams) | +| MobileNetV3_
small_x0_35_ssld | 0.556 | 0.530 | 0.026 | 2.635 | 0.026 | 1.66 | 6.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_35_ssld_pretrained.pdparams) | +| MobileNetV3_
large_x1_0_ssld | 0.790 | 0.753 | 0.036 | 19.308 | 0.45 | 5.47 | 21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_ssld_pretrained.pdparams) | +| MobileNetV3_small_
x1_0_ssld | 0.713 | 0.682 | 0.031 | 6.546 | 0.123 | 2.94 | 12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_0_ssld_pretrained.pdparams) | +| GhostNet_
x1_3_ssld | 0.794 | 0.757 | 0.037 | 19.983 | 0.44 | 7.3 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_3_ssld_pretrained.pdparams) | + + +* 注: `Reference Top-1 Acc`表示PaddleClas基于ImageNet1k数据集训练得到的预训练模型精度。 + + +### ResNet及其Vd系列 + +ResNet及其Vd系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[ResNet及其Vd系列模型文档](./docs/zh_CN/models/ResNet_and_vd.md)。 + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|---------------------|-----------|-----------|-----------------------|----------------------|----------|-----------|----------------------------------------------------------------------------------------------| +| ResNet18 | 0.7098 | 0.8992 | 1.45606 | 3.56305 | 3.66 | 11.69 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet18_pretrained.pdparams) | +| ResNet18_vd | 0.7226 | 0.9080 | 1.54557 | 3.85363 | 4.14 | 11.71 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet18_vd_pretrained.pdparams) | +| ResNet34 | 0.7457 | 0.9214 | 2.34957 | 5.89821 | 7.36 | 21.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_pretrained.pdparams) | +| ResNet34_vd | 0.7598 | 0.9298 | 2.43427 | 6.22257 | 7.39 | 21.82 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_vd_pretrained.pdparams) | +| ResNet34_vd_ssld | 0.7972 | 0.9490 | 2.43427 | 6.22257 | 7.39 | 21.82 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet34_vd_ssld_pretrained.pdparams) | +| ResNet50 | 0.7650 | 0.9300 | 3.47712 | 7.84421 | 8.19 | 25.56 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_pretrained.pdparams) | +| ResNet50_vc | 0.7835 | 0.9403 | 3.52346 | 8.10725 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vc_pretrained.pdparams) | +| ResNet50_vd | 0.7912 | 0.9444 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_pretrained.pdparams) | +| ResNet50_vd_v2 | 0.7984 | 0.9493 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_v2_pretrained.pdparams) | +| ResNet101 | 0.7756 | 0.9364 | 6.07125 | 13.40573 | 15.52 | 44.55 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_pretrained.pdparams) | +| ResNet101_vd | 0.8017 | 0.9497 | 6.11704 | 13.76222 | 16.1 | 44.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_vd_pretrained.pdparams) | +| ResNet152 | 0.7826 | 0.9396 | 8.50198 | 19.17073 | 23.05 | 60.19 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet152_pretrained.pdparams) | +| ResNet152_vd | 0.8059 | 0.9530 | 8.54376 | 19.52157 | 23.53 | 60.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet152_vd_pretrained.pdparams) | +| ResNet200_vd | 0.8093 | 0.9533 | 10.80619 | 25.01731 | 30.53 | 74.74 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet200_vd_pretrained.pdparams) | +| ResNet50_vd_
ssld | 0.8239 | 0.9610 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams) | +| ResNet50_vd_
ssld_v2 | 0.8300 | 0.9640 | 3.53131 | 8.09057 | 8.67 | 25.58 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_v2_pretrained.pdparams) | +| ResNet101_vd_
ssld | 0.8373 | 0.9669 | 6.11704 | 13.76222 | 16.1 | 44.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet101_vd_ssld_pretrained.pdparams) | + + + +### 移动端系列 + +移动端系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[移动端系列模型文档](./docs/zh_CN/models/Mobile.md)。 + +| 模型 | Top-1 Acc | Top-5 Acc | SD855 time(ms)
bs=1 | Flops(G) | Params(M) | 模型大小(M) | 下载地址 | +|----------------------------------|-----------|-----------|------------------------|----------|-----------|---------|-----------------------------------------------------------------------------------------------------------| +| MobileNetV1_
x0_25 | 0.5143 | 0.7546 | 3.21985 | 0.07 | 0.46 | 1.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_x0_25_pretrained.pdparams) | +| MobileNetV1_
x0_5 | 0.6352 | 0.8473 | 9.579599 | 0.28 | 1.31 | 5.2 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_x0_5_pretrained.pdparams) | +| MobileNetV1_
x0_75 | 0.6881 | 0.8823 | 19.436399 | 0.63 | 2.55 | 10 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_x0_75_pretrained.pdparams) | +| MobileNetV1 | 0.7099 | 0.8968 | 32.523048 | 1.11 | 4.19 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_pretrained.pdparams) | +| MobileNetV1_
ssld | 0.7789 | 0.9394 | 32.523048 | 1.11 | 4.19 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV1_ssld_pretrained.pdparams) | +| MobileNetV2_
x0_25 | 0.5321 | 0.7652 | 3.79925 | 0.05 | 1.5 | 6.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x0_25_pretrained.pdparams) | +| MobileNetV2_
x0_5 | 0.6503 | 0.8572 | 8.7021 | 0.17 | 1.93 | 7.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x0_5_pretrained.pdparams) | +| MobileNetV2_
x0_75 | 0.6983 | 0.8901 | 15.531351 | 0.35 | 2.58 | 10 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x0_75_pretrained.pdparams) | +| MobileNetV2 | 0.7215 | 0.9065 | 23.317699 | 0.6 | 3.44 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_pretrained.pdparams) | +| MobileNetV2_
x1_5 | 0.7412 | 0.9167 | 45.623848 | 1.32 | 6.76 | 26 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x1_5_pretrained.pdparams) | +| MobileNetV2_
x2_0 | 0.7523 | 0.9258 | 74.291649 | 2.32 | 11.13 | 43 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_x2_0_pretrained.pdparams) | +| MobileNetV2_
ssld | 0.7674 | 0.9339 | 23.317699 | 0.6 | 3.44 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV2_ssld_pretrained.pdparams) | +| MobileNetV3_
large_x1_25 | 0.7641 | 0.9295 | 28.217701 | 0.714 | 7.44 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_25_pretrained.pdparams) | +| MobileNetV3_
large_x1_0 | 0.7532 | 0.9231 | 19.30835 | 0.45 | 5.47 | 21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_pretrained.pdparams) | +| MobileNetV3_
large_x0_75 | 0.7314 | 0.9108 | 13.5646 | 0.296 | 3.91 | 16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_75_pretrained.pdparams) | +| MobileNetV3_
large_x0_5 | 0.6924 | 0.8852 | 7.49315 | 0.138 | 2.67 | 11 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams) | +| MobileNetV3_
large_x0_35 | 0.6432 | 0.8546 | 5.13695 | 0.077 | 2.1 | 8.6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_35_pretrained.pdparams) | +| MobileNetV3_
small_x1_25 | 0.7067 | 0.8951 | 9.2745 | 0.195 | 3.62 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_25_pretrained.pdparams) | +| MobileNetV3_
small_x1_0 | 0.6824 | 0.8806 | 6.5463 | 0.123 | 2.94 | 12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_0_pretrained.pdparams) | +| MobileNetV3_
small_x0_75 | 0.6602 | 0.8633 | 5.28435 | 0.088 | 2.37 | 9.6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_75_pretrained.pdparams) | +| MobileNetV3_
small_x0_5 | 0.5921 | 0.8152 | 3.35165 | 0.043 | 1.9 | 7.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_5_pretrained.pdparams) | +| MobileNetV3_
small_x0_35 | 0.5303 | 0.7637 | 2.6352 | 0.026 | 1.66 | 6.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_35_pretrained.pdparams) | +| MobileNetV3_
small_x0_35_ssld | 0.5555 | 0.7771 | 2.6352 | 0.026 | 1.66 | 6.9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x0_35_ssld_pretrained.pdparams) | +| MobileNetV3_
large_x1_0_ssld | 0.7896 | 0.9448 | 19.30835 | 0.45 | 5.47 | 21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_ssld_pretrained.pdparams) | +| MobileNetV3_small_
x1_0_ssld | 0.7129 | 0.9010 | 6.5463 | 0.123 | 2.94 | 12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_small_x1_0_ssld_pretrained.pdparams) | +| ShuffleNetV2 | 0.6880 | 0.8845 | 10.941 | 0.28 | 2.26 | 9 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x1_0_pretrained.pdparams) | +| ShuffleNetV2_
x0_25 | 0.4990 | 0.7379 | 2.329 | 0.03 | 0.6 | 2.7 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x0_25_pretrained.pdparams) | +| ShuffleNetV2_
x0_33 | 0.5373 | 0.7705 | 2.64335 | 0.04 | 0.64 | 2.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x0_33_pretrained.pdparams) | +| ShuffleNetV2_
x0_5 | 0.6032 | 0.8226 | 4.2613 | 0.08 | 1.36 | 5.6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x0_5_pretrained.pdparams) | +| ShuffleNetV2_
x1_5 | 0.7163 | 0.9015 | 19.3522 | 0.58 | 3.47 | 14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x1_5_pretrained.pdparams) | +| ShuffleNetV2_
x2_0 | 0.7315 | 0.9120 | 34.770149 | 1.12 | 7.32 | 28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_x2_0_pretrained.pdparams) | +| ShuffleNetV2_
swish | 0.7003 | 0.8917 | 16.023151 | 0.29 | 2.26 | 9.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ShuffleNetV2_swish_pretrained.pdparams) | +| GhostNet_
x0_5 | 0.6688 | 0.8695 | 5.7143 | 0.082 | 2.6 | 10 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x0_5_pretrained.pdparams) | +| GhostNet_
x1_0 | 0.7402 | 0.9165 | 13.5587 | 0.294 | 5.2 | 20 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_0_pretrained.pdparams) | +| GhostNet_
x1_3 | 0.7579 | 0.9254 | 19.9825 | 0.44 | 7.3 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_3_pretrained.pdparams) | +| GhostNet_
x1_3_ssld | 0.7938 | 0.9449 | 19.9825 | 0.44 | 7.3 | 29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GhostNet_x1_3_ssld_pretrained.pdparams) | + + + +### SEResNeXt与Res2Net系列 + +SEResNeXt与Res2Net系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[SEResNeXt与Res2Net系列模型文档](./docs/zh_CN/models/SEResNext_and_Res2Net.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|---------------------------|-----------|-----------|-----------------------|----------------------|----------|-----------|----------------------------------------------------------------------------------------------------| +| Res2Net50_
26w_4s | 0.7933 | 0.9457 | 4.47188 | 9.65722 | 8.52 | 25.7 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_26w_4s_pretrained.pdparams) | +| Res2Net50_vd_
26w_4s | 0.7975 | 0.9491 | 4.52712 | 9.93247 | 8.37 | 25.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_vd_26w_4s_pretrained.pdparams) | +| Res2Net50_
14w_8s | 0.7946 | 0.9470 | 5.4026 | 10.60273 | 9.01 | 25.72 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net50_14w_8s_pretrained.pdparams) | +| Res2Net101_vd_
26w_4s | 0.8064 | 0.9522 | 8.08729 | 17.31208 | 16.67 | 45.22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net101_vd_26w_4s_pretrained.pdparams) | +| Res2Net200_vd_
26w_4s | 0.8121 | 0.9571 | 14.67806 | 32.35032 | 31.49 | 76.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net200_vd_26w_4s_pretrained.pdparams) | +| Res2Net200_vd_
26w_4s_ssld | 0.8513 | 0.9742 | 14.67806 | 32.35032 | 31.49 | 76.21 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Res2Net200_vd_26w_4s_ssld_pretrained.pdparams) | +| ResNeXt50_
32x4d | 0.7775 | 0.9382 | 7.56327 | 10.6134 | 8.02 | 23.64 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_32x4d_pretrained.pdparams) | +| ResNeXt50_vd_
32x4d | 0.7956 | 0.9462 | 7.62044 | 11.03385 | 8.5 | 23.66 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_vd_32x4d_pretrained.pdparams) | +| ResNeXt50_
64x4d | 0.7843 | 0.9413 | 13.80962 | 18.4712 | 15.06 | 42.36 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_64x4d_pretrained.pdparams) | +| ResNeXt50_vd_
64x4d | 0.8012 | 0.9486 | 13.94449 | 18.88759 | 15.54 | 42.38 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt50_vd_64x4d_pretrained.pdparams) | +| ResNeXt101_
32x4d | 0.7865 | 0.9419 | 16.21503 | 19.96568 | 15.01 | 41.54 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x4d_pretrained.pdparams) | +| ResNeXt101_vd_
32x4d | 0.8033 | 0.9512 | 16.28103 | 20.25611 | 15.49 | 41.56 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_vd_32x4d_pretrained.pdparams) | +| ResNeXt101_
64x4d | 0.7835 | 0.9452 | 30.4788 | 36.29801 | 29.05 | 78.12 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_64x4d_pretrained.pdparams) | +| ResNeXt101_vd_
64x4d | 0.8078 | 0.9520 | 30.40456 | 36.77324 | 29.53 | 78.14 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_vd_64x4d_pretrained.pdparams) | +| ResNeXt152_
32x4d | 0.7898 | 0.9433 | 24.86299 | 29.36764 | 22.01 | 56.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_32x4d_pretrained.pdparams) | +| ResNeXt152_vd_
32x4d | 0.8072 | 0.9520 | 25.03258 | 30.08987 | 22.49 | 56.3 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_vd_32x4d_pretrained.pdparams) | +| ResNeXt152_
64x4d | 0.7951 | 0.9471 | 46.7564 | 56.34108 | 43.03 | 107.57 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_64x4d_pretrained.pdparams) | +| ResNeXt152_vd_
64x4d | 0.8108 | 0.9534 | 47.18638 | 57.16257 | 43.52 | 107.59 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt152_vd_64x4d_pretrained.pdparams) | +| SE_ResNet18_vd | 0.7333 | 0.9138 | 1.7691 | 4.19877 | 4.14 | 11.8 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNet18_vd_pretrained.pdparams) | +| SE_ResNet34_vd | 0.7651 | 0.9320 | 2.88559 | 7.03291 | 7.84 | 21.98 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNet34_vd_pretrained.pdparams) | +| SE_ResNet50_vd | 0.7952 | 0.9475 | 4.28393 | 10.38846 | 8.67 | 28.09 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNet50_vd_pretrained.pdparams) | +| SE_ResNeXt50_
32x4d | 0.7844 | 0.9396 | 8.74121 | 13.563 | 8.02 | 26.16 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNeXt50_32x4d_pretrained.pdparams) | +| SE_ResNeXt50_vd_
32x4d | 0.8024 | 0.9489 | 9.17134 | 14.76192 | 10.76 | 26.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNeXt50_vd_32x4d_pretrained.pdparams) | +| SE_ResNeXt101_
32x4d | 0.7939 | 0.9443 | 18.82604 | 25.31814 | 15.02 | 46.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_ResNeXt101_32x4d_pretrained.pdparams) | +| SENet154_vd | 0.8140 | 0.9548 | 53.79794 | 66.31684 | 45.83 | 114.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SENet154_vd_pretrained.pdparams) | + + + +### DPN与DenseNet系列 + +DPN与DenseNet系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[DPN与DenseNet系列模型文档](./docs/zh_CN/models/DPN_DenseNet.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|-------------|-----------|-----------|-----------------------|----------------------|----------|-----------|--------------------------------------------------------------------------------------| +| DenseNet121 | 0.7566 | 0.9258 | 4.40447 | 9.32623 | 5.69 | 7.98 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet121_pretrained.pdparams) | +| DenseNet161 | 0.7857 | 0.9414 | 10.39152 | 22.15555 | 15.49 | 28.68 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet161_pretrained.pdparams) | +| DenseNet169 | 0.7681 | 0.9331 | 6.43598 | 12.98832 | 6.74 | 14.15 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet169_pretrained.pdparams) | +| DenseNet201 | 0.7763 | 0.9366 | 8.20652 | 17.45838 | 8.61 | 20.01 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet201_pretrained.pdparams) | +| DenseNet264 | 0.7796 | 0.9385 | 12.14722 | 26.27707 | 11.54 | 33.37 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DenseNet264_pretrained.pdparams) | +| DPN68 | 0.7678 | 0.9343 | 11.64915 | 12.82807 | 4.03 | 10.78 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN68_pretrained.pdparams) | +| DPN92 | 0.7985 | 0.9480 | 18.15746 | 23.87545 | 12.54 | 36.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN92_pretrained.pdparams) | +| DPN98 | 0.8059 | 0.9510 | 21.18196 | 33.23925 | 22.22 | 58.46 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN98_pretrained.pdparams) | +| DPN107 | 0.8089 | 0.9532 | 27.62046 | 52.65353 | 35.06 | 82.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN107_pretrained.pdparams) | +| DPN131 | 0.8070 | 0.9514 | 28.33119 | 46.19439 | 30.51 | 75.36 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DPN131_pretrained.pdparams) | + + + + +### HRNet系列 + +HRNet系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[HRNet系列模型文档](./docs/zh_CN/models/HRNet.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|-------------|-----------|-----------|------------------|------------------|----------|-----------|--------------------------------------------------------------------------------------| +| HRNet_W18_C | 0.7692 | 0.9339 | 7.40636 | 13.29752 | 4.14 | 21.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W18_C_pretrained.pdparams) | +| HRNet_W18_C_ssld | 0.81162 | 0.95804 | 7.40636 | 13.29752 | 4.14 | 21.29 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W18_C_ssld_pretrained.pdparams) | +| HRNet_W30_C | 0.7804 | 0.9402 | 9.57594 | 17.35485 | 16.23 | 37.71 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W30_C_pretrained.pdparams) | +| HRNet_W32_C | 0.7828 | 0.9424 | 9.49807 | 17.72921 | 17.86 | 41.23 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W32_C_pretrained.pdparams) | +| HRNet_W40_C | 0.7877 | 0.9447 | 12.12202 | 25.68184 | 25.41 | 57.55 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W40_C_pretrained.pdparams) | +| HRNet_W44_C | 0.7900 | 0.9451 | 13.19858 | 32.25202 | 29.79 | 67.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W44_C_pretrained.pdparams) | +| HRNet_W48_C | 0.7895 | 0.9442 | 13.70761 | 34.43572 | 34.58 | 77.47 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W48_C_pretrained.pdparams) | +| HRNet_W48_C_ssld | 0.8363 | 0.9682 | 13.70761 | 34.43572 | 34.58 | 77.47 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W48_C_ssld_pretrained.pdparams) | +| HRNet_W64_C | 0.7930 | 0.9461 | 17.57527 | 47.9533 | 57.83 | 128.06 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/HRNet_W64_C_pretrained.pdparams) | +| SE_HRNet_W64_C_ssld | 0.8475 | 0.9726 | 31.69770 | 94.99546 | 57.83 | 128.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SE_HRNet_W64_C_ssld_pretrained.pdparams) | + + + +### Inception系列 + +Inception系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[Inception系列模型文档](./docs/zh_CN/models/Inception.md)。 + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|--------------------|-----------|-----------|-----------------------|----------------------|----------|-----------|---------------------------------------------------------------------------------------------| +| GoogLeNet | 0.7070 | 0.8966 | 1.88038 | 4.48882 | 2.88 | 8.46 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/GoogLeNet_pretrained.pdparams) | +| Xception41 | 0.7930 | 0.9453 | 4.96939 | 17.01361 | 16.74 | 22.69 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception41_pretrained.pdparams) | +| Xception41_deeplab | 0.7955 | 0.9438 | 5.33541 | 17.55938 | 18.16 | 26.73 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception41_deeplab_pretrained.pdparams) | +| Xception65 | 0.8100 | 0.9549 | 7.26158 | 25.88778 | 25.95 | 35.48 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception65_pretrained.pdparams) | +| Xception65_deeplab | 0.8032 | 0.9449 | 7.60208 | 26.03699 | 27.37 | 39.52 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception65_deeplab_pretrained.pdparams) | +| Xception71 | 0.8111 | 0.9545 | 8.72457 | 31.55549 | 31.77 | 37.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Xception71_pretrained.pdparams) | +| InceptionV3 | 0.7914 | 0.9459 | 6.64054 | 13.53630 | 11.46 | 23.83 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/InceptionV3_pretrained.pdparams) | +| InceptionV4 | 0.8077 | 0.9526 | 12.99342 | 25.23416 | 24.57 | 42.68 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/InceptionV4_pretrained.pdparams) | + + + +### EfficientNet与ResNeXt101_wsl系列 + +EfficientNet与ResNeXt101_wsl系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[EfficientNet与ResNeXt101_wsl系列模型文档](./docs/zh_CN/models/EfficientNet_and_ResNeXt101_wsl.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|---------------------------|-----------|-----------|------------------|------------------|----------|-----------|----------------------------------------------------------------------------------------------------| +| ResNeXt101_
32x8d_wsl | 0.8255 | 0.9674 | 18.52528 | 34.25319 | 29.14 | 78.44 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x8d_wsl_pretrained.pdparams) | +| ResNeXt101_
32x16d_wsl | 0.8424 | 0.9726 | 25.60395 | 71.88384 | 57.55 | 152.66 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x16d_wsl_pretrained.pdparams) | +| ResNeXt101_
32x32d_wsl | 0.8497 | 0.9759 | 54.87396 | 160.04337 | 115.17 | 303.11 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x32d_wsl_pretrained.pdparams) | +| ResNeXt101_
32x48d_wsl | 0.8537 | 0.9769 | 99.01698256 | 315.91261 | 173.58 | 456.2 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeXt101_32x48d_wsl_pretrained.pdparams) | +| Fix_ResNeXt101_
32x48d_wsl | 0.8626 | 0.9797 | 160.0838242 | 595.99296 | 354.23 | 456.2 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/Fix_ResNeXt101_32x48d_wsl_pretrained.pdparams) | +| EfficientNetB0 | 0.7738 | 0.9331 | 3.442 | 6.11476 | 0.72 | 5.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB0_pretrained.pdparams) | +| EfficientNetB1 | 0.7915 | 0.9441 | 5.3322 | 9.41795 | 1.27 | 7.52 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB1_pretrained.pdparams) | +| EfficientNetB2 | 0.7985 | 0.9474 | 6.29351 | 10.95702 | 1.85 | 8.81 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB2_pretrained.pdparams) | +| EfficientNetB3 | 0.8115 | 0.9541 | 7.67749 | 16.53288 | 3.43 | 11.84 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB3_pretrained.pdparams) | +| EfficientNetB4 | 0.8285 | 0.9623 | 12.15894 | 30.94567 | 8.29 | 18.76 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB4_pretrained.pdparams) | +| EfficientNetB5 | 0.8362 | 0.9672 | 20.48571 | 61.60252 | 19.51 | 29.61 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB5_pretrained.pdparams) | +| EfficientNetB6 | 0.8400 | 0.9688 | 32.62402 | - | 36.27 | 42 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB6_pretrained.pdparams) | +| EfficientNetB7 | 0.8430 | 0.9689 | 53.93823 | - | 72.35 | 64.92 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB7_pretrained.pdparams) | +| EfficientNetB0_
small | 0.7580 | 0.9258 | 2.3076 | 4.71886 | 0.72 | 4.65 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/EfficientNetB0_small_pretrained.pdparams) | + + + +### ResNeSt与RegNet系列 + +ResNeSt与RegNet系列模型的精度、速度指标如下表所示,更多关于该系列的模型介绍可以参考:[ResNeSt与RegNet系列模型文档](./docs/zh_CN/models/ResNeSt_RegNet.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------| +| ResNeSt50_
fast_1s1x64d | 0.8035 | 0.9528 | 3.45405 | 8.72680 | 8.68 | 26.3 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeSt50_fast_1s1x64d_pretrained.pdparams) | +| ResNeSt50 | 0.8083 | 0.9542 | 6.69042 | 8.01664 | 10.78 | 27.5 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeSt50_pretrained.pdparams) | +| RegNetX_4GF | 0.785 | 0.9416 | 6.46478 | 11.19862 | 8 | 22.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RegNetX_4GF_pretrained.pdparams) | + + + +### ViT_and_DeiT系列 + +ViT(Vision Transformer)与DeiT(Data-efficient Image Transformers)系列模型的精度、速度指标如下表所示. 更多关于该系列模型的介绍可以参考: [ViT_and_DeiT系列模型文档](./docs/zh_CN/models/ViT_and_DeiT.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|------------------------|-----------|-----------|------------------|------------------|----------|------------------------|------------------------| +| ViT_small_
patch16_224 | 0.7769 | 0.9342 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_small_patch16_224_pretrained.pdparams) | +| ViT_base_
patch16_224 | 0.8195 | 0.9617 | - | - | | 86 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_base_patch16_224_pretrained.pdparams) | +| ViT_base_
patch16_384 | 0.8414 | 0.9717 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_base_patch16_384_pretrained.pdparams) | +| ViT_base_
patch32_384 | 0.8176 | 0.9613 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_base_patch32_384_pretrained.pdparams) | +| ViT_large_
patch16_224 | 0.8323 | 0.9650 | - | - | | 307 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_large_patch16_224_pretrained.pdparams) | +| ViT_large_
patch16_384 | 0.8513 | 0.9736 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_large_patch16_384_pretrained.pdparams) | +| ViT_large_
patch32_384 | 0.8153 | 0.9608 | - | - | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ViT_large_patch32_384_pretrained.pdparams) | +| | | | | | | | | + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|------------------------|-----------|-----------|------------------|------------------|----------|------------------------|------------------------| +| DeiT_tiny_
patch16_224 | 0.718 | 0.910 | - | - | | 5 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_tiny_patch16_224_pretrained.pdparams) | +| DeiT_small_
patch16_224 | 0.796 | 0.949 | - | - | | 22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_small_patch16_224_pretrained.pdparams) | +| DeiT_base_
patch16_224 | 0.817 | 0.957 | - | - | | 86 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_patch16_224_pretrained.pdparams) | +| DeiT_base_
patch16_384 | 0.830 | 0.962 | - | - | | 87 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_patch16_384_pretrained.pdparams) | +| DeiT_tiny_
distilled_patch16_224 | 0.741 | 0.918 | - | - | | 6 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_tiny_distilled_patch16_224_pretrained.pdparams) | +| DeiT_small_
distilled_patch16_224 | 0.809 | 0.953 | - | - | | 22 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_small_distilled_patch16_224_pretrained.pdparams) | +| DeiT_base_
distilled_patch16_224 | 0.831 | 0.964 | - | - | | 87 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_distilled_patch16_224_pretrained.pdparams) | +| DeiT_base_
distilled_patch16_384 | 0.851 | 0.973 | - | - | | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DeiT_base_distilled_patch16_384_pretrained.pdparams) | +| | | | | | | | | + + + +### RepVGG系列 + +关于RepVGG系列模型的精度、速度指标如下表所示,更多介绍可以参考:[RepVGG系列模型文档](./docs/zh_CN/models/RepVGG.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------| +| RepVGG_A0 | 0.7131 | 0.9016 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_A0_pretrained.pdparams) | +| RepVGG_A1 | 0.7380 | 0.9146 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_A1_pretrained.pdparams) | +| RepVGG_A2 | 0.7571 | 0.9264 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_A2_pretrained.pdparams) | +| RepVGG_B0 | 0.7450 | 0.9213 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B0_pretrained.pdparams) | +| RepVGG_B1 | 0.7773 | 0.9385 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B1_pretrained.pdparams) | +| RepVGG_B2 | 0.7813 | 0.9410 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B2_pretrained.pdparams) | +| RepVGG_B1g2 | 0.7732 | 0.9359 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B1g2_pretrained.pdparams) | +| RepVGG_B1g4 | 0.7675 | 0.9335 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B1g4_pretrained.pdparams) | +| RepVGG_B2g4 | 0.7881 | 0.9448 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B2g4_pretrained.pdparams) | +| RepVGG_B3g4 | 0.7965 | 0.9485 | | | | | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RepVGG_B3g4_pretrained.pdparams) | + + + +### MixNet系列 + +关于MixNet系列模型的精度、速度指标如下表所示,更多介绍可以参考:[MixNet系列模型文档](./docs/zh_CN/models/MixNet.md)。 + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(M) | Params(M) | 下载地址 | +| -------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | +| MixNet_S | 0.7628 | 0.9299 | | | 252.977 | 4.167 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MixNet_S_pretrained.pdparams) | +| MixNet_M | 0.7767 | 0.9364 | | | 357.119 | 5.065 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MixNet_M_pretrained.pdparams) | +| MixNet_L | 0.7860 | 0.9437 | | | 579.017 | 7.384 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MixNet_L_pretrained.pdparams) | + + + +### ReXNet系列 + +关于ReXNet系列模型的精度、速度指标如下表所示,更多介绍可以参考:[ReXNet系列模型文档](./docs/zh_CN/models/ReXNet.md)。 + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | +| ReXNet_1_0 | 0.7746 | 0.9370 | | | 0.415 | 4.838 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_1_0_pretrained.pdparams) | +| ReXNet_1_3 | 0.7913 | 0.9464 | | | 0.683 | 7.611 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_1_3_pretrained.pdparams) | +| ReXNet_1_5 | 0.8006 | 0.9512 | | | 0.900 | 9.791 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_1_5_pretrained.pdparams) | +| ReXNet_2_0 | 0.8122 | 0.9536 | | | 1.561 | 16.449 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_2_0_pretrained.pdparams) | +| ReXNet_3_0 | 0.8209 | 0.9612 | | | 3.445 | 34.833 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ReXNet_3_0_pretrained.pdparams) | + + + +### SwinTransformer系列 + +关于SwinTransformer系列模型的精度、速度指标如下表所示,更多介绍可以参考:[SwinTransformer系列模型文档](./docs/zh_CN/models/SwinTransformer.md)。 + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | +| SwinTransformer_tiny_patch4_window7_224 | 0.8069 | 0.9534 | | | 4.5 | 28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_tiny_patch4_window7_224_pretrained.pdparams) | +| SwinTransformer_small_patch4_window7_224 | 0.8275 | 0.9613 | | | 8.7 | 50 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_small_patch4_window7_224_pretrained.pdparams) | +| SwinTransformer_base_patch4_window7_224 | 0.8300 | 0.9626 | | | 15.4 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window7_224_pretrained.pdparams) | +| SwinTransformer_base_patch4_window12_384 | 0.8439 | 0.9693 | | | 47.1 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window12_384_pretrained.pdparams) | +| SwinTransformer_base_patch4_window7_224[1] | 0.8487 | 0.9746 | | | 15.4 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window7_224_22kto1k_pretrained.pdparams) | +| SwinTransformer_base_patch4_window12_384[1] | 0.8642 | 0.9807 | | | 47.1 | 88 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_base_patch4_window12_384_22kto1k_pretrained.pdparams) | +| SwinTransformer_large_patch4_window7_224[1] | 0.8596 | 0.9783 | | | 34.5 | 197 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_large_patch4_window7_224_22kto1k_pretrained.pdparams) | +| SwinTransformer_large_patch4_window12_384[1] | 0.8719 | 0.9823 | | | 103.9 | 197 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_large_patch4_window12_384_22kto1k_pretrained.pdparams) | + +[1]:基于ImageNet22k数据集预训练,然后在ImageNet1k数据集迁移学习得到。 + + + +### 其他模型 + +关于AlexNet、SqueezeNet系列、VGG系列、DarkNet53等模型的精度、速度指标如下表所示,更多介绍可以参考:[其他模型文档](./docs/zh_CN/models/Others.md)。 + + +| 模型 | Top-1 Acc | Top-5 Acc | time(ms)
bs=1 | time(ms)
bs=4 | Flops(G) | Params(M) | 下载地址 | +|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------| +| AlexNet | 0.567 | 0.792 | 1.44993 | 2.46696 | 1.370 | 61.090 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/AlexNet_pretrained.pdparams) | +| SqueezeNet1_0 | 0.596 | 0.817 | 0.96736 | 2.53221 | 1.550 | 1.240 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_0_pretrained.pdparams) | +| SqueezeNet1_1 | 0.601 | 0.819 | 0.76032 | 1.877 | 0.690 | 1.230 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_1_pretrained.pdparams) | +| VGG11 | 0.693 | 0.891 | 3.90412 | 9.51147 | 15.090 | 132.850 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG11_pretrained.pdparams) | +| VGG13 | 0.700 | 0.894 | 4.64684 | 12.61558 | 22.480 | 133.030 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG13_pretrained.pdparams) | +| VGG16 | 0.720 | 0.907 | 5.61769 | 16.40064 | 30.810 | 138.340 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG16_pretrained.pdparams) | +| VGG19 | 0.726 | 0.909 | 6.65221 | 20.4334 | 39.130 | 143.650 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG19_pretrained.pdparams) | +| DarkNet53 | 0.780 | 0.941 | 4.10829 | 12.1714 | 18.580 | 41.600 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DarkNet53_pretrained.pdparams) | + + + +## 许可证书 +本项目的发布受Apache 2.0 license许可认证。 + + + +## 贡献代码 +我们非常欢迎你为PaddleClas贡献代码,也十分感谢你的反馈。 + +- 非常感谢[nblib](https://github.com/nblib)修正了PaddleClas中RandErasing的数据增广配置文件。 +- 非常感谢[chenpy228](https://github.com/chenpy228)修正了PaddleClas文档中的部分错别字。 +- 非常感谢[jm12138](https://github.com/jm12138)为PaddleClas添加ViT,DeiT系列模型和RepVGG系列模型。 +- 非常感谢[FutureSI](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/76563)对PaddleClas代码的解析与总结。 + +我们非常欢迎你为PaddleClas贡献代码,也十分感谢你的反馈。 From 8552c4e5edd1aa0b2a0d7588bc66c869673b8608 Mon Sep 17 00:00:00 2001 From: weishengyu Date: Tue, 15 Jun 2021 11:42:28 +0800 Subject: [PATCH 3/3] add doc info --- README_cn.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README_cn.md b/README_cn.md index 42d76cc74..34bdc13df 100644 --- a/README_cn.md +++ b/README_cn.md @@ -43,19 +43,23 @@ ## 文档教程 - [快速安装](./docs/zh_CN/tutorials/install.md) -- [图像识别快速体验] +- 图像识别快速体验(若愚) +- 图像分类快速体验(崔程,基于30分钟入门版修改) - 算法介绍 - - [图像识别系统] + - 图像识别系统] (胜禹) - [模型库介绍和预训练模型](./docs/zh_CN/models/models_intro.md) + - [图像分类] + - ImageNet分类任务(崔程,基于30分钟进阶版修改) + - [多标签分类任务]() - [特征学习] - - 商品识别 - - 车辆识别 - - logo识别 - - 动漫人物识别 - - [向量检索] + - [商品识别]() + - [车辆识别]() + - [logo识别]() + - [动漫人物识别]() + - [向量检索]() - 模型训练/评估 - - 图像分类任务 - - 特征学习任务 + - 图像分类任务(崔程,基于原有训练文档整理) + - 特征学习任务(陆彬) - 模型预测 - [基于训练引擎预测推理](./docs/zh_CN/tutorials/getting_started.md) - [基于Python预测引擎预测推理](./docs/zh_CN/tutorials/getting_started.md)