Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

Deep Learning Based Out-of-focus Detection on Surveillance Footage

Bengtsson, Hanna LU and Kerac, Teodora LU (2023) In Master's Theses in Mathematical Sciences FMAM05 20231
Mathematics (Faculty of Engineering)
Abstract
Loss of focus in surveillance cameras can occur due to factors such as environmental aspects, sabotage or system errors. The focus loss leads to degraded footage that is of no use for either post-investigation or automatic video analysis. It is therefore of the utmost importance to provide an automatic detection system in order to resolve the issue as fast as possible.


The most popular approaches for out-of-focus detection in image analysis can be categorized into traditional, deep learning-based and a combination of the two. The traditional methods are usually based on a comparison between consecutive frames, where the edge content is in some way quantified and compared. Recent related works focus heavily on the learning and... (More)
Loss of focus in surveillance cameras can occur due to factors such as environmental aspects, sabotage or system errors. The focus loss leads to degraded footage that is of no use for either post-investigation or automatic video analysis. It is therefore of the utmost importance to provide an automatic detection system in order to resolve the issue as fast as possible.


The most popular approaches for out-of-focus detection in image analysis can be categorized into traditional, deep learning-based and a combination of the two. The traditional methods are usually based on a comparison between consecutive frames, where the edge content is in some way quantified and compared. Recent related works focus heavily on the learning and combination-based approaches, promising a higher blur detection accuracy. We apply this to the field of surveillance footage and evaluate the performance of a popular traditional method based on Discrete Fourier Transform (DFT) and three different Convolutional Neural Networks (CNNs); Pix2Pix, MANN and MFF.


There are several important requirements for surveillance application considered in this project: flexibility in regards to different camera resolutions and robustness to different surroundings, as well as weather- and lighting conditions. Considering the computational weight and memory requirements is also of importance for on-edge camera application. To train the networks on an objective amount of blur, a method for artificial blurring is utilized. A large dataset is acquired using Axis cameras, and a Gaussian Kernel is applied for obtaining various blur levels. The models are finally tested on optical blur, on images created by manually changing the focus level on the used cameras.


Of the three implemented CNN networks, the Pix2Pix model shows the most promising results, with the disadvantage of being the largest. However, the size is dramatically decreased with the use of unstructured pruning and quantization. Unexpectedly high accuracy is also achieved by the computationally heavy DFT approach, with the exception of bad generalization properties. In the future, a combination method could be of interest, as well as expanding the model for detection of additional anomalies or weather conditions such as fog, rain, tampering etc. (Less)
Please use this url to cite or link to this publication:
author
Bengtsson, Hanna LU and Kerac, Teodora LU
supervisor
organization
course
FMAM05 20231
year
type
H2 - Master's Degree (Two Years)
subject
keywords
Deep Learning, CNN, Out-of-focus detection
publication/series
Master's Theses in Mathematical Sciences
report number
LUTFMA-3505-2023
ISSN
1404-6342
other publication id
2023:E28
language
English
id
9126520
date added to LUP
2023-08-22 16:40:58
date last changed
2023-08-22 16:40:58
@misc{9126520,
  abstract     = {{Loss of focus in surveillance cameras can occur due to factors such as environmental aspects, sabotage or system errors. The focus loss leads to degraded footage that is of no use for either post-investigation or automatic video analysis. It is therefore of the utmost importance to provide an automatic detection system in order to resolve the issue as fast as possible. 


The most popular approaches for out-of-focus detection in image analysis can be categorized into traditional, deep learning-based and a combination of the two. The traditional methods are usually based on a comparison between consecutive frames, where the edge content is in some way quantified and compared. Recent related works focus heavily on the learning and combination-based approaches, promising a higher blur detection accuracy. We apply this to the field of surveillance footage and evaluate the performance of a popular traditional method based on Discrete Fourier Transform (DFT) and three different Convolutional Neural Networks (CNNs); Pix2Pix, MANN and MFF.


There are several important requirements for surveillance application considered in this project: flexibility in regards to different camera resolutions and robustness to different surroundings, as well as weather- and lighting conditions. Considering the computational weight and memory requirements is also of importance for on-edge camera application. To train the networks on an objective amount of blur, a method for artificial blurring is utilized. A large dataset is acquired using Axis cameras, and a Gaussian Kernel is applied for obtaining various blur levels. The models are finally tested on optical blur, on images created by manually changing the focus level on the used cameras. 


Of the three implemented CNN networks, the Pix2Pix model shows the most promising results, with the disadvantage of being the largest. However, the size is dramatically decreased with the use of unstructured pruning and quantization. Unexpectedly high accuracy is also achieved by the computationally heavy DFT approach, with the exception of bad generalization properties. In the future, a combination method could be of interest, as well as expanding the model for detection of additional anomalies or weather conditions such as fog, rain, tampering etc.}},
  author       = {{Bengtsson, Hanna and Kerac, Teodora}},
  issn         = {{1404-6342}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{Master's Theses in Mathematical Sciences}},
  title        = {{Deep Learning Based Out-of-focus Detection on Surveillance Footage}},
  year         = {{2023}},
}