/tampar

Code of our WACV '24 paper "TAMPAR: Visual Tampering Detection for Parcel Logistics in Postal Supply Chains".

Primary LanguageJupyter NotebookMIT LicenseMIT

arxiv project page CI

TAMPAR

This repo was developed as part of our WACV '24 paper "TAMPAR: Visual Tampering Detection for Parcels Logistics in Postal Supply Chains" (citation), also check the project page for more details.

Overview
Figure: We detect tampering by comparing the full parcel texture from a database (a) with the viewpoint-invariant parcel side surfaces of a single image by exploiting parcel corner point predictions (b). Appearance change detection is performed for each pair of matching parcel side surfaces to identify tampering (c). © IEEE 2024.

Usage

Setup

We highly recommend to use the provided Devcontainer to make the usage as easy as possible:

  • Install Docker and VS Code
  • Install VS Code Devcontainer extension ms-vscode-remote.remote-containers
  • Clone the repository
    git clone https://github.com/a-nau/tampar.git
  • Press F1 (or CTRL + SHIFT + P) and select Dev Containers: Rebuild and Reopen Container
  • Go to Run and Debug (CTRL + SHIFT + D) and press the run button, alternatively press F5

Afterwards

  • Download the pre-trained SimSaC weights from here and paste them into src/simsac/weight
  • Download the pre-trained keypoint detection weights from here

Keypoint Detection

To run a training on our 5 example images run:

python src/tools/train_maskrcnn.py --config-file ./src/maskrcnn/configs/test.yaml --gpus "0" --num-gpus 1 --num-machines 1

Predict Tampering

We first need to compute all relevant similarity scores

python src/tools/compute_similarity_scores.py

Afterwards, we can train the decision tree and predict tampering using

python src/tools/predict_tampering.py

Note: This will run only on the sample data from data/tampar_sample/.

TAMPAR dataset

You can download the dataset from Zenodo.

Overview
Figure: Visual samples from TAMPAR. Check our project website for more.

Citation

If you use the code of our paper for scientific research, please consider citing

@inproceedings{naumannTAMPAR2024,
    author    = {Naumann, Alexander and Hertlein, Felix and D\"orr, Laura and Furmans, Kai},
    title     = {TAMPAR: Visual Tampering Detection for Parcels Logistics in Postal Supply Chains},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
    month     = {January},
    year      = {2024},
    note      = {to appear in}
}

Affiliations

FZI Logo

Credits

Unless otherwise stated, this repo is distributed under MIT License.