concept_models

Description

Concept model architectures and train eval handles for concept embedding analysis. The models defined here are assumed to accept activation map outputs of a main DNN as inputs. They can be attached to the main DNN using wrappers from the model_extension module.

The main model considered is ConceptDetectionModel2D, which is a single convolution (with options for better calibration). The following derivatives are pre-defined:

  • ConceptDetectionModel2D: The base concept model. Can be used for detection of concepts in an activation map region.

  • ConceptSegmentationModel2D: The base model with fixed kernel size of 1x1 for concept segmentation.

  • ConceptClassificationModel2D The base model but with a single output in the interval [0,1] (realized by setting the kernel size to the input size and turning padding off).

Sub-modules

concept_classification

Model for concept classification, and its training and evaluation handle.

concept_detection

Model for concept detection, and its training and evaluation handle.

concept_segmentation

Model for concept segmentation, and corresponding training and evaluation handle.