Models Subpackage

cv2_group.models.model_definitions.load_trained_model()

Always load the ‘local’ model from the Azure Model Registry using environment variables.

Returns:

The loaded Keras model from Azure Model Registry.

Return type:

keras.models.Model

cv2_group.models.model_saving.save_model(model, student_name, student_number, patch_size, suffix='wandb')

Saves the trained model to an HDF5 file using a standardized naming convention.

Parameters:
  • model (tensorflow.keras.Model) – The trained model to save.

  • student_name (str) – Your first name in lowercase.

  • student_number (str or int) – Your student number.

  • patch_size (int) – The patch size used in training.

  • suffix (str) – Optional suffix (e.g., ‘wandb’ or ‘v2’) for clarity.

Returns:

The file name the model was saved to.

Return type:

str