How innat/videoswin works
Project type and purpose
• Video Swin Transformer is an open-source Python library that implements the “Video Swin” pure-transformer video classification model in Keras 3 and allows users to run it on TensorFlow, PyTorch, or JAX backends.
• It provides model definitions, utilities for loading weights and running inference, and a set of Jupyter-based guides for evaluation, fine-tuning, and ONNX conversion.
File structure
• Top-level package “videoswin/” contains all core code:
• backbone.py – high-level API for backbones
• model.py – classification model assembly using blocks and layers
• model_configs.py – hyperparameter presets (“tiny”, “small”, “base”)
• blocks/ – building-block definitions (basic, Swin Transformer block)
• layers/ – low-level layers (attention, MLP, patch-embed, patch-merging, drop-path)
• utils.py – helper routines (frame sampling, video reading, rescaling)
• setup.py & requirements*.txt – installation and dependency management
• data/ – label maps (CSV) for Kinetics and Something Something v2
• guides/ – Jupyter notebooks illustrating usage, benchmarks, fine-tuning, conversion
• test/ – unit tests for backbone, classifier, layers
• .github/ – CI workflows and issue templates
• assets/ – README images and teaser GIF
• MODEL_ZOO.md – pointers to pretrained weights
README for additional insights
• It emphasizes extensibility (skip weights mismatch, partial loading) and conversion to ONNX.