Skip to main content

Install Without Docker

The recommended way of installing blur is using Docker but can also be used without Docker.

Install#

  1. Download and Install Python >=3.8,<3.11 from https://www.python.org/downloads/
  2. Install Poetry using instructions from https://python-poetry.org/docs/#installing-with-the-official-installer.
  3. Extract the source code and models shared separately then open a terminal and navigate to the folder you extracted to.
  4. Dependencies are defined in pyproject.toml. Install them by running below command:
      poetry install --no-dev

Upgrade#

To update to a newer version, just replace the existing source code with the new version.

Run#

Blur provides different modes of usage, Open a terminal in the folder containing the source code.
Before executing the script, Set the environment variables that are relevant to the run mode you want.

tip

On Linux, Set or update an environment variable like so export BLUR=1. Unset a variable like so unset BLUR

CLI Mode#

Run the script using the following command:

python cli.py --image=/tmp/images

Example Usage:

  1. Blur Plates in a folder

    export TOKEN=TOKENexport LICENSE_KEY=LICENSE_KEYpython cli.py --image=/tmp/images 
  2. Blur Plates and Faces in a folder

    export TOKEN=TOKENexport LICENSE_KEY=LICENSE_KEYexport FACES=1python cli.py --image=/tmp/images 

API Mode#

Run the script using the following command:

export FLASK_APP=api.pyflask run  -h 0.0.0.0 -p 8001

The REST API will be listening on port 8001