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

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

Description and use

A Python script checks selfies against Malfoidai.com’s photo rules (size, format, single front-facing face, lighting, sharpness, stamp test) to prevent poor portraits and refunds.

Problem

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.

Outcome

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

Workflow

  • 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.

Evidence

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."

Source

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

Source

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.

Source

  • Record date: 2026-11-03T11:14:04.582Z