Skip to content

Commit

Permalink
adding scaling/padding recommendations (#166)
Browse files Browse the repository at this point in the history
* adding scaling/padding recommendations

* rewording
  • Loading branch information
ItsBarryZ authored Nov 8, 2024
1 parent a3fa240 commit eabba4b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions computer-use-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ docker run \
We do not recommend sending screenshots in resolutions above [XGA/WXGA](https://en.wikipedia.org/wiki/Display_resolution_standards#XGA) to avoid issues related to [image resizing](https://docs.anthropic.com/en/docs/build-with-claude/vision#evaluate-image-size).
Relying on the image resizing behavior in the API will result in lower model accuracy and slower performance than implementing scaling in your tools directly. The `computer` tool implementation in this project demonstrates how to scale both images and coordinates from higher resolutions to the suggested resolutions.


When implementing computer use yourself, we recommend using XGA resolution (1024x768):
- For higher resolutions: Scale the image down to XGA and let the model interact with this scaled version, then map the coordinates back to the original resolution proportionally.
- For lower resolutions or smaller devices (e.g. mobile devices): Add black padding around the display area until it reaches 1024x768.

## Development

```bash
Expand Down

0 comments on commit eabba4b

Please # to comment.