Vision Lab is a public template for computer vision deep learning research projects using TorchVision and Lightning AI's PyTorch Lightning.
Use Vision Lab to train or finetune the default torchvision Vision Transformer or make it your own by implementing a new model and dataset after cloning the repo.
You can fork Vision Lab with the use this template button.
Note
Vision Lab was featured by Weights and Biases in this community spotlight
visionlab.core
contains code for the Lightning Module and Trainer.
visionlab.components
contains experiment utilities grouped by purpose for cohesion.
visionlab.pipeline
contains code for data acquistion and preprocessing, and building a TorchDataset and LightningDataModule.
visionlab.serve
contains code for model serving APIs built with FastAPI.
visionlab.cli
contains code for the command line interface built with Typer and Rich.
visionlab.pages
contains code for data apps built with Streamlit.
visionlab.config
assists with project, trainer, and sweep configurations.
Vision Lab installs minimal requirements out of the box, and provides extras to make creating robust virtual environments easier. To view the requirements, in setup.cfg, see install_requires
for the base requirements and options.extras_require
for the available extras.
The recommended install is as follows:
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[all]"
Vision Lab also enables use of a CLI named lab
that is built with Typer. This CLI is available in the terminal after install. lab
's features can be viewed with:
lab --help
A fast dev run cab be ran with:
lab run dev
A longer demo run can be inititated with:
lab run demo