Elevator pitch

An evidence checker for images that might be AI-made. Instead of a yes/no verdict, it shows what it found, how much each clue counts, and what it can't tell.


About the project

Inspiration

AI images now look real enough to fool most people. Most "AI detectors" answer with a single yes/no score and no explanation. When those detectors are wrong about a real photo, a real event gets dismissed as fake. I think that's the worst mistake a tool like this can make. So instead of building another detector, I built something that shows the evidence and is honest about what it doesn't know.

What it does

You upload an image, and Second Look runs four independent checks at the same time:

  • Metadata and Content Credentials (C2PA): signed records of how the image was made, AI tools named in the file's software field, and camera details.
  • Visual clues (Gemini): Gemini points out specific details sometimes seen in AI images, like garbled text or odd hands. It gives the location of each and an innocent explanation (compression, blur, editing). It's told never to give a verdict.
  • Reverse image search (WIP): finds earlier copies online, such as an old photo reused for a new event. It shows only links, never names.
  • Invisible watermark (WIP): a ready-made slot for SynthID-style watermark detection.

A fixed set of six readable rules combines the results into a leaning and a confidence level, with every piece of evidence listed. Visual clues alone can never push the result past "unclear," and missing evidence never counts for or against an image. Every report ends with: "This tool gathers evidence. It cannot prove an image is real or fake."

How I built it

  • Backend: Python, FastAPI and asyncio. All checks run in parallel with 30-second timeouts, so if one fails, the report still comes back.
  • Gemini: gemini-3.5-flash-lite through the google-genai SDK, returning structured JSON in a fixed format.
  • Metadata: c2pa-python and Pillow. Reverse search: Google Cloud Vision web detection. Frontend: Streamlit.
  • The combining rules are plain Python with no AI, so every result can be traced back to evidence and rules anyone can read.
  • Tests: 98 pytest tests, with all external APIs mocked.
  • Evaluation: a script that runs the full pipeline over 200 images from the public Defactify dataset: 100 real photos, plus 20 each from SD 2.1, SDXL, SD 3, DALL·E 3 and Midjourney v6.

Challenges I ran into

  • Setup: Due to previous usage of Google AI Studio, I was unable to make a new project, which I needed for an API key to call the APIs from there. I had to workshop around a previous project I made.
  • Speed: my first Gemini model took 50–85 seconds per image, past my timeout. Switching to gemini-3.5-flash-lite brought it to about 2 seconds.
  • Rate limits: my first eval run hit Gemini's free-tier limit on 169 of 200 images. I added pacing and automatic retries to the eval script.
  • No watermark API: Google offers no public developer API for detecting SynthID in images, so the watermark check is a slot waiting for one.
  • Billing: Cloud Vision requires billing on the project even for its free usage, so reverse search is built and tested but switched off in my demo.
  • Trusting Content Credentials: a credential can be validly signed by anyone with their own certificate. I count it as strong only when the signer is on a trust list.

Accomplishments that I'm proud of

  • Zero false accusations: 0 of 100 real photos in my tests leaned "likely AI."
  • Evidence for my design: Gemini reported possible "AI clues" in 70% of real photos in my tests (and 96% of AI images). A detector that trusted those clues would have accused most of the real photos. Mine didn't accuse any.
  • Fully explainable results: every leaning traces back to listed evidence and six readable rules.
  • Privacy by design: images are never stored, the logs never include them, and the tool never identifies people.

What I learned

  • Visual impressions are much noisier than they look. Real photos are full of things that seem "AI-ish."
  • Missing evidence isn't evidence. Most platforms strip metadata, and most AI tools don't watermark. So on typical images found online, "unclear" is often the most honest answer.

What's next for Second Look

  • Stronger signals: load the official C2PA trust list, turn on reverse search, and plug in SynthID once a developer API exists.
  • A fuller evaluation: real phone photos with intact metadata, AI images with Content Credentials, and screenshotted or recompressed copies.
  • A browser extension: right-click any image to get a report before you share it.

Built With

  • asyncio
  • c2pa
  • c2pa-python
  • fastapi
  • gemini
  • google-cloud-vision
  • google-genai
  • httpx
  • hugging-face
  • pillow
  • pyarrow
  • pydantic
  • pytest
  • python
  • streamlit
  • uvicorn
Share this project:

Updates

Submission history