🤗🖼️ 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 Streamlit web app that generates Rick and Morty stories using GPT2.

Rick and Morty Story Generator This project uses a pre-trained GPT2 model, which was fine-tuned on Rick and Morty transcripts, to generate new stories

₸ornike 33 Oct 13, 2022
Implementation of Natural Language Code Search in the project CodeBERT: A Pre-Trained Model for Programming and Natural Languages.

CodeBERT-Implementation In this repo we have replicated the paper CodeBERT: A Pre-Trained Model for Programming and Natural Languages. We are interest

Tanuj Sur 4 Jul 01, 2022
NLP library designed for reproducible experimentation management

Welcome to the Transfer NLP library, a framework built on top of PyTorch to promote reproducible experimentation and Transfer Learning in NLP You can

Feedly 290 Dec 20, 2022
Dual languaged (rus+eng) tool for packing and unpacking archives of Silky Engine.

SilkyArcTool English Dual languaged (rus+eng) GUI tool for packing and unpacking archives of Silky Engine. It is not the same arc as used in Ai6WIN. I

Tester 5 Sep 15, 2022
The repository for the paper: Multilingual Translation via Grafting Pre-trained Language Models

Graformer The repository for the paper: Multilingual Translation via Grafting Pre-trained Language Models Graformer (also named BridgeTransformer in t

22 Dec 14, 2022
Pytorch version of BERT-whitening

BERT-whitening This is the Pytorch implementation of "Whitening Sentence Representations for Better Semantics and Faster Retrieval". BERT-whitening is

Weijie Liu 255 Dec 27, 2022
ConferencingSpeech2022; Non-intrusive Objective Speech Quality Assessment (NISQA) Challenge

ConferencingSpeech 2022 challenge This repository contains the datasets list and scripts required for the ConferencingSpeech 2022 challenge. For more

21 Dec 02, 2022
基于Transformer的单模型、多尺度的VAE模型

UniVAE 基于Transformer的单模型、多尺度的VAE模型 介绍 https://kexue.fm/archives/8475 依赖 需要大于0.10.6版本的bert4keras(当前还没有推到pypi上,可以直接从GitHub上clone最新版)。 引用 @misc{univae,

苏剑林(Jianlin Su) 49 Aug 24, 2022
A framework for cleaning Chinese dialog data

A framework for cleaning Chinese dialog data

Yida 136 Dec 20, 2022
NLP-based analysis of poor Chinese movie reviews on Douban

douban_embedding 豆瓣中文影评差评分析 1. NLP NLP(Natural Language Processing)是指自然语言处理,他的目的是让计算机可以听懂人话。 下面是我将2万条豆瓣影评训练之后,随意输入一段新影评交给神经网络,最终AI推断出的结果。 "很好,演技不错

3 Apr 15, 2022
Mlcode - Continuous ML API Integrations

mlcode Basic APIs for ML applications. Django REST Application Contains REST API

Sujith S 1 Jan 01, 2022
Code for the Findings of NAACL 2022(Long Paper): AdapterBias: Parameter-efficient Token-dependent Representation Shift for Adapters in NLP Tasks

AdapterBias: Parameter-efficient Token-dependent Representation Shift for Adapters in NLP Tasks arXiv link: upcoming To be published in Findings of NA

Allen 16 Nov 12, 2022
Officile code repository for "A Game-Theoretic Perspective on Risk-Sensitive Reinforcement Learning"

CvarAdversarialRL Official code repository for "A Game-Theoretic Perspective on Risk-Sensitive Reinforcement Learning". Initial setup Create a virtual

Mathieu Godbout 1 Nov 19, 2021
A pytorch implementation of the ACL2019 paper "Simple and Effective Text Matching with Richer Alignment Features".

RE2 This is a pytorch implementation of the ACL 2019 paper "Simple and Effective Text Matching with Richer Alignment Features". The original Tensorflo

286 Jan 02, 2023
Pipeline for chemical image-to-text competition

BMS-Molecular-Translation Introduction This is a pipeline for Bristol-Myers Squibb – Molecular Translation by Vadim Timakin and Maksim Zhdanov. We got

Maksim Zhdanov 7 Sep 20, 2022
Fastseq 基于ONNXRUNTIME的文本生成加速框架

Fastseq 基于ONNXRUNTIME的文本生成加速框架

Jun Gao 9 Nov 09, 2021
Multiple implementations for abstractive text summurization , using google colab

Text Summarization models if you are able to endorse me on Arxiv, i would be more than glad https://arxiv.org/auth/endorse?x=FRBB89 thanks This repo i

463 Dec 26, 2022
The SVO-Probes Dataset for Verb Understanding

The SVO-Probes Dataset for Verb Understanding This repository contains the SVO-Probes benchmark designed to probe for Subject, Verb, and Object unders

DeepMind 20 Nov 30, 2022
☀️ Measuring the accuracy of BBC weather forecasts in Honolulu, USA

Accuracy of BBC Weather forecasts for Honolulu This repository records the forecasts made by BBC Weather for the city of Honolulu, USA. Essentially, t

Max Halford 12 Oct 15, 2022
The PyTorch based implementation of continuous integrate-and-fire (CIF) module.

CIF-PyTorch This is a PyTorch based implementation of continuous integrate-and-fire (CIF) module for end-to-end (E2E) automatic speech recognition (AS

Minglun Han 24 Dec 29, 2022