🏠 Real Estate Image Integrity Detection System

Detect AI-generated and manipulated real estate photos using a hybrid forensic analysis approach.

Overview

This system combines three detection modules:

  1. MantraNet - Pixel-level forensic analysis detecting manipulation traces, noise inconsistencies, and compression artifacts
  2. BLIP-2 - Vision-language model for semantic reasoning and generating human-readable explanations
  3. Multi-Feature Forensic Analysis - Analyzes 10+ image properties including edge sharpness, texture smoothness, color saturation, lighting gradients, and noise patterns

How It Works

Detection Features

Feature What It Detects
Edge Density AI renders have unnaturally sharp, uniform edges
Texture Smoothness AI lacks micro-imperfections found in real materials
Color Saturation AI images tend to be oversaturated with uniform colors
Lighting Gradients Real photos have natural light falloff; AI is too uniform
Noise Patterns Real cameras produce characteristic sensor noise
JPEG Artifacts Compressed photos from phones show blocking artifacts
LBP Texture Local Binary Patterns capture micro-texture differences

Output

  • Authenticity Score: 0.0 (definitely real) to 1.0 (definitely fake)
  • Classification: real, full_synthesis, splicing, or inpainting
  • Forensic Explanation: Detailed analysis of detected anomalies or authenticity markers

Usage

Web Interface (Hugging Face Space)

Simply upload a real estate interior photo and get instant analysis.

Command Line

python predict.py --input_dir ./images --output_file predictions.json

Python API

from predict import analyze_image, load_models

pixel_model, processor, vlm_model, device = load_models()
result = analyze_image("photo.jpg", pixel_model, processor, vlm_model, device)
print(result)

Interpretation Guide

Score Range Interpretation
0.0 - 0.25 High confidence authentic photograph
0.25 - 0.45 Likely authentic, minor uncertainty
0.45 - 0.60 Borderline / uncertain
0.60 - 0.80 Likely AI-generated or manipulated
0.80 - 1.0 High confidence AI-generated

Technical Details

  • CPU-only inference - No GPU required
  • Zero-shot approach - Uses pre-trained models, no task-specific training
  • Explainable - Provides specific visual evidence for decisions

Files

  • app.py - Gradio web interface
  • predict.py - Main prediction pipeline
  • mantranet_model.py - MantraNet model architecture
  • requirements.txt - Python dependencies

Citation

If you use this system, please cite:

  • MantraNet: Wu et al., "ManTraNet: Manipulation Tracing Network" (CVPR 2019)
  • BLIP-2: Li et al., "BLIP-2: Bootstrapping Language-Image Pre-training" (ICML 2023)

License

MIT License

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support