stouputils.data_science.models.sandbox module#

Sandbox model implementation. (Where I try strange things)

Tested:

  • ConvNeXtBase with input_shape=(1024, 1024, 3)

  • Custom CNN architecture for implant classification (fixed / not fixed)

class Sandbox(num_classes: int, kfold: int = 0, transfer_learning: str = 'imagenet', **override_params: Any)[source]#

Bases: BaseKeras

Sandbox implementation using advanced model class with common functionality. For information, refer to the ModelInterface class.

custom_architecture() Model[source]#

Create a custom architecture for implant classification.

This model uses a series of convolutional blocks with increasing depth, batch normalization, spatial and regular dropout for regularization. It’s designed to detect features relevant to implant fixation status.

Note: This is a custom architecture that does not use transfer learning. The transfer_learning attribute is ignored.

Returns:

A Keras model without top layers for implant classification

Return type:

Model

class_routine(kfold: int = 0, transfer_learning: str = 'imagenet', verbose: int = 0, **override_params: Any) ModelInterface#

Run the full routine for Sandbox 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:

Sandbox

model#

alias of Sandbox