Image-to-Text
Transformers
Safetensors
English
florence2
image-text-to-text
image-captioning
alt-text
accessibility
fashion
florence-2
Instructions to use MeghanaNanuvala/apparel-image-caption with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MeghanaNanuvala/apparel-image-caption with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="MeghanaNanuvala/apparel-image-caption")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("MeghanaNanuvala/apparel-image-caption") model = AutoModelForMultimodalLM.from_pretrained("MeghanaNanuvala/apparel-image-caption", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download processor_config.json from MeghanaNanuvala/apparel-image-caption: direct link, hf CLI and curl.
- Browser
- Download file 2.91 kB
-
https://huggingface.co/MeghanaNanuvala/apparel-image-caption/resolve/main/processor_config.json
- Command line
-
hf download hf://MeghanaNanuvala/apparel-image-caption/processor_config.json
-
curl -L -o processor_config.json https://huggingface.co/MeghanaNanuvala/apparel-image-caption/resolve/main/processor_config.json
2.91 kB
| { | |
| "image_processor": { | |
| "auto_map": { | |
| "AutoProcessor": "processing_florence2.Florence2Processor" | |
| }, | |
| "crop_size": { | |
| "height": 768, | |
| "width": 768 | |
| }, | |
| "do_center_crop": false, | |
| "do_convert_rgb": null, | |
| "do_normalize": true, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "image_mean": [ | |
| 0.485, | |
| 0.456, | |
| 0.406 | |
| ], | |
| "image_processor_type": "CLIPImageProcessor", | |
| "image_seq_length": 577, | |
| "image_std": [ | |
| 0.229, | |
| 0.224, | |
| 0.225 | |
| ], | |
| "resample": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": { | |
| "height": 768, | |
| "width": 768 | |
| } | |
| }, | |
| "num_additional_image_tokens": 0, | |
| "post_processor_config": { | |
| "bboxes": {}, | |
| "description_with_bboxes": {}, | |
| "description_with_bboxes_or_polygons": {}, | |
| "description_with_polygons": {}, | |
| "ocr": { | |
| "area_threshold": 0.0, | |
| "pattern": "(.+?)<loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)><loc_(\\d+)>" | |
| }, | |
| "phrase_grounding": { | |
| "banned_grounding_tokens": [ | |
| "it", | |
| "I", | |
| "me", | |
| "mine", | |
| "you", | |
| "your", | |
| "yours", | |
| "he", | |
| "him", | |
| "his", | |
| "she", | |
| "her", | |
| "hers", | |
| "they", | |
| "them", | |
| "their", | |
| "theirs", | |
| "one", | |
| "oneself", | |
| "we", | |
| "us", | |
| "our", | |
| "ours", | |
| "you", | |
| "your", | |
| "yours", | |
| "they", | |
| "them", | |
| "their", | |
| "theirs", | |
| "mine", | |
| "yours", | |
| "his", | |
| "hers", | |
| "its", | |
| "ours", | |
| "yours", | |
| "theirs", | |
| "myself", | |
| "yourself", | |
| "himself", | |
| "herself", | |
| "itself", | |
| "ourselves", | |
| "yourselves", | |
| "themselves", | |
| "this", | |
| "that", | |
| "these", | |
| "those", | |
| "who", | |
| "whom", | |
| "whose", | |
| "which", | |
| "what", | |
| "who", | |
| "whom", | |
| "whose", | |
| "which", | |
| "that", | |
| "all", | |
| "another", | |
| "any", | |
| "anybody", | |
| "anyone", | |
| "anything", | |
| "each", | |
| "everybody", | |
| "everyone", | |
| "everything", | |
| "few", | |
| "many", | |
| "nobody", | |
| "none", | |
| "one", | |
| "several", | |
| "some", | |
| "somebody", | |
| "someone", | |
| "something", | |
| "each other", | |
| "one another", | |
| "myself", | |
| "yourself", | |
| "himself", | |
| "herself", | |
| "itself", | |
| "ourselves", | |
| "yourselves", | |
| "themselves", | |
| "the image", | |
| "image", | |
| "images", | |
| "the", | |
| "a", | |
| "an", | |
| "a group", | |
| "other objects", | |
| "lots", | |
| "a set" | |
| ] | |
| }, | |
| "polygons": {}, | |
| "pure_text": {} | |
| }, | |
| "processor_class": "Florence2Processor" | |
| } | |