🤗🖼️ 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
A sentence aligner for comparable corpora

About Yalign is a tool for extracting parallel sentences from comparable corpora. Statistical Machine Translation relies on parallel corpora (eg.. eur

Machinalis 128 Aug 24, 2022
Faster, modernized fork of the language identification tool langid.py

py3langid py3langid is a fork of the standalone language identification tool langid.py by Marco Lui. Original license: BSD-2-Clause. Fork license: BSD

Adrien Barbaresi 12 Nov 05, 2022
ADCS - Automatic Defect Classification System (ADCS) for SSMC

Table of Contents Table of Contents ADCS Overview Summary Operator's Guide Demo System Design System Logic Training Mode Production System Flow Folder

Tam Zher Min 2 Jun 24, 2022
In this Notebook I've build some machine-learning and deep-learning to classify corona virus tweets, in both multi class classification and binary classification.

Hello, This Notebook Contains Example of Corona Virus Tweets Multi Class Classification. - Classes is: Extremely Positive, Positive, Extremely Negativ

Khaled Tofailieh 3 Dec 06, 2022
Ecco is a python library for exploring and explaining Natural Language Processing models using interactive visualizations.

Visualize, analyze, and explore NLP language models. Ecco creates interactive visualizations directly in Jupyter notebooks explaining the behavior of Transformer-based language models (like GPT2, BER

Jay Alammar 1.6k Dec 25, 2022
DeepPavlov Tutorials

DeepPavlov tutorials DeepPavlov: Sentence Classification with Word Embeddings DeepPavlov: Transfer Learning with BERT. Classification, Tagging, QA, Ze

Neural Networks and Deep Learning lab, MIPT 28 Sep 13, 2022
(ACL 2022) The source code for the paper "Towards Abstractive Grounded Summarization of Podcast Transcripts"

Towards Abstractive Grounded Summarization of Podcast Transcripts We provide the source code for the paper "Towards Abstractive Grounded Summarization

10 Jul 01, 2022
This project deals with a simplified version of a more general problem of Aspect Based Sentiment Analysis.

Aspect_Based_Sentiment_Extraction Created on: 5th Jan, 2022. This project deals with an important field of Natural Lnaguage Processing - Aspect Based

Naman Rastogi 4 Jan 01, 2023
基于百度的语音识别,用python实现,pyaudio+pyqt

Speech-recognition 基于百度的语音识别,python3.8(conda)+pyaudio+pyqt+baidu-aip 百度有面向python

J-L 1 Jan 03, 2022
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch

Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoenc

Venelin Valkov 1.8k Dec 31, 2022
TextFlint is a multilingual robustness evaluation platform for natural language processing tasks,

TextFlint is a multilingual robustness evaluation platform for natural language processing tasks, which unifies general text transformation, task-specific transformation, adversarial attack, sub-popu

TextFlint 587 Dec 20, 2022
Question answering app is used to answer for a user given question from user given text.

Question answering app is used to answer for a user given question from user given text.It is created using HuggingFace's transformer pipeline and streamlit python packages.

Siva Prakash 3 Apr 05, 2022
Python api wrapper for JellyFish Lights

Python api wrapper for JellyFish Lights The hope is to make this a pip installable package Current capabalilities: Connects to a local JellyFish Light

10 Dec 18, 2022
A library that integrates huggingface transformers with the world of fastai, giving fastai devs everything they need to train, evaluate, and deploy transformer specific models.

blurr A library that integrates huggingface transformers with version 2 of the fastai framework Install You can now pip install blurr via pip install

ohmeow 253 Dec 31, 2022
Use fastai-v2 with HuggingFace's pretrained transformers

FastHugs Use fastai v2 with HuggingFace's pretrained transformers, see the notebooks below depending on your task: Text classification: fasthugs_seq_c

Morgan McGuire 111 Nov 16, 2022
Grading tools for Advanced NLP (11-711)Grading tools for Advanced NLP (11-711)

Grading tools for Advanced NLP (11-711) Installation You'll need docker and unzip to use this repo. For docker, visit the official guide to get starte

Hao Zhu 2 Sep 27, 2022
Edge-Augmented Graph Transformer

Edge-augmented Graph Transformer Introduction This is the official implementation of the Edge-augmented Graph Transformer (EGT) as described in https:

Md Shamim Hussain 21 Dec 14, 2022
Machine learning models from Singapore's NLP research community

SG-NLP Machine learning models from Singapore's natural language processing (NLP) research community. sgnlp is a Python package that allows you to eas

AI Singapore | AI Makerspace 21 Dec 17, 2022
Just Another Telegram Ai Chat Bot Written In Python With Pyrogram.

OkaeriChatBot Just another Telegram AI chat bot written in Python using Pyrogram. Requirements Python 3.7 or higher.

Wahyusaputra 2 Dec 23, 2021
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.

Antlr Project 13.6k Jan 05, 2023