CoolFace
Apppublic

nahid112376/ai-image-detection

sourceHugging Facemitupdated 9mo agoView on Hugging Face
0likes
App README

๐Ÿ” AI Image Detection

Upload an image to detect if it was generated by AI or is a real photograph.

How It Works

  1. 1.Feature Extraction: Images are processed using Qwen2.5-VL-3B-Instruct to extract spatial features
  2. 2.CNN Classification: A 1D CNN trained on these features detects AI generation patterns
  3. 3.Prediction: Returns a confidence score and classification (AI-generated vs Real)

Model Details

  • โ€”Architecture: 1D CNN with 3 convolutional layers
  • โ€”Feature Extractor: Qwen2.5-VL-3B-Instruct
  • โ€”Framework: PyTorch
  • โ€”Model Repository: nahid112376/ai-detection-cnn

Usage

  1. 1.Upload an image using the upload button, clipboard, or webcam
  2. 2.Adjust the detection threshold (default: 0.5)
  3. 3.Higher threshold = stricter AI detection
  4. 4.Lower threshold = more sensitive detection
  5. 5.Click "Detect AI" to get results

Technical Details

  • โ€”Input: Images of any size (automatically resized)
  • โ€”Output: Binary classification with confidence score
  • โ€”Threshold: Adjustable from 0.0 to 1.0
  • โ€”Processing: First prediction may take longer due to model loading

Performance

The model was trained on the demectai dataset and uses spatial features from Qwen2.5-VL for robust AI image detection.

Citation

bibtex
@misc{ai-detection-cnn,
  author = {bartazable},
  title = {AI Detection CNN Model},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/nahid112376/ai-detection-cnn}}
}

License

MIT License