Spaces:
Running
Running
Update media_utils.py
Browse files- media_utils.py +1 -1
media_utils.py
CHANGED
|
@@ -226,4 +226,4 @@ def run_video_similarity(vid1, vid2, mode):
|
|
| 226 |
vid_extra = f'''<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;"><div style="padding:12px;border-radius:10px;background:#0f1629;border:1px solid #1e293b;"><div style="color:#60a5fa;font-size:11px;font-weight:700;">📄 Original</div><div style="color:#e2e8f0;font-size:12px;">{meta1.get("width","?")}×{meta1.get("height","?")} · {meta1.get("fps","?")}fps · {meta1.get("duration","?")}s · {len(kf1)} KF</div></div><div style="padding:12px;border-radius:10px;background:#0f1629;border:1px solid #1e293b;"><div style="color:#ff6b6b;font-size:11px;font-weight:700;">🔍 Suspect</div><div style="color:#e2e8f0;font-size:12px;">{meta2.get("width","?")}×{meta2.get("height","?")} · {meta2.get("fps","?")}fps · {meta2.get("duration","?")}s · {len(kf2)} KF</div></div></div>'''
|
| 227 |
html = _sim_html(total,verdict,vc,vi,[("🕐 DTW Temporal",dtw_sim,"#60a5fa"),("🔢 Keyframe Hash",kf_avg,"#c084fc"),("🎨 Color Dist.",color_avg,"#f472b6"),("📐 SSIM Structure",ssim_avg,"#ffe066")],vid_extra)
|
| 228 |
return html, '\n'.join(log)
|
| 229 |
-
VIDEO_SIM_MODES = ["🔍 Comprehensive Similarity","🕐 DTW Temporal Matching","🔢 Keyframe Hash Comparison","📐 SSIM Structural"]
|
|
|
|
| 226 |
vid_extra = f'''<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;"><div style="padding:12px;border-radius:10px;background:#0f1629;border:1px solid #1e293b;"><div style="color:#60a5fa;font-size:11px;font-weight:700;">📄 Original</div><div style="color:#e2e8f0;font-size:12px;">{meta1.get("width","?")}×{meta1.get("height","?")} · {meta1.get("fps","?")}fps · {meta1.get("duration","?")}s · {len(kf1)} KF</div></div><div style="padding:12px;border-radius:10px;background:#0f1629;border:1px solid #1e293b;"><div style="color:#ff6b6b;font-size:11px;font-weight:700;">🔍 Suspect</div><div style="color:#e2e8f0;font-size:12px;">{meta2.get("width","?")}×{meta2.get("height","?")} · {meta2.get("fps","?")}fps · {meta2.get("duration","?")}s · {len(kf2)} KF</div></div></div>'''
|
| 227 |
html = _sim_html(total,verdict,vc,vi,[("🕐 DTW Temporal",dtw_sim,"#60a5fa"),("🔢 Keyframe Hash",kf_avg,"#c084fc"),("🎨 Color Dist.",color_avg,"#f472b6"),("📐 SSIM Structure",ssim_avg,"#ffe066")],vid_extra)
|
| 228 |
return html, '\n'.join(log)
|
| 229 |
+
VIDEO_SIM_MODES = ["🔍 Comprehensive Similarity","🕐 DTW Temporal Matching","🔢 Keyframe Hash Comparison","📐 SSIM Structural"]
|