Video Vit
Open source implementation of a vision transformer that can understand Videos using max vit as a foundation. This uses max vit as the backbone vit and then packs the video tensor into a 4d tensor which is the input to the maxvit model. Implementing this because the new McVit came out and I need more practice. This is fully ready to train and I believe would perform amazingly.
Installation
$ pip install video-vit
Usage
import torch
from video_vit.main import VideoViT
# Instantiate the VideoViT model with the specified parameters
model = VideoViT(
num_classes=10, # Number of output classes
dim=64, # Dimension of the token embeddings
depth=(2, 2, 2), # Depth of each stage in the model
dim_head=32, # Dimension of the attention head
window_size=7, # Size of the attention window
mbconv_expansion_rate=4, # Expansion rate of the Mobile Inverted Bottleneck block
mbconv_shrinkage_rate=0.25, # Shrinkage rate of the Mobile Inverted Bottleneck block
dropout=0.1, # Dropout rate
channels=3, # Number of input channels
)
# Create a random tensor with shape (batch_size, channels, frames, height, width)
x = torch.randn(1, 3, 10, 224, 224)
# Perform a forward pass through the model
output = model(x)
# Print the shape of the output tensor
print(output.shape)
License
MIT
Metadata
Release files for video-vit 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| video_vit-0.0.4.tar.gz | 7.1 kB | Without provenance | Details for video_vit-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| video_vit-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for video_vit-0.0.4-py3-none-any.whl |
Total release size: 14.3 kB
Release files / video_vit-0.0.4.tar.gz
| Download URL | video_vit-0.0.4.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4f031328fc1e856ca095bc7c2d392a0908d4733b5b93682971ffc78edd25f7c
|
|
BLAKE2b-256 checksum How to use checksums |
16ef2dd8b31e1629d6ca1d716c14322d03bd108637f6d82b0fea3fb5933e1321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Release files / video_vit-0.0.4-py3-none-any.whl
| Download URL | video_vit-0.0.4-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84966886036bb6e4d81f14db3b42283004699ab274b91849b070470be5d2943a
|
|
BLAKE2b-256 checksum How to use checksums |
fd018fc5570c1429f9f8c91bdb93cc435c452d4019aa2741c0d1b47145ba5d99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Security for video-vit 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.