KerasHub

Model Overview

Model Summary

Xception introduces a novel CNN architecture that reinterprets Inception modules as a step toward depthwise separable convolutions โ€” operations consisting of a depthwise convolution followed by a pointwise convolution. By replacing Inception modules with these more efficient separable convolutions, Xception achieves superior performance, slightly surpassing Inception V3 on the ImageNet dataset and significantly outperforming it on a larger dataset with 350 million images and 17,000 classes. These improvements are achieved without increasing the number of model parameters, indicating a more effective utilization of the network's capacity.

Weights are released under the MIT License . Keras model code is released under the Apache 2 License.

Links

Installation

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.

Presets

The following model checkpoints are provided by the Keras team. Full code examples for each are available below.

Preset name Parameters Description
xception_41_imagenet 23 M 41-layer Xception model with 23 million parameters trained on ImageNet

Example Usage


# Pretrained Xception backbone.
model = keras_hub.models.XceptionBackbone.from_preset("xception_41_imagenet")
input_data = np.random.uniform(0, 1, size=(2, 299, 299, 3))
model(input_data)

# Randomly initialized Xception backbone with a custom config.
model = keras_hub.models.XceptionBackbone(
    stackwise_conv_filters=[[32, 64], [64, 128], [256, 256]],
    stackwise_pooling=[True, True, False],
)
model(input_data)

# Use Xception for image classification
model = keras_hub.models.ImageClassifier.from_preset("xception_41_imagenet")

Example Usage with Hugging Face URI


# Pretrained Xception backbone.
model = keras_hub.models.XceptionBackbone.from_preset("hf://keras/xception_41_imagenet")
input_data = np.random.uniform(0, 1, size=(2, 299, 299, 3))
model(input_data)

# Randomly initialized Xception backbone with a custom config.
model = keras_hub.models.XceptionBackbone(
    stackwise_conv_filters=[[32, 64], [64, 128], [256, 256]],
    stackwise_pooling=[True, True, False],
)
model(input_data)

# Use Xception for image classification
model = keras_hub.models.ImageClassifier.from_preset("hf://keras/xception_41_imagenet")

Downloads last month
17
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for keras/xception_41_imagenet

Finetunes
1 model

Collection including keras/xception_41_imagenet