CAVlib¶
CAVlib is a Python library that lets you use concept activation vectors (CAVs) in your own websites, apps and prototypes. It works with CAVs created in CAVstudio, or trained within CAVlib itself.
In only a few lines of code, CAVlib unlocks the power of meaningful visual AI interpretation for a host of potential new applications. CAVlib is designed to have a simple, Python API, that’s usable by developers - no ML experience needed!
What are CAVs?¶
CAVs are a lightweight way to train neural network ML models to recognise new visual concepts.
By taking existing pretrained models, CAVs can expose hidden understanding of inner layers of the model by finding the direction (a.k.a ‘vector’) of a concept in the high-dimensional embedding space. This is a simple form of transfer learning that produces surprisingly good results with tiny amounts of training data.
We’ve had success training CAVs using as few as 10-30 images. The resulting CAV is very lightweight - around 250kB - and can be deployed into a Python application using only a few lines of code.