The original work is based on
Original Travis build
Python package which provides several functions to compute and test cameras PRNU.
We have added, to the original work, the possibility to carry out noise extraction using a PyTorch model which accepts normalized images whose values are between 0 and 1.
Since the project has been adapted to deal with the following FFDNet implementation, the input of such model should be an image with size [1, channels, heigth, width] and the standard deviation (sigma) of the noise.
- Luca Bondi (luca.bondi@polimi.it)
- Paolo Bestagini (paolo.bestagini@polimi.it)
- Nicolò Bonettini (nicolo.bonettini@polimi.it)
- Simone Alghisi (simone.alghisi-1@studenti.unitn.it)
- Samuele Bortolotti (samuele.bortolotti@studenti.unitn.it)
- Massimo Rizzoli (massimo.rizzoli@studenti.unitn.it)
Clone this repository
git clone https://github.com/samuelebortolotti/prnu-python
Move to the project folder
cd prnu-python
The installation with pip
can be performed as follows
pip install .
Or directly from GitHub
pip install git+git://github.com/samuelebortolotti/prnu-python@v[version]
Where [version] is the version of the
pip install git+git://github.com/samuelebortolotti/prnu-python@v2.0
Or you can add the package in your requirements.txt
file, and
install it later, by including the following line
git+git://github.com/samuelebortolotti/prnu-python@v[version]
For example:
git+git://github.com/samuelebortolotti/prnu-python@v2.0
Now you can import the prnu
package whenever and wherever you want.
You can use the GNU Makefile
to generate the virtual environment by
typing
make env
Activate the virtual environment
source venv/prnu/bin/activate
Install the requirements
make install
The documentation is generated using Sphinx.
First, install the development requirements
make install-dev
Then generate the Sphinx layout
make doc-layout
Generate the documentation content; the documentation will be generated
in the docs
folder.
make doc
Then, you can open the documentation through xdg-open
by typing
make open-doc
You can run the tests by typing
cd test
python -m unittest test_prnu.TestPrnu
Tested with Python >= 3.6
Reference MATLAB implementation by Binghamton university: http://dde.binghamton.edu/download/camera_fingerprint/