visfeats.memorability_resmem#
- visfeats.memorability_resmem(image: Image) float#
Estimate the intrinsic memorability of an image.
The image is converted to RGB, preprocessed with the ResMem transformer (resized to 227 x 227 and normalized), and passed through the pretrained ResMem network, a residual neural network trained to predict human memorability scores [1]. The model is loaded once per process and reused across calls.
This feature requires the optional
resmempackage, which is not installed by default (pip install resmem).- Parameters:
- image
Image Input image in any Pillow mode; converted to RGB internally.
- image
- Returns:
floatPredicted memorability score in [0, 1]; higher values indicate a more memorable image.
- Raises:
ImportErrorIf
resmempackage is not installed.
References
[1]Needell, C. D., & Bainbridge, W. A. (2022). Embracing new techniques in deep learning for estimating image memorability. Computational Brain & Behavior. https://doi.org/10.1007/s42113-022-00126-5