Comments (3)
Hi, for recognize open-set of tags, you can refer to "RAM Inference on Unseen Categories (Open-Set)" in README.md.
And thank you for providing such a concise and amazing code reference, and we will consider implementing this in the feature.
Best regards!
from recognize-anything.
Hi there,
Firstly, fantastic work and thank you for sharing!
Second, do you mind providing a small code example to recognize an open-set of tags?
Eg.
from ram import get_transform, inference_ram, inference_tag2text from ram.models import ram, tag2text_caption ram_model = ram(pretrained=ram_checkpoint, image_size=image_size, vit='swin_l').eval().to(device) # Setup image image = ... # Custom tags tags = ["house", "car", "pig"] # Perform inference result = inference_ram(model, image, custom_tags)
Hi, with PR #63 now you can set up custom dataset, whether for open-set or not. Please refer to the "Batch Inference and Evaluation" section of readme, and set up dataset following datasets/openimages-rare-200
.
Here are main steps of setting up datasets:
-
mkdir datasets/my_dataset/
. -
ln -s /path/to/image_folder datasets/my_dataset/imgs
. -
Create tag list
datasets/my_dataset/my_dataset_ram_taglist.txt
. This is where you put any custom tags. (But for closed-set, these tags should be subset of the label system, i.e., subset ofram/data/tam_tag_list.txt
.)my_tag_1 my_tag_2 my_tag_3
-
Create image list
datasets/my_dataset/my_dataset_ram_annots.txt
. Ignore annots if you don't care about metrics.subfolder1/subfolder2/aaa.jpg subfolder1/subfolder2/bbb.jpg,my_tag_2,my_tag_3
from recognize-anything.
hi @majinyu666, @xinyu1205,
I want to create my custom dataset for tag2text batch inference. But I saw that it has different format, tagidlist.txt
and idannots.txt
. Can you please show an example for each, what they refer to?
from recognize-anything.
Related Issues (20)
- Some questions about fine-tuning recognize-anything model HOT 1
- Relax transformers dependency version HOT 3
- Why is the tag and Caption text predicted by Tag2Text different? Why didn't Tag2Text use specific tags given by user?
- about training 4M dataset and the loss converge slowly HOT 3
- A question on embedding
- NameError: name '_C' is not defined HOT 1
- VisionTransformer undefined in ram.models.utils.py
- HuggingFace App is not working HOT 1
- Uncertain output results
- 【Bug】BertLayer should be used as a decoder model if cross attention is added
- finetuning on specific tag list
- How can I obtain the file ram_plus_swin_large_14m.pth? HOT 1
- how to form a ram_plus_tag_embedding_class_4585_des_51.pth for my own data. HOT 2
- Unable to proceed with command 'pip install -e .' HOT 2
- Can't load tokenizer for 'bert-base-uncased'
- tag_encoder and text_decoder HOT 1
- pip install error HOT 2
- Normalize image features while calculating the L1 loss
- i think it is the best to call it MAM(match-anything-model)
- CUDA out of memory error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recognize-anything.