Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIP tweaks #2072

Merged
merged 5 commits into from
Sep 8, 2022
Merged

CLIP tweaks #2072

merged 5 commits into from
Sep 8, 2022

Conversation

brimoor
Copy link
Contributor

@brimoor brimoor commented Sep 8, 2022

Small editing pass over @Rusteam's amazing work from #1691.

Example usage below. Zero shot prediction is so cool 🔥 🤗

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset(
    "coco-2017",
    split="validation",
    max_samples=51,
    shuffle=True,
    seed=51,
)

# Make zero-shot predictions with custom classes!
model = foz.load_zoo_model(
    "clip-vit-base32-torch",
    text_prompt="A photo of a",
    classes=["person", "dog", "cat", "bird", "car", "tree", "chair"],
)

dataset.apply_model(model, label_field="predictions")

session = fo.launch_app(dataset)

Screen Shot 2022-09-08 at 1 26 12 PM

@brimoor brimoor added the cleaning Code cleaning label Sep 8, 2022
@brimoor brimoor requested review from ehofesmann and a team September 8, 2022 17:25
@brimoor brimoor self-assigned this Sep 8, 2022
Copy link
Member

@ehofesmann ehofesmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Very excited to have CLIP in the zoo!

@brimoor brimoor merged commit 480071c into develop Sep 8, 2022
@brimoor brimoor deleted the clip-tweaks branch September 8, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Code cleaning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants