qbarthelemy/PyGOFPID
Python package for good old fashioned perimeter intrusion detection systems for video protection.
PyGOFPID
PyGOFPID is a Python package implementing
perimeter intrusion detection (PID)
systems for video protection.
Leveraging OpenCV, you can easily
define a pipeline using good old fashioned (GOF) computer vision methods, like
foreground detection and
mathematical morphology.
PyGOFPID is distributed under the open source 3-clause BSD license.
Description
Class GOFPID is a versatile tool allowing to build a parameterizable PID
pipeline, composed of:
- input frame denoising by spatial blurring;
- foreground detection by background subtraction or frame differencing;
- foreground mask denoising by mathematical morphology;
- foreground blob creation;
- blob tracking (WIP);
- post-filtering;
- intrusion detection.
See examples/video.py for a simple example.
Comparison on i-LIDS
GOFPID is useful for comparison between ancient and new generations of PID,
between good old fashioned and deep learning based PID.
i-LIDS is a standard dataset
for testing video based PID.
See pyPID for a benchmark between
PID systems on i-LIDS dataset, with results given for
edge-level evaluation after 1s
(precision - recall - F1-score):
| Methods | i-LIDS view 1 | i-LIDS view 2 |
|---|---|---|
| YOLOv2 + SORT [Nayak2019] | 0.62 - 0.52 - 0.57 | 0.99 - 0.47 - 0.64 |
| 3DCAE + MZ [Lohani2022] | 0.90 - 0.74 - 0.81 | 0.83 - 0.64 - 0.73 |
| LUSS-AE + MZ [Lohani2023] | 0.91 - 0.78 - 0.84 | 0.85 - 0.70 - 0.77 |
| GOFPID v1.0.0 | 0.69 - 0.61 - 0.65 | 0.80 - 0.59 - 0.68 |
See examples/dataset_ilids.py for GOFPID configuration of i-LIDS views.
Installation
From sources
To install PyGOFPID as a standard module:
pip install git+https://github.com/qbarthelemy/PyGOFPIDTo install PyGOFPID in editable / development mode, in the folder:
python setup.py developTesting
Use pytest.