All You Need to Know About Florence-2!
Change the prompt, keep the image
Give Florence-2 a photograph and ask for a caption, and the answer is a sequence of words. Ask for object detection on the same photograph, and the answer also includes tokens representing positions. Encoding positions in the output sequence allows the same decoder to express a sentence or the coordinates of a box.
From pixels to positions
A DaViT image encoder extracts visual features. Those features and the task prompt enter a sequence-to-sequence model that produces the requested output. For a detection task, a postprocessor converts the location tokens into image coordinates. This last step matters when drawing predictions back on the original image.
Why the annotations matter
Florence-2’s training collection, FLD-5B, includes image descriptions, region descriptions, and pixel-level annotations. A single photograph can support several tasks. A caption teaches what is happening across the scene, while a grounded description teaches which part of it the words refer to.