Zero-Shot Image Classification
Transformers
Safetensors
English
Chinese
fgclip2
text-generation
clip
custom_code
Instructions to use qihoo360/fg-clip2-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qihoo360/fg-clip2-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="qihoo360/fg-clip2-base", trust_remote_code=True) pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("qihoo360/fg-clip2-base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Improve FG-CLIP 2 model card: Add Chinese language, project page, and enhanced sample usage
#1
by nielsr HF Staff - opened
This PR aims to improve the FG-CLIP 2 model card by:
- Adding
zhto thelanguagemetadata, as the model is explicitly designed for bilingual (English and Chinese) fine-grained vision-language understanding, as stated in the paper abstract and GitHub README. - Including a direct link to the project page (
https://360cvgroup.github.io/FG-CLIP) for better discoverability. - Incorporating an overview image (
FGCLIP2_compare_all_n.png) from the original GitHub repository to visually summarize the model's performance. - Updating the "Retrieval" sample usage section with bilingual (Chinese) captions,
max_length=196, andwalk_type="long"to better showcase the model's fine-grained and long-caption capabilities, consistent with the GitHub README. A corresponding output image (cn_re_demo.png) is also added. - Updating the "Dense feature effect display" sample usage with bilingual captions from the GitHub README.
- Ensuring all image links in the markdown content use absolute Hugging Face repository URLs for correct rendering on the Hub.
These changes enhance the model card's completeness and clarity, making it more informative and useful for users on the Hugging Face platform.
qingshan777 changed pull request status to merged