Skip to main content

remotecv is an OpenCV worker for facial and feature recognition

Project description

Coverage Status

RemoteCV

RemoteCV is a queued mechanism to run OpenCV computations and store them for later usage.

Currently, Thumbor uses remotecv to outsource facial or feature detection, but nothing stops you from integrating it into your product.

RemoteCV supports both PyRes and Celery for queueing back-end.

Install

pip install remotecv

Run local

Clone the repository:

git clone https://github.com/thumbor/remotecv.git

Create a virtualenv:

cd remotecv
mkvirtualenv remotecv

Install dependencies:

make setup

Run:

make run

After installing the project, you can execute

remotecv

If you want a healthcheck handler, you must pass an argument in remotecv execution. You can also specify the http server port, the default http server port is 8080.

remotecv --with-healthcheck --server-port=8888

Tests

make unit

RemoveCV parameters

Usage: remotecv [OPTIONS]

  Runs RemoteCV

Options:
  Worker Backend:
    -b, --backend [pyres|celery]  Worker backend  [env var: BACKEND]
  Pyres Connection Arguments:
    --host TEXT                   Redis host  [env var: REDIS_HOST]
    --port INTEGER                Redis port  [env var: REDIS_PORT]
    --database INTEGER            Redis database  [env var: REDIS_DATABASE]
    --password TEXT               Redis password  [env var: REDIS_PASSWORD]
    --redis-mode [single_node|sentinel]
                                  Redis mode  [env var: REDIS_MODE]
    --sentinel-instances TEXT     Redis Sentinel instances e.g.
                                  'localhost:26376,localhost:26377'  [env var:
                                  REDIS_SENTINEL_INSTANCES]
    --sentinel-password TEXT      Redis Sentinel password  [env var:
                                  REDIS_SENTINEL_PASSWORD]
    --master-instance TEXT        Redis Sentinel master instance  [env var:
                                  REDIS_MASTER_INSTANCE]
    --master-password TEXT        Redis Sentinel master password  [env var:
                                  REDIS_MASTER_PASSWORD]
    --master-database INTEGER     Redis Sentinel master database  [env var:
                                  REDIS_MASTER_DATABASE]
    --socket-timeout FLOAT        Redis Sentinel socket timeout  [env var:
                                  REDIS_SENTINEL_SOCKET_TIMEOUT]
  Celery/SQS Connection Arguments:
    --region TEXT                 AWS SQS Region  [env var: AWS_REGION]
    --key-id TEXT                 AWS access key id  [env var:
                                  AWS_ACCESS_KEY_ID]
    --key-secret TEXT             AWS access key secret  [env var:
                                  AWS_SECRET_ACCESS_KEY]
    --polling-interval INTEGER    AWS polling interval  [env var:
                                  SQS_POLLING_INTERVAL]
    --celery-commands TEXT        SQS command  [env var: CELERY_COMMANDS]
  Other arguments:
    --server-port INTEGER         HTTP server port  [env var:
                                  HTTP_SERVER_PORT]
    --with-healthcheck            Start a healthcheck http endpoint  [env var:
                                  WITH_HEALTHCHECK]
    -l, --level [debug|info|warning|error|critical]
                                  Logging level  [env var: LOG_LEVEL]
    -o, --loader TEXT             Image loader  [env var: IMAGE_LOADER]
    -s, --store TEXT              Detector result store  [env var:
                                  DETECTOR_STORAGE]
    -t, --timeout INTEGER         Timeout in seconds for image detection  [env
                                  var: DETECTOR_TIMEOUT]
    --sentry-url TEXT             Sentry URL  [env var: SENTRY_URL]
    --metrics TEXT                Metrics client, should be the full name of a
                                  python module  [env var: METRICS_CLIENT]
    --clear-image-metadata        Clears metadata when loading image
                                  [env var: CLEAR_IMAGE_METADATA]
  Memcached store arguments:
    --memcached-hosts TEXT        Comma separated list of memcached hosts
                                  [env var: MEMCACHED_HOSTS]
  --help                          Show this message and exit.

RemoteCV can also be configured via environment variables

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

remotecv-5.1.9.tar.gz (945.2 kB view details)

Uploaded Source

Built Distribution

remotecv-5.1.9-py3-none-any.whl (965.7 kB view details)

Uploaded Python 3

File details

Details for the file remotecv-5.1.9.tar.gz.

File metadata

  • Download URL: remotecv-5.1.9.tar.gz
  • Upload date:
  • Size: 945.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.12

File hashes

Hashes for remotecv-5.1.9.tar.gz
Algorithm Hash digest
SHA256 5a316fd57737ac5f98fc62e0b7b8ce8255ff3021beb94087c3dbe176a4e8f9cf
MD5 6710d49dffb9e766b917f8026dc05f63
BLAKE2b-256 61495d1a7931c903664ea3b6ae62bb2f141f2bcaf339fd191538ee95e044d2c9

See more details on using hashes here.

File details

Details for the file remotecv-5.1.9-py3-none-any.whl.

File metadata

  • Download URL: remotecv-5.1.9-py3-none-any.whl
  • Upload date:
  • Size: 965.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.12

File hashes

Hashes for remotecv-5.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 4463dedc31d77dbe7449d42a25868b1262c5486efee7d44bd9a0543680e8409e
MD5 e081c77be51c67e34a9370323c57e466
BLAKE2b-256 6ccf3c9f03b542cf14162f9bfd8e7e2022fec62493cb354fe33fefb3dc65e952

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page