Skip to content

Python package for good old fashioned perimeter intrusion detection systems for video protection.

Notifications You must be signed in to change notification settings

qbarthelemy/PyGOFPID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGOFPID

Code PythonVersion License

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:

  1. input frame denoising by spatial blurring;
  2. foreground detection by background subtraction or frame differencing;
  3. foreground mask denoising by mathematical morphology;
  4. foreground blob creation;
  5. blob tracking (WIP);
  6. post-filtering;
  7. 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/PyGOFPID

To install PyGOFPID in editable / development mode, in the folder:

pip install -e .

Testing

Use pytest.