{% if result.status == 'ORIGINAL' %}
DIPLOMA ORIGINAL
Diploma ne'e AUTÉNTIKU no LA HA TANDA MANIPULASAUN
📊 SSIM Score: {{ result.ssim_score|default(0) }}%

📌 Diploma ne'e verifikadu ho suksesu.

🟢 REKOMENDASAUN: Diploma ne'e ORIGINAL. Seguru atu uza.

⏱️ {{ result.processing_time|default(0) }} detik

{% else %}
⚠️ DIPLOMA ⏱️ {{ result.processing_time|default(0) }} detik

{{ result.status }}

Confidence: {{ "%.1f"|format(result.confidence) }}%

{{ result.deskripsi }}

{% if result.comparison %}
🔗 Similarity: {{ result.comparison.similarity_score }}%
{% endif %} {% if result.element_issues %}
⚠️ Elemen bermasalah: {{ result.element_issues|join(', ') }}
{% endif %}
🔬

Analisa 4 Elemen Diploma

Hologram | TTD | Cap | Teks
{% set holo = result.element_detection.hologram %}
🔮
Hologram
{{ holo.score }}/100
{% if holo.is_manipulated %} ❌ {{ holo.status }} {% else %} ✅ {{ holo.status }} {% endif %}
{{ holo.description }}
{% set sig = result.element_detection.signature %}
✍️
Tanda Tangan
{{ sig.score }}/100
{% if sig.is_manipulated %} ❌ {{ sig.status }} {% else %} ✅ {{ sig.status }} {% endif %}
{{ sig.description }}
{% set st = result.element_detection.stamp %}
🏛️
Cap/Stempel
{{ st.score }}/100
{% if st.is_manipulated %} ❌ {{ st.status }} {% else %} ✅ {{ st.status }} {% endif %}
{{ st.description }}
{% set txt = result.element_detection.text %}
📝
Teks
{{ txt.score }}/100
{% if txt.is_manipulated %} ❌ {{ txt.status }} {% else %} ✅ {{ txt.status }} {% endif %}
{{ txt.description }}
{% if result.cakaran_result %}
📐

Perhitungan Cakaran (Pixel Manipulation)

K = {{ result.cakaran_result.k_value }}

Tabela 3.2. Imagem Original (95% JPEG)

{% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% for i in range(result.cakaran_result.matrix_size) %} {% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% endfor %}
PixelK{{ j+1 }}
L{{ i+1 }} {{ result.cakaran_result.original_matrix[i][j] }}

Tabela 3.3. Imagem ne'ebe Manipula Ona (85% JPEG)

{% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% for i in range(result.cakaran_result.matrix_size) %} {% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% endfor %}
PixelK{{ j+1 }}
L{{ i+1 }} {{ result.cakaran_result.manipulasi_matrix[i][j] }}

Tabela 3.4. Kalkulasaun Diferensa iha Pixel

{% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% for i in range(result.cakaran_result.matrix_size) %} {% set row_total = 0 %} {% for j in range(result.cakaran_result.matrix_size) %} {% set val = result.cakaran_result.diff_matrix[i][j] %} {% set row_total = row_total + val %} {% endfor %} {% endfor %}
PixelK{{ j+1 }}Total
L{{ i+1 }} {{ val }} {{ row_total }}

Tabela 3.5. Kalkulasaun ELA (K = {{ result.cakaran_result.k_value }})

{% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% for i in range(result.cakaran_result.matrix_size) %} {% for j in range(result.cakaran_result.matrix_size) %} {% set val = result.cakaran_result.ela_matrix[i][j] %} {% endfor %} {% endfor %}
PixelK{{ j+1 }}
L{{ i+1 }} {{ "%.1f"|format(val) }}

Tabela 3.6. Rezultadu ELA (K = {{ result.cakaran_result.k_value }})

{% for j in range(result.cakaran_result.matrix_size) %} {% endfor %} {% for i in range(result.cakaran_result.matrix_size) %} {% set row_has_manipulasi = false %} {% for j in range(result.cakaran_result.matrix_size) %} {% set val = result.cakaran_result.ela_matrix[i][j] %} {% set is_manip = val >= 20 %} {% if is_manip %}{% set row_has_manipulasi = true %}{% endif %} {% endfor %} {% endfor %}
PixelK{{ j+1 }}Status
L{{ i+1 }} {{ "%.1f"|format(val) }} {% if row_has_manipulasi %} ⚠️ Manipulasi {% else %} ✅ Normal {% endif %}

Tabela 3.7. Identifika Pixel sira ne'ebé Manipuladu

{% if result.cakaran_result.manipulated_pixels %} {% for pixel in result.cakaran_result.manipulated_pixels %} {% endfor %}
Pixel Original Manipulasi Diferensa ELA Status
{{ pixel.position }} {{ pixel.original }} {{ pixel.manipulasi }} {{ pixel.diff }} {{ "%.1f"|format(pixel.ela) }} ❌ Manipuladu
{% else %}

✅ Tidak ada pixel yang teridentifikasi manipulasi

{% endif %}

Persentagem Manipulasaun

Total Pixel
{{ result.cakaran_result.total_pixels }}
Pixel Manipulasi
{{ result.cakaran_result.manipulated_count }}
Pixel Normal
{{ result.cakaran_result.total_pixels - result.cakaran_result.manipulated_count }}
Persentase Manipulasi
{{ result.cakaran_result.manipulation_percentage }}%
{% endif %} {% if result.pixel_values %}
🔢

Perhitungan Pixel Ijazah - Kompresi 3 Kali

10x10 Matriks

📊 Matriks Pixel Original (Tanpa Kompresi) Mean: {{ "%.2f"|format(result.pixel_values.original.mean) }} | Std: {{ "%.2f"|format(result.pixel_values.original.std) }}

{% for row in result.pixel_values.original.matrix %} {% for val in row %} {% endfor %} {% endfor %}
{{ val }}
{% for comp in result.pixel_values.compression %}

📊 Level {{ comp.level }} - Kompresi {{ comp.quality_name }} Mean: {{ "%.2f"|format(comp.mean) }} | Std: {{ "%.2f"|format(comp.std) }}

{% for row in comp.matrix %} {% for val in row %} {% endfor %} {% endfor %}
{{ val }}
Min: {{ comp.min }} Max: {{ comp.max }} Range: {{ comp.max - comp.min }}
{% endfor %} {% if result.pixel_values.perbandingan %}

📈 Perbandingan Perubahan Pixel

{% for comp in result.pixel_values.perbandingan %} {% endfor %}
Dari Ke Perubahan Mean Perubahan Std Persentase
{{ comp.from_quality }} {{ comp.to_quality }} {{ "%.2f"|format(comp.diff_mean) }} {{ "%.2f"|format(comp.diff_std) }} {{ "%.2f"|format(comp.persentase_perubahan) }}%
{% endif %}

🔢 Matriks 10x10 - Nilai Pixel (0-255)
🟦 Biru = Original  |  🟧 Kuning = Kompresi

⚡ Semakin besar perubahan pixel, semakin tinggi indikasi manipulasi

{% endif %}
📊

Persentagem Manipulasaun

Detalladu
📊
Pixel
{{ "%.1f"|format(pixel_manipulasi) }}%
Manipulasaun Pixel
⚠️ Manipuladu
🎨
Kor (Warna)
{{ "%.1f"|format(kor_manipulasi) }}%
Manipulasaun Kor
⚠️ Manipuladu
☀️
Naroman
{{ "%.1f"|format(naroman_manipulasi) }}%
Manipulasaun Naroman
⚠️ Manipuladu
📈
Total Manipulasaun
{{ "%.1f"|format(result.manipulation_percentage) }}%
Persentase Total
⚠️ Manipuladu

* Analiza ELA ho K = 5.1

📈

Visualizasaun

Chart
{% if result.heatmap and result.heatmap != 'None' %}
🔴

Lokal Manipulasaun (Tanda Merah)

Heatmap
Heatmap Manipulasi
🔴 Area Manipulasi
🟡 Batas Area
🔮 Hologram
✍️ Tanda Tangan
🏛️ Cap
📝 Teks
{% endif %}
📋

Detalladu

Hasil

❌ Diploma {{ result.status }}

Rezultadu: Diploma ne'e konsidera {{ result.status }} tanba detekta manipulasaun signifikante. Persentagem manipulasaun: {{ "%.1f"|format(result.manipulation_percentage) }}%

{% if result.pixel_values %}

🔢 Pixel Original Mean: {{ "%.2f"|format(result.pixel_values.original.mean) }} | Pixel Kompresi Mean: {{ "%.2f"|format(result.pixel_values.compression[-1].mean if result.pixel_values.compression else 0) }}

{% endif %}

Analiza 4 Elemen:

  • 🔮 Hologram ({{ result.element_detection.hologram.score }}/100): {% if result.element_detection.hologram.is_manipulated %} ❌ {{ result.element_detection.hologram.description }} {% else %} ✅ {{ result.element_detection.hologram.description }} {% endif %}
  • ✍️ Tanda Tangan ({{ result.element_detection.signature.score }}/100): {% if result.element_detection.signature.is_manipulated %} ❌ {{ result.element_detection.signature.description }} {% else %} ✅ {{ result.element_detection.signature.description }} {% endif %}
  • 🏛️ Cap ({{ result.element_detection.stamp.score }}/100): {% if result.element_detection.stamp.is_manipulated %} ❌ {{ result.element_detection.stamp.description }} {% else %} ✅ {{ result.element_detection.stamp.description }} {% endif %}
  • 📝 Teks ({{ result.element_detection.text.score }}/100): {% if result.element_detection.text.is_manipulated %} ❌ {{ result.element_detection.text.description }} {% else %} ✅ {{ result.element_detection.text.description }} {% endif %}

🔴 ELEMEN BERMASALAH: {{ result.element_issues|join(', ') }}

{% if result.comparison %}

🔗 Similarity dengan referensi: {{ result.comparison.similarity_score }}%

{% endif %}
{% endif %}
🔄 Detekta Fila Fali 📂 Haree Upload Recent
{% if result.status != 'ORIGINAL' %} {% endif %}