A package for estimating image memorability
Project description
ViTMem
This package uses vision transformers in pytorch to estimate image memorability.
How to use
Install from the python package index
pip install vitmem
Estimate image memorability by providing a filename
from vitmem import ViTMem
model = ViTMem()
memorability = model("image.jpg")
print(f"Estimated memorability: {memorability}")
Estimate image memorability by providing a PIL Image object.
from PIL import Image
from vitmem import ViTMem
model = ViTMem()
image = Image.open("image.jpg")
memorability = model(image)
print(f"Estimated memorability: {memorability}")
Estimate image memorability by providing a transformed image tensor:
from PIL import Image
from vitmem import transform
from vitmem import ViTMem
model = ViTMem()
image = Image.open("image.jpg")
tensor = transform(image)
memorability = model(tensor)
print(f"Estimated memorability: {memorability}")
The model will attempt to use GPU/CUDA if available.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vitmem-1.0.1.tar.gz.
File metadata
- Download URL: vitmem-1.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bd02b5fc7b08d5efb9508d5ba714fabf594dd403f6665fa6257fed4194b6532
|
|
| MD5 |
d0db832cad3e8ff53c199db9e02e2b78
|
|
| BLAKE2b-256 |
6b291205937c5efc3d3362c03494b648e40b43117d23ab7494419afb3a743bfa
|
File details
Details for the file vitmem-1.0.1-py3-none-any.whl.
File metadata
- Download URL: vitmem-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27d7542e54b7240b559b1c452a93c94a9a0a24c143d4422fb49e3c634c89fe04
|
|
| MD5 |
4fb3d68d6fdad5531413a5ce58bfa0c6
|
|
| BLAKE2b-256 |
ebba938c1c9e266beacd947534ce5e296039802b40331878315d54f0354c92c5
|