Skip to main content

No project description provided

Project description

Visual transformer, based


You can import this module via

pip install vtransformer

How to use it?

  1. Configure config yaml file to work with model
  2. Module has 2 methods:
    1. run - use for training and testing model
    2. __call__ - use to classify images and utilize model Example of the code:
import VisionTransformer as ViT
import hydra
from pathlib import Path


@hydra.main(config_path="path_to_your_config", config_name="name_of_your_config")
def main(cfg):
   abspath = str(Path(__file__).parent.resolve()) + "/"  # Get absolute path, if your config works with relative paths
   model = ViT.Program(cfg, abspath)  # Create object of class Program to work with transformer

   model.run()  # Run config, that you wrote to train and test model

   arr = ["path1", "path2", "path3"]
   print(model(arr, False))  # Utilize model


if __name__ == "__main__":
   main()

Credits

Thanks for the idea and pretrained models to:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vtransformer-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vtransformer-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file vtransformer-0.1.0.tar.gz.

File metadata

  • Download URL: vtransformer-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for vtransformer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7e691b238b4b8f81e1e7675884e893e3f8e691b0719c3d6a8ce1788263ea1904
MD5 4df66c2532404704e154a826813b7f1f
BLAKE2b-256 dc620219fa32cfb9a2fa873c99134090d0b6c9ae6d65435a4d54988f2124ea50

See more details on using hashes here.

File details

Details for the file vtransformer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vtransformer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for vtransformer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eee655d20968f75f435dcfe03df20a35b37a2f626b1d696e5677c0ba4caa5d19
MD5 09c36ce4481ba3fac6a8cff3483d4266
BLAKE2b-256 741a27b0f0e1de908bc7b0ea9f060bb09433f288ee0f4c11b774eda872ed13d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page