Coder Social home page Coder Social logo

noiseprint-tf2's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.