Image Classification
KerasHub

Run this model with HF Jobs

Run keras/vgg_13_imagenet on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/keras/vgg_13_imagenet. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/keras/vgg_13_imagenet on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Model Overview

The VGG model is a type of convolutional neural network (CNN) architecture designed for image recognition and classification tasks. Developed by the Visual Geometry Group at the University of Oxford, it was introduced in the paper titled "Very Deep Convolutional Networks for Large-Scale Image Recognition" by Karen Simonyan and Andrew Zisserman in 2014. This model is supported in both KerasCV and KerasHub. KerasCV will no longer be actively developed, so please try to use KerasHub.

Links

Installation

Keras and KerasHub can be installed with:

pip install -U -q keras-Hub
pip install -U -q keras>=3

Jax, TensorFlow, and Torch come preinstalled in Kaggle Notebooks. For instructions on installing them in another environment see the Keras Getting Started page.

Presets

The following model checkpoints are provided by the Keras team. Weights have been ported from https://huggingface.co/timm.

Preset Name Parameters Description
vgg_11_imagenet 9.22M 11-layer VGG model pre-trained on the ImageNet 1k dataset at a 224x224 resolution.
vgg_13_imagenet 9.40M 13-layer VGG model pre-trained on the ImageNet 1k dataset at a 224x224 resolution.
vgg_16_imagenet 14.71M 16-layer VGG model pre-trained on the ImageNet 1k dataset at a 224x224 resolution.
vgg_19_imagenet 20.02M 19-layer VGG model pre-trained on the ImageNet 1k dataset at a 224x224 resolution.

Example Usage

input_data = np.ones(shape=(2, 224, 224, 3))

# Pretrained backbone
model = keras_hub.models.VGGBackbone.from_preset("vgg_13_imagenet")
model(input_data)

# Randomly initialized backbone with a custom config
model = keras_hub.models.VGGBackbone(
    stackwise_num_repeats=[2, 3, 3, 2],
    stackwise_num_filters=[64, 128, 256, 512],
)
model(input_data)

# Use VGG for image classification task
model = keras_hub.models.ImageClassifier.from_preset("vgg_13_imagenet")

# User Timm presets directly from HuggingFace
model = keras_hub.models.ImageClassifier.from_preset('hf://timm/vgg11.tv_in1k')

Example Usage with Hugging Face URI

input_data = np.ones(shape=(2, 224, 224, 3))

# Pretrained backbone
model = keras_hub.models.VGGBackbone.from_preset("hf://keras/vgg_13_imagenet")
model(input_data)

# Randomly initialized backbone with a custom config
model = keras_hub.models.VGGBackbone(
    stackwise_num_repeats=[2, 3, 3, 2],
    stackwise_num_filters=[64, 128, 256, 512],
)
model(input_data)

# Use VGG for image classification task
model = keras_hub.models.ImageClassifier.from_preset("hf://keras/vgg_13_imagenet")

# User Timm presets directly from HuggingFace
model = keras_hub.models.ImageClassifier.from_preset('hf://timm/vgg11.tv_in1k')
Downloads last month
11
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including keras/vgg_13_imagenet

Paper for keras/vgg_13_imagenet