Skip to content

Commit

Permalink
Correct return statement, correct license
Browse files Browse the repository at this point in the history
  • Loading branch information
Massimo Rizzoli committed Dec 8, 2021
1 parent 945a695 commit 1e6d30f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions prnu/prnu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def prnu_extract(flat_image_dataset: str, model: nn.Module = None, device: str =
tqdm_str='Calculating Noiseprints {}'.format(i), \
sigma=sigma)
# create a dictionary associating each fingerprint id with the corresponding estimated prnu
return Dict(zip(fingerprint_device, k))
return dict(zip(fingerprint_device, k))

def prnu_test(nat_image_dataset: str, k: np.array, fingerprint_device: np.array, \
model: nn.Module = None, device: str = 'cuda', gray: bool = False, \
Expand Down Expand Up @@ -167,5 +167,5 @@ def prnu_test(nat_image_dataset: str, k: np.array, fingerprint_device: np.array,

print('AUC on CC {:.2f}'.format(stats_cc['auc']))
print('AUC on PCE {:.2f}'.format(stats_pce['auc']))
return { 'cc': stats_cc, 'pce': stats_pce }

return { 'cc': stats_cc, 'pce': stats_pce }
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = prnu
version = 1.0.0
author = Luca Bondi, Paolo Bestagini, Nicolò Bonettini, Simone Alghisi, Samuele Bortolotti, Massimo Rizzoli
author_email = luca.bondi@polimi.it, paolo.bestagini@polimi.it, nicolo.bonettini@polimi.it, simone.alghisi-1@studenti.unitn.it, samuele.bortolotti@studenti.unitn.it, massimo.rizzoli@studenti.unitn.it
license = GPL3
license = MIT
description = Python function to extract and test PRNU.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 1e6d30f

Please sign in to comment.