Downloads · 30 days
10
5% of all-time downloads
keras/resnet_vd_50_imagenet
resnet_vd_50_imagenet is a image classification model from keras. Use it when you need a label for an image. It is set up for keras-hub. The card lists the license as apache-2.0.
Instantiates the ResNet architecture amended by “bag of tricks” modifications. Bag of Tricks for Image Classification with Convolutional Neural Networks
Downloads · 30 days
10
5% of all-time downloads
All-time downloads
209
Public
Repo size
198 MB
Likes
0
Public
Click a slice to open those files.
.h5198 MB · 100%
From the Hugging Face model README
Instantiates the ResNet architecture amended by “bag of tricks” modifications.
Bag of Tricks for Image Classification with Convolutional Neural Networks
ResNetVd introduces two key modifications to the standard ResNet. First, the initial convolutional layer is replaced by a series of three successive convolutional layers. Second, shortcut connections use an additional pooling operation rather than performing downsampling within the convolutional layers themselves.
Keras and KerasHub can be installed with:
pip install -U -q keras-hub
pip install -U -q keras
Jax, TensorFlow, and Torch come preinstalled in Kaggle Notebooks. For instructions on installing them in another environment see the Keras Getting Started page.
The following model checkpoints are provided by the Keras team.Weights have been ported from: PaddleOCR. Full code examples for each are available below.
| Preset name | Parameters | Description |
|---|---|---|
resnet_vd_18_imagenet | 11.72M | 18-layer ResNetVD model pre-trained on the ImageNet 1k dataset at a 224x224 resolution. |
resnet_vd_34_imagenet | 21.84M | 34-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution. |
resnet_vd_50_imagenet | 25.63M | 50-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution. |
resnet_vd_50_ssld_imagenet | 25.63M | 50-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution with knowledge distillation. |
resnet_vd_50_ssld_v2_imagenet | 25.63M | 50-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution with knowledge distillation and AutoAugment. |
resnet_vd_50_ssld_v2_fix_imagenet | 25.63M | 50-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution with knowledge distillation, AutoAugment and additional fine-tuning of the classification head. |
resnet_vd_101_imagenet | 44.67M | 101-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution. |
resnet_vd_101_ssld_imagenet | 44.67M | 101-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution with knowledge distillation. |
resnet_vd_152_imagenet | 60.36M | 152-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution. |
resnet_vd_200_imagenet | 74.93M | 200-layer ResNet model pre-trained on the ImageNet 1k dataset at a 224x224 resolution. |
from keras_hub.models import ResNetBackbone
import keras
import numpy as np
input_data = np.ones(shape=(8, 224, 224, 3))
# Pretrained backbone
model = ResNetBackbone.from_preset("resnet_vd_50_imagenet")
output = model(input_data)
# Randomly initialized backbone with a custom config
model = ResNetBackbone(
input_conv_filters=[32, 32, 64],
input_conv_kernel_sizes=[3, 3, 3],
stackwise_num_filters=[64, 128, 256, 512],
stackwise_num_blocks=[3, 4, 5, 6],
stackwise_num_strides=[1, 2, 2, 2],
block_type="bottleneck_block_vd",
)
output = model(input_data)
from keras_hub.models import ResNetBackbone
import keras
import numpy as np
input_data = np.ones(shape=(8, 224, 224, 3))
# Pretrained backbone
model = ResNetBackbone.from_preset("hf://keras/resnet_vd_50_imagenet")
output = model(input_data)
# Randomly initialized backbone with a custom config
model = ResNetBackbone(
input_conv_filters=[32, 32, 64],
input_conv_kernel_sizes=[3, 3, 3],
stackwise_num_filters=[64, 128, 256, 512],
stackwise_num_blocks=[3, 4, 5, 6],
stackwise_num_strides=[1, 2, 2, 2],
block_type="bottleneck_block_vd",
)
output = model(input_data)