modlee.model.image_model module

Modlee model for images.

class modlee.model.image_model.ImageCallback(num_classes=2, *args, **kwargs)[source]

Bases: Callback

Saves accuracy. Deprecated

on_validation_batch_end(trainer: Trainer, pl_module: LightningModule, outputs: Tensor | Mapping[str, Any] | None, batch: Any, batch_idx: int, dataloader_idx: int = 0) None[source]

Called when the validation batch ends.

class modlee.model.image_model.ImageClassificationModleeModel(*args, **kwargs)[source]

Bases: ImageModleeModel

configure_callbacks()[source]

Configure image-specific callbacks.

class modlee.model.image_model.ImageModleeModel(task='classification', num_classes=None, *args, **kwargs)[source]

Bases: ModleeModel

Subclass of ModleeModel with image-specific convenience wrappers

  • Logs classification accuracy

  • Calculates data-specific data statistics

configure_callbacks()[source]

Configure image-specific callbacks.

class modlee.model.image_model.ImageSegmentationModleeModel(*args, **kwargs)[source]

Bases: ImageModleeModel

configure_callbacks()[source]

Configure image-specific callbacks.