Skip to content

Commit

Permalink
adding scaling/padding recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsBarryZ committed Nov 7, 2024
1 parent a3fa240 commit fc8310f
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.


If you are implementing your own computer use demo, we recommended using XGA resolution (1024x768):
- For higher resolutions, we recommend scaling the image down to XGA and letting the model generate coordinates within the 1024x768 coordinate system, then scaling the coordinates back to the original resolution proportionally.
- For lower resolutions or smaller devices (e.g. mobile), we recommend padding the screen with black pixels up to 1024X768.

## Development

```bash
Expand Down

0 comments on commit fc8310f

Please sign in to comment.