Skip to main content

transcv

transcv creates vision transformers for visual recognition which can be pre-trained using self-supervised learning

Acknowledgement

  1. Ross Wightman's repository for vision transformer
  2. Hugging Face
  3. DETR repository
  4. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  5. fastai
  6. nbdev

Install

pip install transcv

Along with transcv, we also need fastai and nbdev. So, it is recommended to use :

pip install fastai nbdev transcv -q --upgrade

How to use

An example for using the VisRecTrans class for getting a custom ViT model :

from transcv.visrectrans import VisRecTrans
vis_rec_ob = VisRecTrans('vit_small_patch16_224', 10, False)
model = vis_rec_ob.create_model()
vis_rec_ob.initialize(model)
embed_callback = vis_rec_ob.get_callback()

Now, the model, along with the embed_callback, can be used with the Learner class, of fastai, and can be fine-tuned on any image classification dataset.

An example for using the SwinT class for building a Swin transformer model :

from transcv.swin import SwinT
swint_ob = SwinT('swin_base_patch4_window7_224', pretrained = False, num_classes = 10)
swin_model = swint_ob.get_model()
assert isinstance(swin_model, nn.Sequential)

Now, the swin_model can be used with the Learner class, of fastai, and can be fine-tuned on any dataset for visual recognition task.

For a detailed description of the classes and methods, please refer to the documentation.

Metadata

Release files for transcv 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transcv 0.0.5
File Size Uploaded Provenance Actions
transcv-0.0.5.tar.gz 12.4 kB Without provenance Details for transcv-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for transcv 0.0.5
File Interpreter ABI Platform Actions
transcv-0.0.5-py3-none-any.whl Python 3 none any Details for transcv-0.0.5-py3-none-any.whl

Total release size: 23.4 kB

Release files / transcv-0.0.5.tar.gz

Download URL transcv-0.0.5.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
40cc934a65c56edb6b1adc2bc4bad5500109f515a7d43bd81d15d910769f764c
BLAKE2b-256 checksum
How to use checksums
329e048c019951d7f5c5cca1a5cf16a4781b64aee912e0cae006746e9ad4999c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

Release files / transcv-0.0.5-py3-none-any.whl

Download URL transcv-0.0.5-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddd2e844ca97667a7f904658e7736618621a4d593eefae88c63589cf3ee5d873
BLAKE2b-256 checksum
How to use checksums
71cd8c21161756d10c3472c7848f40fff32256b5b1289162dee0b071c66f8c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

Security for transcv 0.0.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page