An End-to-End Deep Learning based system that detects whether content is AI-generated or Human-created.
This project combines Computer Vision and Natural Language Processing into a unified AI detection platform with a simple web interface.
- AI Generated Image Detection (ResNet18)
- AI Generated Text Detection (BERT)
- Confidence Score Display
- Combined Final Verdict (Image + Text)
- Streamlit Web Interface
- Deep Learning based approach (PyTorch + Transformers)
- Architecture: ResNet18
- Framework: PyTorch
- Input Size: 224x224
- Classes:
- AI Generated Image
- Real Image
- Architecture: BERT (bert-base-uncased)
- Framework: HuggingFace Transformers
- Max Token Length: 128
- Classes:
- AI Generated Text
- Human Written Text
AI-Content-Detector/
│
├── models/
│ ├── image_model.pth
│ └── text_model/
│ └── bert_text_detector.pth
│
├── training/
│ ├── train_image_model.py
│ ├── train_text_model.py
│ └── evaluate_image_model.py
│
├── data/
│ └── images/
│ ├── ai/
│ └── real/
│
├── app.py
└── README.md
git clone https://github.com/your-username/AI-Content-Detector.git
cd AI-Content-Detectorpip install torch torchvision transformers streamlit scikit-learn pillowstreamlit run app.pyThe application will open in your browser.
- Upload image
- Resize and convert to tensor
- ResNet18 inference
- Softmax probability calculation
- Class prediction with confidence score
- Enter text
- Tokenize using BERT tokenizer
- Extract embeddings
- Classification layer
- Confidence score output
If either image or text is predicted as AI-generated → Final result shows AI Generated Content.
- Accuracy
- Precision
- Recall
- F1 Score
- Confusion Matrix
- Python
- PyTorch
- Torchvision
- HuggingFace Transformers
- Streamlit
- Scikit-learn
- Pillow
Developed an end-to-end AI Content Detection System using ResNet18 and BERT to classify AI-generated vs human-generated images and text. Integrated both models into a Streamlit web application with confidence scoring and combined verdict logic.
Isha singh Rathore
AI & Machine Learning/deep learning Enthusiast