simonfrnd commited on
Commit
057de25
·
verified ·
1 Parent(s): 6225b51

change to 0.85 threshold fixed for pillar 2

Browse files
Files changed (1) hide show
  1. main.py +5 -2
main.py CHANGED
@@ -314,8 +314,11 @@ async def analyze_artworks(file_a: UploadFile = File(...), file_b: UploadFile =
314
  correspondence_map_b64 = fig_to_base64(corr_fig)
315
 
316
  n_patches_a = a2b_best.shape[0]
317
- adaptive_thresh = max((a2b_best.mean() + a2b_best.std()).item(), 0.5)
318
- high_a = (a2b_best > adaptive_thresh).sum().item()
 
 
 
319
  pct_copied = round((high_a / n_patches_a) * 100, 1)
320
 
321
  # --- PILLAR 3: Substantial Similarity ---
 
314
  correspondence_map_b64 = fig_to_base64(corr_fig)
315
 
316
  n_patches_a = a2b_best.shape[0]
317
+
318
+ _patches_a = a2b_best.shape[0]
319
+ LITERAL_COPY_THRESH = 0.85
320
+ high_a = (a2b_best > LITERAL_COPY_THRESH).sum().item()
321
+
322
  pct_copied = round((high_a / n_patches_a) * 100, 1)
323
 
324
  # --- PILLAR 3: Substantial Similarity ---