Skip to content

noiseprint2 is a porting of noiseprint to tensorflow 2 and keras

License

Notifications You must be signed in to change notification settings

francescotescari/noiseprint2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

noiseprint2

This module is lightweight, simple to use, porting of the original noiseprint repo using keras and tensorflow 2.

All the credits for noiseprint goes to the original authors at GRIP UNINA.

This porting can be useful to enable eager execution in tensorflow and compute the noiseprint at the same time.

Original repo: https://github.com/grip-unina/noiseprint

Original paper: http://doi.org/10.1109/TIFS.2019.2916364

Installation

Use the package manager pip to install noiseprint2.

git clone https://github.com/francescotescari/noiseprint2.git
cd noiseprint2
pip install .

Usage

If you want to run the sample script to generate the noiseprint for a given image (at IMAGE_PATH)

python sample.py [-h] [-q QUALITY] [--show] [-o OUTPUT_PATH] IMAGE_PATH

Access the module APIs:

from noiseprint2 import NoiseprintEngine, gen_noiseprint, normalize_noiseprint

# How to compute noiseprint of a single image
noiseprint = gen_noiseprint(image path or image data, quality_level)
# Util function to normalize the noiseprint
noiseprint = normalize_noiseprint(noiseprint)

# How to compute the noiseprint of batches of images without reloading the weights each time:
engine = NoiseprintEngine()
engine.load_quality(56)
noiseprint1 = engine.predict(image1)
noiseprint2 = engine.predict(image2)
...
engine.load_quality(76)
noiseprint23 = engine.predict(image23)
noiseprint24 = engine.predict(image24)
...

License

Please consider the original license at https://github.com/grip-unina/noiseprint/blob/master/LICENSE.txt

About

noiseprint2 is a porting of noiseprint to tensorflow 2 and keras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages