Skip to content

doppeltilde/vision_classification

Repository files navigation

Vision Classification

Stack:

Installation

  • For ease of use it's recommended to use the provided compose.yml.
services:
  vision_classification:
    image: ghcr.io/doppeltilde/vision_classification:latest
    ports:
      - "8000:8000"
    volumes:
      - ./cropped_faces:/app/cropped_faces:rw
      - ./models:/root/.cache/huggingface/hub:rw
      - ./mediapipe_models:/app/mediapipe_models:rw
    env_file:
      - .env
    restart: unless-stopped

Caution

When using Docker Swarm, ensure that all necessary volumes are created and accessible before deployment.

Tip

You can find code examples in the examples folder.

Environment Variables

  • Create a .env file and set the preferred values.
DEFAULT_MODEL_NAME=
ACCESS_TOKEN=
DEFAULT_FACE_DETECTION_MODEL_URL=

# False == Public Access
# True == Access Only with API Key
USE_API_KEY="False"
API_KEY_HASH="<YOUR_GENERATED_KEY_HASH_HERE>"
API_KEY_SALT="<YOUR_GENERATED_SALT_HERE>"

LOG_LEVEL=INFO

Usage

Important

Set the log level to DEBUG, this will generate an api key, hash, and salt for you. Just don't forget to set it back to INFO.

Note

Please be aware that the initial classification process may require some time, as the model is being downloaded.

Tip

Interactive API documentation can be found at: http://localhost:8000/docs


Notice: This project was initally created to be used in-house, as such the development is first and foremost aligned with the internal requirements.