Install Without Docker
The recommended way of installing blur is using Docker but can also be used without Docker.
#
Install- Download and Install Python >=3.8,<3.11 from https://www.python.org/downloads/
- Install Poetry using instructions from https://python-poetry.org/docs/#installing-with-the-official-installer.
- Extract the source code and models shared separately then open a terminal and navigate to the folder you extracted to.
- Dependencies are defined in
pyproject.toml
. Install them by running below command:poetry install --no-dev
#
UpgradeTo update to a newer version, just replace the existing source code with the new version.
#
RunBlur 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 ModeRun the script using the following command:
python cli.py --image=/tmp/images
Example Usage:
Blur Plates in a folder
export TOKEN=TOKENexport LICENSE_KEY=LICENSE_KEYpython cli.py --image=/tmp/images
Blur Plates and Faces in a folder
export TOKEN=TOKENexport LICENSE_KEY=LICENSE_KEYexport FACES=1python cli.py --image=/tmp/images
#
API ModeRun 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