---
title: utils.patches API Reference
description: Explore and contribute to Ultralytics' utils/patches.py. Learn about the imread, imwrite, imshow, and torch_save functions.
keywords: Ultralytics, utils, patches, imread, imwrite, imshow, torch_save, OpenCV, PyTorch, GitHub
---

# Reference for `ultralytics/utils/patches.py`

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/patches.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/patches.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing) — thank you! 🙏

<br>

## ::: ultralytics.utils.patches.imread

<br><br><hr><br>

## ::: ultralytics.utils.patches.image_open

<br><br><hr><br>

## ::: ultralytics.utils.patches._imread_pil

<br><br><hr><br>

## ::: ultralytics.utils.patches.imwrite

<br><br><hr><br>

## ::: ultralytics.utils.patches.imshow

<br><br><hr><br>

## ::: ultralytics.utils.patches.torch_load

<br><br><hr><br>

## ::: ultralytics.utils.patches.torch_save

<br><br><hr><br>

## ::: ultralytics.utils.patches.arange_patch

<br><br><hr><br>

## ::: ultralytics.utils.patches.onnx_export_patch

<br><br><hr><br>

## ::: ultralytics.utils.patches.override_configs

<br><br>
