monsoon-nlp / eyegazer-vit-binary

huggingface.co
Total runs: 14
24-hour runs: 0
7-day runs: -1
30-day runs: -2
Model's Last Updated: November 04 2023

Introduction of eyegazer-vit-binary

Model Details of eyegazer-vit-binary

LoRA Image Binary Classification LoRA adapter

Trained on APTOS 2019 Kaggle competition for identifying diabetic retinopathy. In this case I've modified the problem to binary classifier (diagnosis=0 vs. all others; 50-50% distribution in training data)

Base Model: google/vit-large-patch16-224

Dataset: https://www.kaggle.com/c/aptos2019-blindness-detection - fundus images of the back of the eye, and diabetic retinopathy score

Training notebook: https://colab.research.google.com/drive/1TVsUyyou87E26Sz40CdBH3CzWoVckgtq?usp=sharing

On 10% held-out of training data: accuracy 98%

  • PEFT 0.5.0

PEFT Image classifier inference / Gradio app

from peft import PeftModel
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForImageClassification

from torchvision.transforms import (
    CenterCrop,
    Compose,
    Normalize,
    RandomHorizontalFlip,
    RandomResizedCrop,
    Resize,
    ToTensor,
)

model_name = 'google/vit-large-patch16-224'
adapter = 'monsoon-nlp/eyegazer-vit-binary'

image_processor = AutoImageProcessor.from_pretrained(model_name)

normalize = Normalize(mean=image_processor.image_mean, std=image_processor.image_std)
train_transforms = Compose(
    [
        RandomResizedCrop(image_processor.size["height"]),
        RandomHorizontalFlip(),
        ToTensor(),
        normalize,
    ]
)

val_transforms = Compose(
    [
        Resize(image_processor.size["height"]),
        CenterCrop(image_processor.size["height"]),
        ToTensor(),
        normalize,
    ]
)

model = AutoModelForImageClassification.from_pretrained(
    model_name,
    ignore_mismatched_sizes=True,
    num_labels=2,
)

lora_model = PeftModel.from_pretrained(model, adapter)

img = Image.open("sample.png")
pimg = val_transforms(img.convert("RGB"))
batch = pimg.unsqueeze(0)
op = lora_model(batch)
vals = op.logits.tolist()[0]

if vals[0] > vals[1]:
    return "Predicted unaffected"
else:
    return "Predicted affected to some degree"
Future goals
  • More documentation
  • Modify loss for regression on 0-4 score

Runs of monsoon-nlp eyegazer-vit-binary on huggingface.co

14
Total runs
0
24-hour runs
0
3-day runs
-1
7-day runs
-2
30-day runs

More Information About eyegazer-vit-binary huggingface.co Model

eyegazer-vit-binary huggingface.co

eyegazer-vit-binary huggingface.co is an AI model on huggingface.co that provides eyegazer-vit-binary's model effect (), which can be used instantly with this monsoon-nlp eyegazer-vit-binary model. huggingface.co supports a free trial of the eyegazer-vit-binary model, and also provides paid use of the eyegazer-vit-binary. Support call eyegazer-vit-binary model through api, including Node.js, Python, http.

eyegazer-vit-binary huggingface.co Url

https://huggingface.co/monsoon-nlp/eyegazer-vit-binary

monsoon-nlp eyegazer-vit-binary online free

eyegazer-vit-binary huggingface.co is an online trial and call api platform, which integrates eyegazer-vit-binary's modeling effects, including api services, and provides a free online trial of eyegazer-vit-binary, you can try eyegazer-vit-binary online for free by clicking the link below.

monsoon-nlp eyegazer-vit-binary online free url in huggingface.co:

https://huggingface.co/monsoon-nlp/eyegazer-vit-binary

eyegazer-vit-binary install

eyegazer-vit-binary is an open source model from GitHub that offers a free installation service, and any user can find eyegazer-vit-binary on GitHub to install. At the same time, huggingface.co provides the effect of eyegazer-vit-binary install, users can directly use eyegazer-vit-binary installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

eyegazer-vit-binary install url in huggingface.co:

https://huggingface.co/monsoon-nlp/eyegazer-vit-binary

Url of eyegazer-vit-binary

eyegazer-vit-binary huggingface.co Url

Provider of eyegazer-vit-binary huggingface.co

monsoon-nlp
ORGANIZATIONS

Other API from monsoon-nlp

huggingface.co

Total runs: 57
Run Growth: 34
Growth Rate: 59.65%
Updated:September 03 2023
huggingface.co

Total runs: 28
Run Growth: 10
Growth Rate: 40.00%
Updated:February 03 2025
huggingface.co

Total runs: 24
Run Growth: 16
Growth Rate: 66.67%
Updated:February 25 2025
huggingface.co

Total runs: 7
Run Growth: -8
Growth Rate: -114.29%
Updated:May 23 2021