Evaluation Using Interface

Input:

  • Required Inputs:
    • input_image: URL or file path to the image to be evaluated.

Output:

  • Result: Returns ‘Passed’ if the image is detected as AI-generated, ‘Failed’ if it appears to be a real photograph or human-created image.
  • Reason: A detailed explanation of why the image was classified as AI-generated or not.

Evaluation Using Python SDK

Click here to learn how to setup evaluation using the Python SDK.

Input:

  • Required Inputs:
    • input_image: string - URL or file path to the image to be evaluated.

Output:

  • Result: Returns a list containing ‘Passed’ if the image is detected as AI-generated, or ‘Failed’ if it appears to be a real photograph or human-created image.
  • Reason: Provides a detailed explanation of the evaluation.
result = evaluator.evaluate(
    eval_templates="is_AI_generated_image", 
    inputs={
        "input_image": "https://www.esparklearning.com/app/uploads/2024/04/Albert-Einstein-generated-by-AI-1024x683.webp"
    },
    model_name="turing_flash"
)

print(result.eval_results[0].metrics[0].value)
print(result.eval_results[0].reason)

Example Output:

['Passed']
The evaluation is 'Passed' because the image displays clear indicators of AI generation.

*   The image shows **telltale signs of AI generation** in its rendering of Einstein's face, particularly around the eyes, which have an unnatural symmetry and lack the subtle imperfections found in photographs.
*   There are **inconsistencies in texture detail** between different parts of the image, with some areas showing hyper-detailed skin pores while others appear smoothed or blurred in an unnatural way.
*   The **background elements** have the characteristic softness and dreamlike quality common in diffusion-based AI image generation.
*   The **lighting effects** show physically implausible interactions with the subject's features, creating an uncanny appearance.

These characteristics strongly suggest the image was created using AI image generation technology rather than being a genuine photograph.

What to do If you get Undesired Results

If you’re evaluating images and the results don’t match your expectations:

  • For actual photographs mistakenly identified as AI-generated:

    • Ensure the image has not been heavily processed or filtered
    • Check that the image doesn’t have unusual artifacts from compression or editing
    • Consider providing higher resolution versions if available
  • For AI-generated images not being detected:

    • Be aware that newer AI generation models are becoming increasingly photorealistic
    • Some AI-generated images that were post-processed or combined with real photographs may be harder to detect
    • The evaluation works best with full images rather than small crops or heavily modified versions

Comparing Is AI Generated Image with Similar Evals

  • Caption Hallucination: While Is AI Generated Image determines if an image was artificially created, Caption Hallucination evaluates whether descriptions of images contain fabricated elements not visible in the image.
  • Toxicity: Is AI Generated Image focuses on the creation method of images, whereas Toxicity evaluates whether content contains harmful elements.