stouputils.data_science.models.keras.convnext module#
ConvNeXt models implementation.
This module provides wrapper classes for the ConvNeXt family of models from the Keras applications. ConvNeXt models are a family of pure convolutional networks that match or outperform Vision Transformers (ViTs) while maintaining the simplicity and efficiency of CNNs.
Available models:
ConvNeXtTiny: Smallest variant with fewer parameters for resource-constrained environments
ConvNeXtSmall: Compact model balancing performance and size
ConvNeXtBase: Standard model with good performance for general use cases
ConvNeXtLarge: Larger model with higher capacity for complex tasks
ConvNeXtXLarge: Largest variant with maximum capacity for demanding applications
All models support transfer learning from ImageNet pre-trained weights.
- class ConvNeXtTiny(num_classes: int, kfold: int = 0, transfer_learning: str = 'imagenet', **override_params: Any)[source]#
Bases:
BaseKeras
ConvNeXtTiny implementation using advanced model class with common functionality. For information, refer to the ModelInterface class.
- class_routine(kfold: int = 0, transfer_learning: str = 'imagenet', verbose: int = 0, **override_params: Any) ModelInterface #
Run the full routine for ConvNeXtTiny model.
- Parameters:
dataset (Dataset) – Dataset to use for training and evaluation.
kfold (int) – K-fold cross validation index.
transfer_learning (str) – Pre-trained weights to use, can be “imagenet” or a dataset path like ‘data/pizza_not_pizza’.
verbose (int) – Verbosity level.
**kwargs (Any) – Additional arguments.
- Returns:
Trained model instance.
- Return type:
- class ConvNeXtSmall(num_classes: int, kfold: int = 0, transfer_learning: str = 'imagenet', **override_params: Any)[source]#
Bases:
BaseKeras
ConvNeXtSmall implementation using advanced model class with common functionality. For information, refer to the ModelInterface class.
- class_routine(kfold: int = 0, transfer_learning: str = 'imagenet', verbose: int = 0, **override_params: Any) ModelInterface #
Run the full routine for ConvNeXtSmall model.
- Parameters:
dataset (Dataset) – Dataset to use for training and evaluation.
kfold (int) – K-fold cross validation index.
transfer_learning (str) – Pre-trained weights to use, can be “imagenet” or a dataset path like ‘data/pizza_not_pizza’.
verbose (int) – Verbosity level.
**kwargs (Any) – Additional arguments.
- Returns:
Trained model instance.
- Return type:
- class ConvNeXtBase(num_classes: int, kfold: int = 0, transfer_learning: str = 'imagenet', **override_params: Any)[source]#
Bases:
BaseKeras
ConvNeXtBase implementation using advanced model class with common functionality. For information, refer to the ModelInterface class.
- class_routine(kfold: int = 0, transfer_learning: str = 'imagenet', verbose: int = 0, **override_params: Any) ModelInterface #
Run the full routine for ConvNeXtBase model.
- Parameters:
dataset (Dataset) – Dataset to use for training and evaluation.
kfold (int) – K-fold cross validation index.
transfer_learning (str) – Pre-trained weights to use, can be “imagenet” or a dataset path like ‘data/pizza_not_pizza’.
verbose (int) – Verbosity level.
**kwargs (Any) – Additional arguments.
- Returns:
Trained model instance.
- Return type:
- class ConvNeXtLarge(num_classes: int, kfold: int = 0, transfer_learning: str = 'imagenet', **override_params: Any)[source]#
Bases:
BaseKeras
ConvNeXtLarge implementation using advanced model class with common functionality. For information, refer to the ModelInterface class.
- class_routine(kfold: int = 0, transfer_learning: str = 'imagenet', verbose: int = 0, **override_params: Any) ModelInterface #
Run the full routine for ConvNeXtLarge model.
- Parameters:
dataset (Dataset) – Dataset to use for training and evaluation.
kfold (int) – K-fold cross validation index.
transfer_learning (str) – Pre-trained weights to use, can be “imagenet” or a dataset path like ‘data/pizza_not_pizza’.
verbose (int) – Verbosity level.
**kwargs (Any) – Additional arguments.
- Returns:
Trained model instance.
- Return type:
- class ConvNeXtXLarge(num_classes: int, kfold: int = 0, transfer_learning: str = 'imagenet', **override_params: Any)[source]#
Bases:
BaseKeras
ConvNeXtXLarge implementation using advanced model class with common functionality. For information, refer to the ModelInterface class.
- class_routine(kfold: int = 0, transfer_learning: str = 'imagenet', verbose: int = 0, **override_params: Any) ModelInterface #
Run the full routine for ConvNeXtXLarge model.
- Parameters:
dataset (Dataset) – Dataset to use for training and evaluation.
kfold (int) – K-fold cross validation index.
transfer_learning (str) – Pre-trained weights to use, can be “imagenet” or a dataset path like ‘data/pizza_not_pizza’.
verbose (int) – Verbosity level.
**kwargs (Any) – Additional arguments.
- Returns:
Trained model instance.
- Return type:
- model#
alias of
ConvNeXtXLarge