# Remove an Image Background Using a Local Model

Remove the image background locally using the `u2net` model.

1. Check whether `uv` is available with `command -v uv`. If it is not installed, install it with:

   ```sh
   curl -LsSf https://astral.sh/uv/install.sh | sh
   export PATH="$HOME/.local/bin:$PATH"
   ```

2. Look for `input.png` in the current working directory. If it is not present, ask the user for the image filename or path and wait for their response.
3. Run the following command, replacing `input.png` with the image filename or path that was found or provided by the user:

   ```sh
   uvx --from "rembg[cpu,cli]" rembg i -m u2net "input.png" transparent.png
   ```

4. Confirm that `transparent.png` was created when the command completes.
