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.
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.
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
(orCTRL + SHIFT + P
) and selectDev Containers: Rebuild and Reopen Container
- Go to
Run and Debug (CTRL + SHIFT + D)
and press the run button, alternatively pressF5
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
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
- To add your own dataset, you need to register in the register_datasets.py.
- To check your results qualitatively you can use detectron_qualitative_evaluation.ipynb
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/.
You can download the dataset from Zenodo.
Figure:
Visual samples from TAMPAR.
Check our project website for more.
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}
}
- We use SimSaC inference code. Licensed under GPL-3.0 which applies to folder src/simsac
- The Mask R-CNN is borrowed from CubeRefine R-CNN (See License) and this implementation (MIT License), which applies to folder src/maskrcnn
Unless otherwise stated, this repo is distributed under MIT License.