Image-to-Text
Transformers
Safetensors
PEFT
Khmer
florence2
image-text-to-text
image-captioning
florence-2
khmer
vision-language
lora
Instructions to use phonsobon/Images_captioning_fine_tune_Florence-2-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use phonsobon/Images_captioning_fine_tune_Florence-2-base 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="phonsobon/Images_captioning_fine_tune_Florence-2-base")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("phonsobon/Images_captioning_fine_tune_Florence-2-base") model = AutoModelForMultimodalLM.from_pretrained("phonsobon/Images_captioning_fine_tune_Florence-2-base", device_map="auto") - PEFT
How to use phonsobon/Images_captioning_fine_tune_Florence-2-base with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| { | |
| "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" | |
| } | |