class FID
Source code in aigve/metrics/video_quality_assessment/distribution_based/fid.py
__init__(model_name='inception_v3', input_shape=(299, 299, 3), pooling='avg')
Initialize the FIDScore evaluator.
Parameters: model_name (str): The model to use for feature extraction (default: 'inception_v3'). input_shape (tuple): Input shape of the images (default: (299, 299, 3)). pooling (str): Pooling type to use ('avg' or 'max') (default: 'avg').
Source code in aigve/metrics/video_quality_assessment/distribution_based/fid.py
calculate_fid(images1, images2)
Calculate the FID score between two sets of images.
Parameters: images1 (numpy array): First set of images. images2 (numpy array): Second set of images.
Returns: float: The FID score.
Source code in aigve/metrics/video_quality_assessment/distribution_based/fid.py
calculate_statistics(images)
Calculate the feature statistics (mean and covariance) for a set of images.
Parameters: images (numpy array): Preprocessed images.
Returns: tuple: Mean and covariance of the features.
Source code in aigve/metrics/video_quality_assessment/distribution_based/fid.py
preprocess_images(images)
Preprocess the images for the InceptionV3 model.
Parameters: images (numpy array): Input images.
Returns: numpy array: Preprocessed images.