🤗🖼️ 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
AudioCLIP Extending CLIP to Image, Text and Audio

AudioCLIP Extending CLIP to Image, Text and Audio This repository contains implementation of the models described in the paper arXiv:2106.13043. This

458 Jan 02, 2023
EasyTransfer is designed to make the development of transfer learning in NLP applications easier.

EasyTransfer is designed to make the development of transfer learning in NLP applications easier. The literature has witnessed the success of applying

Alibaba 819 Jan 03, 2023
[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

Yongming Rao 89 Dec 18, 2022
This repository contains the code for "Generating Datasets with Pretrained Language Models".

Datasets from Instructions (DINO 🦕 ) This repository contains the code for Generating Datasets with Pretrained Language Models. The paper introduces

Timo Schick 154 Jan 01, 2023
Text editor on python to convert english text to malayalam(Romanization/Transiteration).

Manglish Text Editor This is a simple transiteration (romanization ) program which is used to convert manglish to malayalam (converts njaan to ഞാൻ ).

Merin Rose Tom 1 May 11, 2022
A music comments dataset, containing 39,051 comments for 27,384 songs.

Music Comments Dataset A music comments dataset, containing 39,051 comments for 27,384 songs. For academic research use only. Introduction This datase

Zhang Yixiao 2 Jan 10, 2022
Official implementation of MLP Singer: Towards Rapid Parallel Korean Singing Voice Synthesis

MLP Singer Official implementation of MLP Singer: Towards Rapid Parallel Korean Singing Voice Synthesis. Audio samples are available on our demo page.

Neosapience 103 Dec 23, 2022
Learning General Purpose Distributed Sentence Representations via Large Scale Multi-task Learning

GenSen Learning General Purpose Distributed Sentence Representations via Large Scale Multi-task Learning Sandeep Subramanian, Adam Trischler, Yoshua B

Maluuba Inc. 309 Oct 19, 2022
Easy-to-use CPM for Chinese text generation

CPM 项目描述 CPM(Chinese Pretrained Models)模型是北京智源人工智能研究院和清华大学发布的中文大规模预训练模型。官方发布了三种规模的模型,参数量分别为109M、334M、2.6B,用户需申请与通过审核,方可下载。 由于原项目需要考虑大模型的训练和使用,需要安装较为复杂

382 Jan 07, 2023
pkuseg多领域中文分词工具; The pkuseg toolkit for multi-domain Chinese word segmentation

pkuseg:一个多领域中文分词工具包 (English Version) pkuseg 是基于论文[Luo et. al, 2019]的工具包。其简单易用,支持细分领域分词,有效提升了分词准确度。 目录 主要亮点 编译和安装 各类分词工具包的性能对比 使用方式 论文引用 作者 常见问题及解答 主要

LancoPKU 6k Dec 29, 2022
Linear programming solver for paper-reviewer matching and mind-matching

Paper-Reviewer Matcher A python package for paper-reviewer matching algorithm based on topic modeling and linear programming. The algorithm is impleme

Titipat Achakulvisut 66 Jul 05, 2022
The following links explain a bit the idea of semantic search and how search mechanisms work by doing retrieve and rerank

Main Idea The following links explain a bit the idea of semantic search and how search mechanisms work by doing retrieve and rerank Semantic Search Re

Sergio Arnaud Gomez 2 Jan 28, 2022
BookNLP, a natural language processing pipeline for books

BookNLP BookNLP is a natural language processing pipeline that scales to books and other long documents (in English), including: Part-of-speech taggin

654 Jan 02, 2023
Use PaddlePaddle to reproduce the paper:mT5: A Massively Multilingual Pre-trained Text-to-Text Transformer

MT5_paddle Use PaddlePaddle to reproduce the paper:mT5: A Massively Multilingual Pre-trained Text-to-Text Transformer English | 简体中文 mT5: A Massively

2 Oct 17, 2021
FastFormers - highly efficient transformer models for NLU

FastFormers FastFormers provides a set of recipes and methods to achieve highly efficient inference of Transformer models for Natural Language Underst

Microsoft 678 Jan 05, 2023
fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.

fastNLP fastNLP是一款轻量级的自然语言处理(NLP)工具包,目标是快速实现NLP任务以及构建复杂模型。 fastNLP具有如下的特性: 统一的Tabular式数据容器,简化数据预处理过程; 内置多种数据集的Loader和Pipe,省去预处理代码; 各种方便的NLP工具,例如Embedd

fastNLP 2.8k Jan 01, 2023
I label phrases on a scale of five values: negative, somewhat negative, neutral, somewhat positive, positive

I label phrases on a scale of five values: negative, somewhat negative, neutral, somewhat positive, positive. Obstacles like sentence negation, sarcasm, terseness, language ambiguity, and many others

1 Jan 13, 2022
multi-label,classifier,text classification,多标签文本分类,文本分类,BERT,ALBERT,multi-label-classification,seq2seq,attention,beam search

multi-label,classifier,text classification,多标签文本分类,文本分类,BERT,ALBERT,multi-label-classification,seq2seq,attention,beam search

hellonlp 30 Dec 12, 2022
Basic yet complete Machine Learning pipeline for NLP tasks

Basic yet complete Machine Learning pipeline for NLP tasks This repository accompanies the article on building basic yet complete ML pipelines for sol

Ivan 20 Aug 22, 2022
A python framework to transform natural language questions to queries in a database query language.

__ _ _ _ ___ _ __ _ _ / _` | | | |/ _ \ '_ \| | | | | (_| | |_| | __/ |_) | |_| | \__, |\__,_|\___| .__/ \__, | |_| |_| |___/

Machinalis 1.2k Dec 18, 2022