saakshigupta commited on
Commit
da0b0c4
·
verified ·
1 Parent(s): 6d9c2e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -14
app.py CHANGED
@@ -27,7 +27,7 @@ st.set_page_config(
27
 
28
  # Main title and description
29
  st.title("Deepfake Image Analyser")
30
- st.markdown("Analyze images for deepfake manipulation with multi-stage analysis")
31
 
32
  # Check for GPU availability
33
  def check_gpu():
@@ -42,19 +42,31 @@ def check_gpu():
42
  # Sidebar components
43
  st.sidebar.title("About")
44
  st.sidebar.markdown("""
45
- This analyzer performs multi-stage detection:
46
- 1. **Initial Detection**: CLIP-based classifier
47
- 2. **GradCAM Visualization**: Highlights suspicious regions
48
- 3. **Image Captioning**: BLIP model describes the image content
49
- 4. **LLM Analysis**: Fine-tuned Llama 3.2 Vision provides detailed explanations
50
-
51
- The system looks for:
52
- - Facial inconsistencies
53
- - Unnatural movements
54
- - Lighting issues
55
- - Texture anomalies
56
- - Edge artifacts
57
- - Blending problems
 
 
 
 
 
 
 
 
 
 
 
 
58
  """)
59
 
60
  # Fixed values for temperature and max tokens
 
27
 
28
  # Main title and description
29
  st.title("Deepfake Image Analyser")
30
+ st.markdown("Analyse images for deepfake manipulation")
31
 
32
  # Check for GPU availability
33
  def check_gpu():
 
42
  # Sidebar components
43
  st.sidebar.title("About")
44
  st.sidebar.markdown("""
45
+ ### About Deepfake Analyzer
46
+ This tool performs multi-stage deepfake detection using advanced AI models:
47
+
48
+ **CLIP Model**: Initial Real/Fake classification with confidence score
49
+ **GradCAM**: Visualization of suspicious regions via heat map
50
+ **BLIP**: Structured description of image content
51
+ **Llama 3.2 Vision**: Detailed explanation of potential manipulation
52
+
53
+ ### How to Use
54
+
55
+ **Load Models**:
56
+ - Begin with CLIP (required for basic detection)
57
+ - Add BLIP for enhanced descriptions
58
+ - Add Vision LLM for in-depth analysis
59
+
60
+ **Analyze Images**:
61
+ - Upload an image using the file selector
62
+ - Examine the GradCAM heat map highlighting suspicious areas
63
+
64
+ **Get Insights**:
65
+ - Use preset questions or ask your own
66
+ - Review either technical or simple explanations
67
+
68
+ ---
69
+ *Note: GPU recommended for faster processing*
70
  """)
71
 
72
  # Fixed values for temperature and max tokens