Practical overview
When it fits
Use KerasHub when you want model architectures and pretrained checkpoints within the Keras 3 API, or want to fine-tune a supported model using JAX, TensorFlow or PyTorch.
Who it is for
- Keras developers choosing pretrained models for an application or experiment.
- Teams building text, image or audio generation and classification workflows.
- Practitioners fine-tuning models with JAX, TensorFlow or PyTorch.
Documented uses
- Browse pretrained model presets for a Keras 3 project.
- Run image classification with a pretrained ResNet model.
- Fine-tune a pretrained BERT classifier on IMDb movie reviews.
- Build a prototype around a pretrained model for text, image or audio tasks.
Requirements & limits
- KerasHub requires Keras 3; the README specifies Python 3.11 or newer.
- Choose and set the backend before importing Keras libraries.
- KerasHub installation pulls in TensorFlow for
tf.datapreprocessing, even when training uses another backend. - Underlying third-party pretrained models may have separate licenses from the library’s Apache-2.0 license.
- The README cautions that APIs may change during pre-release 0.y.z development.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install KerasHub and select a backend
Prepare a KerasHub environment with one of its documented backends.
Before you start
- Python 3.11 or newer, as indicated by the repository badge
- Keras 3
Steps
Install or upgrade KerasHub with the command below.
pip install --upgrade keras-hubSet
KERAS_BACKENDtojax,tensorflowortorchbefore importing Keras libraries.
Expected outcome
KerasHub is installed and configured to use the selected Keras backend.
Guide limitations
- Installation also pulls in TensorFlow for the
tf.datapreprocessing API. - The README warns that APIs may change during pre-release 0.y.z development.
Use a pretrained model for image classification
Load the documented ResNet preset and request a prediction for an image.
Before you start
- Keras 3 and KerasHub installed
- A configured JAX, TensorFlow or PyTorch backend
- NumPy and an image accessible to Keras image utilities
Steps
Create an
ImageClassifierfrom theresnet_50_imagenetpreset with softmax activation.Load an image using Keras image utilities and convert it to a NumPy array.
Call
predicton a batch containing the image and decode the ImageNet predictions.
Expected outcome
The classifier returns predictions that can be decoded as ImageNet labels.
Guide limitations
- The example uses the ImageNet ResNet preset; the README does not establish that every checkpoint is suitable for every image-classification task.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- keras-team/keras-hub · Official homepage title · retained in its source language

