Repository: roboflow/supervision
File: src/supervision/detection/core.py (Python)

Code before:
                resolution_wh=(1000, 1000),
                classes=['cat', 'dog'],
            )
            detections.xyxy
            # array([[139., 768., 315., 954.], [366., 679., 536., 849.]])

            detections.class_id
            # array([0, 1])

            detections.data
            # {'class_name': array(['cat', 'dog'], dtype='<U10')}

            detections.class_id
            # array([0, 1])
            ```

        !!! example "Gemini 2.0"

            ??? tip "Prompt engineering"

                From Gemini 2.0 onwards, models are further trained to detect objects in
                an image and get their bounding box coordinates. The coordinates,
                relative to image dimensions, scale to [0, 1000]. You need to convert
                these normalized coordinates back to pixel coordinates based on your
                original image size.
                According to the [Gemini API documentation on image prompts](https://ai.google.dev/gemini-api/docs/vision?lang=python#image_prompts), when using
                a single image with text, the recommended approach is to place the text
                prompt after the image part in the `contents` array (for example,
                `contents=[image_part, text_part]`). This ordering has been shown to
                produce significantly better results in practice.

                To get the best results from Google Gemini 2.0, use the following prompt.

                ```
                Detect all the cats and dogs in the image. The box_2d should be
                [ymin, xmin, ymax, xmax] normalized to 0-1000.
                ```

            ```python
            import supervision as sv

            gemini_response_text = \"\"\"```json
                [
                    {"box_2d": [543, 40, 728, 200], "label": "cat", "id": 1},
                    {"box_2d": [653, 352, 820, 522], "label": "dog", "id": 2}
                ]
            ```\"\"\"

            detections = sv.Detections.from_vlm(
                sv.VLM.GOOGLE_GEMINI_2_0,
                gemini_response_text,

Review comment (suggestion):
```suggestion
                According to the [Gemini API documentation on image prompts](
                https://ai.google.dev/gemini-api/docs/vision?lang=python#image_prompts), when using
```

Code after:
                resolution_wh=(1000, 1000),
                classes=['cat', 'dog'],
            )
            detections.xyxy
            # array([[139., 768., 315., 954.], [366., 679., 536., 849.]])

            detections.class_id
            # array([0, 1])

            detections.data
            # {'class_name': array(['cat', 'dog'], dtype='<U10')}

            detections.class_id
            # array([0, 1])
            ```

        !!! example "Gemini 2.0"

            ??? tip "Prompt engineering"

                From Gemini 2.0 onwards, models are further trained to detect objects in
                an image and get their bounding box coordinates. The coordinates,
                relative to image dimensions, scale to [0, 1000]. You need to convert
                these normalized coordinates back to pixel coordinates based on your
                original image size.
                According to the [Gemini API documentation on image prompts](
                https://ai.google.dev/gemini-api/docs/vision?lang=python#image_prompts), when using
                a single image with text, the recommended approach is to place the text
                prompt after the image part in the `contents` array (for example,
                `contents=[image_part, text_part]`). This ordering has been shown to
                produce significantly better results in practice.

                To get the best results from Google Gemini 2.0, use the following prompt.

                ```
                Detect all the cats and dogs in the image. The box_2d should be
                [ymin, xmin, ymax, xmax] normalized to 0-1000.
                ```

            ```python
            import supervision as sv

            gemini_response_text = \"\"\"```json
                [
                    {"box_2d": [543, 40, 728, 200], "label": "cat", "id": 1},
                    {"box_2d": [653, 352, 820, 522], "label": "dog", "id": 2}
                ]
            ```\"\"\"

            detections = sv.Detections.from_vlm(
                sv.VLM.GOOGLE_GEMINI_2_0,