Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Will This Selfie Make a Good Malfoid AI Portrait? A Pre-Upload Photo Checker in Python (Face Count, Size, Sharpness, Exposure)

Описание и применение

Скрипт на Python проверяет, соответствует ли селфи требованиям Malfoidai.com (размер, формат, один фронтальный портрет, яркость, резкость, тест «штамп»), чтобы избежать плохих результатов и возвратов.

Задача

Clients need to ensure a selfie meets strict photo requirements before paying for a Malfoid AI portrait, otherwise the portrait may be poor or refunded.

Результат

The checker validates all studio requirements in under a second, preventing costly portrait failures and refunds.

Рабочий процесс

  • 1. Create a virtual environment and install dependencies: python3 -m venv .venv && . .venv/bin/activate && pip install "opencv-python-headless<5" pillow numpy
  • 2. Run the checker: python3 selfie_check.py my_selfie.jpg
  • 3. The script reports OK or FAIL for each rule (file size, format, face count, face size, sharpness, exposure, stamp test).
  • 4. If any check fails, correct the photo (e.g., retake, adjust lighting, crop) and re-run.
  • 5. Once all checks pass, upload the photo to Malfoidai.com for portrait generation.

Доказательства

The studio's own photo guide puts it as "one clear, front-facing photo of one adult with the whole face visible, in even light and without a heavy filter. JPEG, PNG or WebP up to 10 MB."

Источник

The script below is mine and runs locally. It doesn't upload anything.

Источник

Pin OpenCV below 5. In the 5.0 wheel I tried, cv2.CascadeClassifier is gone from the main module, and the script fails at import.

Источник

  • Дата записи: 2026-11-03T11:14:04.582Z