Skip to main content

How It Works

Veri uses machine learning models trained to identify artifacts and patterns characteristic of AI-generated images. Our detection pipeline:
  1. Preprocessing - Normalizes the image for consistent analysis
  2. Model Inference - Runs the image through our detection model(s)
  3. Score Aggregation - Combines model outputs into a final probability score
  4. Classification - Maps the score to a 5-tier prediction

Detection Models

veri_face

Our primary model optimized for detecting AI-generated faces. It excels at identifying:
  • GAN-generated faces (StyleGAN, PGGAN)
  • Diffusion model outputs (Stable Diffusion, Midjourney, DALL-E)
  • Face swaps and deepfakes
  • AI-enhanced/modified faces
MetricValue
Average latency~150ms
Recommended usePortrait images, profile photos

Classification Tiers

The model returns an ensemble_score (probability from 0 to 1) which is mapped to a 5-tier classification:
Score RangePredictionVerdictisFake
>= 0.85aiai_generatedtrue
0.55 - 0.85likely_ailikely_aitrue
0.45 - 0.55uncertainuncertainnull
0.15 - 0.45likely_reallikely_realfalse
< 0.15realrealfalse

Understanding the Response

ensemble_score

The raw model probability (0-1). This is the core output from the detection model. Higher values mean the model thinks the image is more likely AI-generated.

confidence

How decisive the model is, calculated as abs(ensemble_score - 0.5) * 2. This tells you how far the model is from being completely unsure:
ensemble_scoreconfidenceMeaning
0.950.90Very decisive — strongly believes AI
0.820.64Moderately decisive — leans AI
0.520.04Not decisive — nearly a coin flip
0.300.40Moderately decisive — leans real
0.050.90Very decisive — strongly believes real

isFake

A convenience boolean derived from prediction:
  • true — prediction is "ai" or "likely_ai"
  • false — prediction is "real" or "likely_real"
  • null — prediction is "uncertain" (score between 0.45 and 0.55)

Best Practices

Image Quality

For best results:
  • Use original, uncompressed images when possible
  • Minimum resolution: 224x224 pixels
  • Supported formats: JPEG, PNG, WebP, GIF (first frame)

Acting on Results

result = client.detect(image)

if result.prediction == "ai":
    print("High confidence: AI-generated image")
elif result.prediction == "likely_ai":
    print("Likely AI-generated, consider manual review")
elif result.prediction == "uncertain":
    print("Model is unsure, manual review recommended")
elif result.prediction == "likely_real":
    print("Likely authentic")
else:
    print("High confidence: Authentic image")

Handle Edge Cases

Some images are harder to classify:
  • Heavily edited photos
  • Artistic filters applied
  • Very low resolution images
  • Partial faces or unusual angles
For these, the model may return "uncertain" or "likely_real" / "likely_ai" predictions with low confidence.