Delete tabs/tab_fft.py
Browse files- tabs/tab_fft.py +0 -101
tabs/tab_fft.py
DELETED
|
@@ -1,101 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
# -*- coding: utf-8 -*-
|
| 3 |
-
"""
|
| 4 |
-
Help Tab
|
| 5 |
-
|
| 6 |
-
Created on Sat Nov 8 11:58:29 2025
|
| 7 |
-
@author: standarduser
|
| 8 |
-
"""
|
| 9 |
-
|
| 10 |
-
import gradio as gr
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
def create_tab_image_fft(tab_label):
|
| 14 |
-
"""Creates a tab for help text"""
|
| 15 |
-
with gr.TabItem(tab_label):
|
| 16 |
-
gr.Markdown("""
|
| 17 |
-
# SVAT - Synthetic Video Analyze Tool
|
| 18 |
-
|
| 19 |
-
## Quick Start
|
| 20 |
-
|
| 21 |
-
1. **Load Video:** Go to "Video-Frames" tab and upload a video
|
| 22 |
-
2. **Navigate Frames:** Use slider or buttons to move through frames
|
| 23 |
-
3. **Apply Transformations:** Click transformation buttons to analyze frames
|
| 24 |
-
4. **Annotate:** Draw on frames in "Annotations" tab
|
| 25 |
-
5. **Analyze Video:** Use "Video Analysis" tab for global analysis
|
| 26 |
-
|
| 27 |
-
## Frame Transformations
|
| 28 |
-
|
| 29 |
-
### Laplacian High-Pass
|
| 30 |
-
Emphasizes high-frequency details and edges. Useful for detecting sharpness artifacts.
|
| 31 |
-
|
| 32 |
-
### FFT Spectrum
|
| 33 |
-
Shows frequency domain representation with viridis colormap (blue-green-yellow).
|
| 34 |
-
Reveals periodic patterns and compression artifacts.
|
| 35 |
-
|
| 36 |
-
### Error Level Analysis (ELA)
|
| 37 |
-
Detects JPEG compression artifacts by re-compressing the image.
|
| 38 |
-
Lower quality = more visible differences in manipulated areas.
|
| 39 |
-
|
| 40 |
-
### Wavelet Decomposition
|
| 41 |
-
Multi-scale frequency analysis showing LL, LH, HL, HH subbands.
|
| 42 |
-
Reveals different frequency components.
|
| 43 |
-
|
| 44 |
-
### Noise Extraction
|
| 45 |
-
Isolates high-frequency noise via high-pass filtering.
|
| 46 |
-
Shows noise patterns that might indicate generation artifacts.
|
| 47 |
-
|
| 48 |
-
### YCbCr Channels
|
| 49 |
-
Separates luminance (Y) and chrominance (Cb, Cr) channels.
|
| 50 |
-
Useful for detecting color space artifacts.
|
| 51 |
-
|
| 52 |
-
### Gradient Magnitude
|
| 53 |
-
Visualizes edge strength using Sobel operator.
|
| 54 |
-
Shows edge consistency.
|
| 55 |
-
|
| 56 |
-
### Histogram Stretching (CLAHE)
|
| 57 |
-
Adaptive contrast enhancement that preserves local details.
|
| 58 |
-
|
| 59 |
-
## Video Analysis
|
| 60 |
-
|
| 61 |
-
### Mean FFT
|
| 62 |
-
Calculates average FFT across all frames to detect:
|
| 63 |
-
- Consistent frequency patterns in AI-generated videos
|
| 64 |
-
- Generator-specific fingerprints
|
| 65 |
-
- Temporal artifacts
|
| 66 |
-
|
| 67 |
-
## Annotation Modes
|
| 68 |
-
|
| 69 |
-
**Per Frame (A):** Separate drawings for each frame
|
| 70 |
-
**Global (B):** One drawing overlaid on all frames
|
| 71 |
-
|
| 72 |
-
## Tips for AI Detection
|
| 73 |
-
|
| 74 |
-
- Look for **repeating patterns** in FFT spectrum
|
| 75 |
-
- Check **ELA** for inconsistent compression levels
|
| 76 |
-
- Use **Mean FFT** to find generator fingerprints
|
| 77 |
-
- Compare **noise patterns** between frames
|
| 78 |
-
- Watch for **unnatural frequency distributions**
|
| 79 |
-
|
| 80 |
-
## Keyboard Shortcuts
|
| 81 |
-
|
| 82 |
-
*Navigation:*
|
| 83 |
-
- Use frame slider for quick navigation
|
| 84 |
-
- Click ◀/▶ buttons for precise frame control
|
| 85 |
-
|
| 86 |
-
## System Requirements
|
| 87 |
-
|
| 88 |
-
- Python 3.8+
|
| 89 |
-
- Gradio 6.x
|
| 90 |
-
- OpenCV
|
| 91 |
-
- NumPy 2.x
|
| 92 |
-
- Pillow
|
| 93 |
-
- Matplotlib
|
| 94 |
-
|
| 95 |
-
## About
|
| 96 |
-
|
| 97 |
-
SVAT is designed to help identify synthetic/AI-generated video content through various image analysis techniques.
|
| 98 |
-
|
| 99 |
-
Version: 1.0
|
| 100 |
-
Updated: 2025
|
| 101 |
-
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|