JKrishnanandhaa commited on
Commit
33320ad
·
verified ·
1 Parent(s): 53014ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -414,9 +414,10 @@ class ForgeryDetector:
414
 
415
  region_mask = region_mask.astype(bool)
416
 
417
- # Extract features
 
418
  features = self.feature_extractor.extract(
419
- preprocessed,
420
  region['region_mask'],
421
  [f.cpu() for f in decoder_features]
422
  )
 
414
 
415
  region_mask = region_mask.astype(bool)
416
 
417
+ # Extract features using ORIGINAL image (not preprocessed)
418
+ # This matches how the classifier was trained
419
  features = self.feature_extractor.extract(
420
+ original_image / 255.0, # Normalize to [0, 1]
421
  region['region_mask'],
422
  [f.cpu() for f in decoder_features]
423
  )