whylogs.core.image_profiling
¶
Module Contents¶
Classes¶
This is a class that computes image features and visits profiles and so image features can be sketched. |
Functions¶
|
|
|
Compute statistics data for a PIL Image |
|
Grab statistics data from a PIL ImageStats.Stat |
|
Attributes¶
- whylogs.core.image_profiling.logger¶
- whylogs.core.image_profiling.ImageType¶
- whylogs.core.image_profiling.DEFAULT_IMAGE_FEATURES = []¶
- whylogs.core.image_profiling._DEFAULT_TAGS_ATTRIBUTES = ['ImagePixelWidth', 'ImagePixelHeight', 'Colorspace']¶
- whylogs.core.image_profiling._IMAGE_HSV_CHANNELS = ['Hue', 'Saturation', 'Brightness']¶
- whylogs.core.image_profiling._STATS_PROPERTIES = ['mean', 'stddev']¶
- whylogs.core.image_profiling._DEFAULT_STAT_ATTRIBUTES¶
- whylogs.core.image_profiling._METADATA_DEFAULT_ATTRIBUTES¶
- whylogs.core.image_profiling.image_loader(path: str = None) PIL.Image.Image ¶
- class whylogs.core.image_profiling.TrackImage(filepath: str = None, img: PIL.Image.Image = None, feature_transforms: List[Callable] = DEFAULT_IMAGE_FEATURES, feature_name: str = '', metadata_attributes: Union[str, List[str]] = _METADATA_DEFAULT_ATTRIBUTES)¶
This is a class that computes image features and visits profiles and so image features can be sketched.
- feature_name¶
name given to this image feature, will prefix all image based features
- Type
str
- feature_transforms¶
Feature transforms to be apply to image data.
- Type
List[Callable]
- img¶
the PIL.Image
- Type
PIL.Image
- metadata_attributes¶
metadata attributes to track
- Type
TYPE
- __call__(self, profiles)¶
Call method to add image data and metadata to associated profiles :param profiles: DatasetProfile :type profiles: Union[List[DatasetProfile],DatasetProfile]
- whylogs.core.image_profiling.get_pil_image_statistics(img: PIL.Image.Image, channels: List[str] = _IMAGE_HSV_CHANNELS, image_stats: List[str] = _STATS_PROPERTIES) Dict ¶
Compute statistics data for a PIL Image
- Parameters
img (ImageType) – PIL Image
- Returns
of metadata
- Return type
Dict
- whylogs.core.image_profiling.get_pil_image_metadata(img: PIL.Image.Image) Dict ¶
Grab statistics data from a PIL ImageStats.Stat
- Parameters
img (ImageType) – PIL Image
- Returns
of metadata
- Return type
Dict
- whylogs.core.image_profiling.image_based_metadata(img)¶