Practical overview
When it fits
Use Glasses when developing Python computer-vision experiments and you want a shared interface for pretrained models, model customization or documented interpretability workflows.
Who it is for
- Computer-vision developers comparing or prototyping with pretrained neural networks.
- Practitioners adapting image-classification models, including changing activations, class counts or encoder training status.
- Developers exploring model features or visual interpretations with Grad-CAM and saliency-map tools.
Documented uses
- Load a pretrained computer-vision model and its corresponding input transformation.
- Inspect which models are available and which are marked pretrained.
- Customize a classification model’s activation function or class count and freeze its encoder.
- Access internal encoder features and generate image-model interpretations.
Requirements & limits
The repository is public and identifies the project license as MIT. The README documents installation through pip from the Git repository.
- The README documents PyTorch imports and Python package installation with pip.
- Models are hosted on Hugging Face Hub; the example loads a pretrained ResNet and selects its named input transformation.
- The library describes shared APIs across models and documents classification and segmentation.
- Customization examples cover activation, class count and freezing the encoder; interpretability examples name Grad-CAM and SaliencyMap.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Glasses and load a pretrained model
Install the library and follow the documented example to load a pretrained ResNet and its matching input transform.
Before you start
- Python environment with pip
- PyTorch, imported by the documented example
Steps
Install Glasses with pip using the Git repository URL.
Import AutoModel and AutoTransform from glasses.models.
Load a pretrained model such as resnet18 with AutoModel.from_pretrained and set it to evaluation mode.
Select the matching transform with AutoTransform.from_name and request a summary on CPU.
Expected outcome
A pretrained model object, its named input transformation and a CPU model summary, as shown in the README example.
Guide limitations
- The README does not provide a complete environment specification or hardware requirements.
- This guide reflects the documented code example; it is not an execution test.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- FrancescoSaverioZuppichini/glasses · Official homepage title · retained in its source language

