🤗🖼️ HuggingPics: Fine-tune Vision Transformers for anything using images found on the web.

Overview

🤗 🖼️ HuggingPics

Fine-tune Vision Transformers for anything using images found on the web.

Check out the video below for a walkthrough of this project! ⤵️

IMAGE ALT TEXT

Usage

Click on the link below to try it out:

Open In Colab

How does it work?

1. You define your search terms

pick search terms

2. We download ~150 images for each and use them to fine-tune a ViT

image search results

3. You push your model to HuggingFace's Hub to share your results with the world

push to hub

Your auto-generated model repo will look something like this. Pretty cool, eh? 😎

push to hub

Examples

💡 If you need some inspiration, take a look at the examples below:

nateraw/rare-puppers nateraw/pasta-pizza-ravioli nateraw/baseball-stadium-foods nateraw/denver-nyc-paris
term_1 samoyed pizza cotton candy denver
term_2 shiba inu pasta hamburger new york city
term_3 corgi ravioli hot dog paris
term_4 nachos
term_5 popcorn

You can see a full list of model repos created using this tool by clicking here

You might also like...
A Neural Language Style Transfer framework to transfer natural language text smoothly between fine-grained language styles like formal/casual, active/passive, and many more. Created by Prithiviraj Damodaran. Open to pull requests and other forms of collaboration. [ICCV 2021] Counterfactual Attention Learning for Fine-Grained Visual Categorization and Re-identification
[ICCV 2021] Counterfactual Attention Learning for Fine-Grained Visual Categorization and Re-identification

Counterfactual Attention Learning Created by Yongming Rao*, Guangyi Chen*, Jiwen Lu, Jie Zhou This repository contains PyTorch implementation for ICCV

A framework for evaluating Knowledge Graph Embedding Models in a fine-grained manner.

A framework for evaluating Knowledge Graph Embedding Models in a fine-grained manner.

:mag: Transformers at scale for question answering & neural search. Using NLP via a modular Retriever-Reader-Pipeline. Supporting DPR, Elasticsearch, HuggingFace's Modelhub...
:mag: Transformers at scale for question answering & neural search. Using NLP via a modular Retriever-Reader-Pipeline. Supporting DPR, Elasticsearch, HuggingFace's Modelhub...

Haystack is an end-to-end framework for Question Answering & Neural search that enables you to ... ... ask questions in natural language and find gran

Guide: Finetune GPT2-XL (1.5 Billion Parameters) and GPT-NEO (2.7 B) on a single 16 GB VRAM V100 Google Cloud instance with Huggingface Transformers using DeepSpeed

Guide: Finetune GPT2-XL (1.5 Billion Parameters) and GPT-NEO (2.7 Billion Parameters) on a single 16 GB VRAM V100 Google Cloud instance with Huggingfa

Composed Image Retrieval using Pretrained LANguage Transformers (CIRPLANT)
Composed Image Retrieval using Pretrained LANguage Transformers (CIRPLANT)

CIRPLANT This repository contains the code and pre-trained models for Composed Image Retrieval using Pretrained LANguage Transformers (CIRPLANT) For d

Document processing using transformers
Document processing using transformers

Doc Transformers Document processing using transformers. This is still in developmental phase, currently supports only extraction of form data i.e (ke

[ICCV 2021] Instance-level Image Retrieval using Reranking Transformers

Instance-level Image Retrieval using Reranking Transformers Fuwen Tan, Jiangbo Yuan, Vicente Ordonez, ICCV 2021. Abstract Instance-level image retriev

A method for cleaning and classifying text using transformers.

NLP Translation and Classification The repository contains a method for classifying and cleaning text using NLP transformers. Overview The input data

Comments
  • Can't instantiate abstract class Classifier with abstract methods forward

    Can't instantiate abstract class Classifier with abstract methods forward

    Hi

    Thank you for this straight forward codes for us to practice fine-tuning models with ViT. I'm on a project that classifying book covers. Everything goes well on my own dataset until trying to define classifier. An error message popped up "Can't instantiate abstract class Classifier with abstract methods forward". As I looked up the pytorch lightning code about forward(), it is indeed an abstract class. No idea why the error since the method was initiated in the init() method.

    image

    Has anyone run into this issue yet?

    opened by e-choness 5
  • Image search returns max 35 results

    Image search returns max 35 results

    Hi,

    The image search at https://huggingface.co/api/experimental/images/search returns max 35 results. Values lower than 35 in the "count" parameter are honored; values above 35 are ignored and 35 results are returned. Your great tutorial suggests that 150 results can be gathered through this API for each query. Has the image search API changed? Thank you!

    opened by dumbshow 4
  • Issue fitting the model - RuntimeError: Found dtype Long but expected Float

    Issue fitting the model - RuntimeError: Found dtype Long but expected Float

    I'm having an issue on fitting the model. Given your example, HuggingPics works just fine. However, when I attempted to train my own model with one class with iron man, I am having issues under the Training section, cell 2, in particular

    pl.seed_everything(42)
    classifier = Classifier(model, lr=2e-5)
    trainer = pl.Trainer(gpus=1, precision=16, max_epochs=4)
    trainer.fit(classifier, train_loader, val_loader) # ERROR HERE
    

    I tried to pin point the issue, but it was to no avail. First, I attempted to convert the encoding to a float in ImageClassificationCollator. However, that threw a new error for the same line,

    ValueError: The target has to be an integer tensor.

    I thought the error could be because of not enough classes, but that wasn't the case. I also thought it was because there wasn't enough data, but I I lowered the image count and your example processed fine.

    opened by Infinitay 3
  • Use latest HfApi.create_repo() parameter

    Use latest HfApi.create_repo() parameter

    Hi, it seems like HfApi.create_repo() parameters are updated and no longer treat 'name' as valid parameter. Made this PR to solve error when pushing model to huggingface hub

    TypeError: create_repo() got an unexpected keyword argument 'name'

    Screen Shot 2022-12-13 at 22 24 20 Screen Shot 2022-12-13 at 23 14 43
    opened by rizvand 0
Releases(v0.0.1)
  • v0.0.1(Nov 17, 2021)

    Add package huggingpics to PyPi, which lets you build imagefolders for anything from your local machine instead of just Colab.

    Cheers! 🍻

    Source code(tar.gz)
    Source code(zip)
Owner
Nathan Raw
Pretending to program
Nathan Raw
Fine-tune GPT-3 with a Google Chat conversation history

Google Chat GPT-3 This repo will help you fine-tune GPT-3 with a Google Chat conversation history. The trained model will be able to converse as one o

Nate Baer 7 Dec 10, 2022
Framework for fine-tuning pretrained transformers for Named-Entity Recognition (NER) tasks

NERDA Not only is NERDA a mesmerizing muppet-like character. NERDA is also a python package, that offers a slick easy-to-use interface for fine-tuning

Ekstra Bladet 141 Dec 30, 2022
spaCy-wrap: For Wrapping fine-tuned transformers in spaCy pipelines

spaCy-wrap: For Wrapping fine-tuned transformers in spaCy pipelines spaCy-wrap is minimal library intended for wrapping fine-tuned transformers from t

Kenneth Enevoldsen 32 Dec 29, 2022
A simple chatbot based on chatterbot that you can use for anything has basic features

Chatbotium A simple chatbot based on chatterbot that you can use for anything has basic features. I have some errors Read the paragraph below: Known b

Herman 1 Feb 16, 2022
Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

Flexible interface for high performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra. What is Lightning Tran

Pytorch Lightning 581 Dec 21, 2022
Python code for ICLR 2022 spotlight paper EViT: Expediting Vision Transformers via Token Reorganizations

Expediting Vision Transformers via Token Reorganizations This repository contain

Youwei Liang 101 Dec 26, 2022
Beyond Masking: Demystifying Token-Based Pre-Training for Vision Transformers

beyond masking Beyond Masking: Demystifying Token-Based Pre-Training for Vision Transformers The code is coming Figure 1: Pipeline of token-based pre-

Yunjie Tian 23 Sep 27, 2022
Multilingual Emotion classification using BERT (fine-tuning). Published at the WASSA workshop (ACL2022).

XLM-EMO: Multilingual Emotion Prediction in Social Media Text Abstract Detecting emotion in text allows social and computational scientists to study h

MilaNLP 35 Sep 17, 2022
Code for our ACL 2021 (Findings) Paper - Fingerprinting Fine-tuned Language Models in the wild .

?? Fingerprinting Fine-tuned Language Models in the wild This is the code and dataset for our ACL 2021 (Findings) Paper - Fingerprinting Fine-tuned La

LCS2-IIITDelhi 5 Sep 13, 2022