mirror of
https://github.com/esimov/forensic.git
synced 2025-09-27 04:45:58 +08:00
Update README.md
This commit is contained in:
68
README.md
68
README.md
@@ -1,6 +1,6 @@
|
|||||||
## Forensic
|
# Forensic
|
||||||
|
|
||||||
Forensic is an image processing library which aims to detect copy-move forgeries in digital images. It's implementation is mainly based on this paper: https://arxiv.org/pdf/1308.5661.pdf
|
Forensic is an image processing library which aims to detect copy-move forgeries in digital images. The implementation is mainly based on this paper: https://arxiv.org/pdf/1308.5661.pdf
|
||||||
|
|
||||||
### Implementation details
|
### Implementation details
|
||||||
|
|
||||||
@@ -13,3 +13,67 @@ Forensic is an image processing library which aims to detect copy-move forgeries
|
|||||||
* Search for similar pairs of blocks. Because identical blocks are most probably neighbors, after ordering them in lexicographic order we need to apply a specific threshold to filter out the false positive detections. If the distance between two neighboring blocks is smaller than a predefined threshold the blocks are considered as a pair of candidate for the forgery.
|
* Search for similar pairs of blocks. Because identical blocks are most probably neighbors, after ordering them in lexicographic order we need to apply a specific threshold to filter out the false positive detections. If the distance between two neighboring blocks is smaller than a predefined threshold the blocks are considered as a pair of candidate for the forgery.
|
||||||
* For each pair of candidate compute the cumulative number of shift vectors (how many times the same block is detected). If that number is greater than a predefined threshold the corresponding regions are considered forged.
|
* For each pair of candidate compute the cumulative number of shift vectors (how many times the same block is detected). If that number is greater than a predefined threshold the corresponding regions are considered forged.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
First install Go if you haven't installed already, set your `GOPATH`, and make sure `$GOPATH/bin` is on your `PATH`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ export GOPATH="$HOME/go"
|
||||||
|
$ export PATH="$PATH:$GOPATH/bin"
|
||||||
|
```
|
||||||
|
Next download the project and build the binary file.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ go get -u -f github.com/esimov/forensic
|
||||||
|
$ go install
|
||||||
|
```
|
||||||
|
|
||||||
|
In case you do not want to build the binary file yourself you can obtain the prebuilt one from the [releases](https://github.com/esimov/forensic/releases) folder.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ forensic -in input.jpg -out output.jpg
|
||||||
|
```
|
||||||
|
|
||||||
|
### Supported commands:
|
||||||
|
```bash
|
||||||
|
$ forensic --help
|
||||||
|
__ _
|
||||||
|
/ _| ___ _ __ ___ _ __ ___(_) ___
|
||||||
|
| |_ / _ \| '__/ _ \ '_ \/ __| |/ __|
|
||||||
|
| _| (_) | | | __/ | | \__ \ | (__
|
||||||
|
|_| \___/|_| \___|_| |_|___/_|\___|
|
||||||
|
|
||||||
|
Image forgery detection library.
|
||||||
|
Version:
|
||||||
|
|
||||||
|
-blur int
|
||||||
|
Blur radius (default 1)
|
||||||
|
-bs int
|
||||||
|
Block size (default 4)
|
||||||
|
-dt float
|
||||||
|
Distance threshold (default 0.4)
|
||||||
|
-ft float
|
||||||
|
Forgery threshold (default 210)
|
||||||
|
-in string
|
||||||
|
Source
|
||||||
|
-ot int
|
||||||
|
Offset threshold (default 72)
|
||||||
|
-out string
|
||||||
|
Destination
|
||||||
|
```
|
||||||
|
|
||||||
|
## Results
|
||||||
|
| Original | Forged | Result |
|
||||||
|
| --- | --- | --- |
|
||||||
|
|  |  |  |
|
||||||
|
|  |  | 
|
||||||
|
|
||||||
|
### Notice
|
||||||
|
The library sometimes produce false positive detection, depending on the image content. For this reason i advice to adjust the settings. Also sometimes the human judgement is required, but in the most cases the library do a pretty good job in detecting forged images. The more intensive the overlayed color is, the more certain is that the image is tampered.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Copyright © 2018 Endre Simo
|
||||||
|
|
||||||
|
This project is under the MIT License. See the LICENSE file for the full license text.
|
||||||
|
Reference in New Issue
Block a user