Skip to main content

UniGaze: lightweight loader that pulls pretrained weights from Hugging Face

Project description

UniGaze Easy Loader

A tiny, dependency-light Python package to load UniGaze pretrained models from Hugging Face.

📦 Installation

Install a matching PyTorch first.

pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118
pip install timm==0.3.2
pip install unigaze

🚀 Quick Start

import torch
model = unigaze.load("unigaze_h14_joint", device="cuda")   # downloads weights from HF on first use
# Input: normalized batch (B, 3, 224, 224)
image_normalized_batch = torch.ones((10, 3, 224, 224), device="cuda")
# Output: {'pred_gaze': (B, 2)} with (pitch, yaw)
pred_gaze = model(image_normalized_batch)['pred_gaze']
print(pred_gaze.shape)  # torch.Size([10, 2])

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

unigaze-0.1.2.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

unigaze-0.1.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file unigaze-0.1.2.tar.gz.

File metadata

  • Download URL: unigaze-0.1.2.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for unigaze-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e52d80a185940cb3cbd60ee1d04877bf2c3ce93f47a073309f41b710a35b9eb8
MD5 287f755ba2fd2a238066b379374be0b1
BLAKE2b-256 ad3a013b6c2923d49374ca8691d90a3f285a329bfb1217eff1ffae1e791193fc

See more details on using hashes here.

File details

Details for the file unigaze-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: unigaze-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for unigaze-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e9fd0e95bc72a019240ad1e9129c0f8254ecbbaf164b9541d85e50aa72cfa41
MD5 d2832c32514fdf929df8a3941db60ace
BLAKE2b-256 516aa5dd0143c0162f8caa9cab00bc901625452e76e23d1e63645fbeae90108d

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