UCI-SAP-Capstone-2024 / Proof-of-Performance-Fraud-Detection

0 stars 1 forks source link

Test Machine Learning models to detect AI generated images #16

Open NeilNagaraj opened 1 month ago

NeilNagaraj commented 1 month ago

Development of Initial Model/Prototype: SDXL-Detector

The initial phase of the project involved the development of a prototype model, designated as the SDXL-detector. Researched ways through medium articles to understand how these models detect AI generated images like (https://medium.com/@matthewmaybe/can-an-ai-learn-to-identify-ai-art-545d9d6af226).This model is based on the framework provided by Hugging Face and was derived by extensively fine-tuning the "umm-maybe AI art detector" (available at Hugging Face's repository). The fine-tuning process utilized a specialized dataset comprised of paired images: each pair consisted of a Wikimedia image and its corresponding SDXL image. The SDXL images were generated by employing a specific prompt crafted from a caption that was itself generated by the BLIP model, accurately describing the original Wikimedia image.

Challenges Encountered with the SDXL-Detector Model:

  1. Accuracy and Detection Capability:

    • The model demonstrated a proficiency in accurately identifying AI-generated images, achieving a detection accuracy rate exceeding 70% in the majority of instances, with some instances reaching up to 99% accuracy.
    • However, it was observed that genuine, real-world images were occasionally misclassified as AI-generated, with a misclassification probability ranging between 0.1 and 0.2.
    • Images originating from OpenAI's Sora were consistently and correctly identified as real images, showcasing a specific area of success within the model's detection capabilities.
  2. Incidence of False Positives:

    • A notable challenge presented by the SDXL-detector model is the high rate of false positives, wherein real images are erroneously identified as AI-generated.
  3. Search for Enhanced Accuracy:

    • There exists a clear necessity to explore and identify models that are capable of delivering higher accuracy rates, particularly to reduce the incidence of false positives and improve the overall reliability of the detection process.
NeilNagaraj commented 4 weeks ago

I tried out a different model called 'AI vs Real image detection on Hugging face' (https://huggingface.co/dima806/ai_vs_real_image_detection). This uses CNN as well. This uses a dataset from kaggle called 'Cifake AI generated Image detection'(https://www.kaggle.com/code/dima806/cifake-ai-generated-image-detection-vit). I've also taken assistance from the medium article https://medium.com/@matthewmaybe/can-an-ai-learn-to-identify-ai-art-545d9d6af226 to understand what changes I can do to make the model give a higher accuracy. This model as of now gives an accuracy of about 80%. The future plans would be to train this model on specific images related to retail stores and promotions in order to get a higher accuracy. The number of false positives have decreased as well with this model.