video699.event.vgg16

This module implements a screen event detector that matches last hidden VGG16 layer activations for document page image data with last hidden VGG16 layer activations for projection screen image data. Related classes and functions are also implemented.

Module Contents

video699.event.vgg16.LOGGER
video699.event.vgg16.CONFIGURATION
video699.event.vgg16.VGG16_RGB_MEAN = [123.68, 116.779, 103.939]
video699.event.vgg16.VGG16_INPUT_SIZE = 224
video699.event.vgg16.VGG16_OUTPUT_SIZE = 25088
video699.event.vgg16.VGG16_MODEL
video699.event.vgg16._last_hidden_vgg16_layer(images)

Produces the last hidden VGG16 layer activations for images.

Parameters:images (iterable of ImageABC) – Images.
Returns:activations – The last hidden VGG16 layer activations for the images.
Return type:iterable of array_like
class video699.event.vgg16.VGG16PageDetector(documents)

Bases: video699.interface.PageDetectorABC

A page detector using approximate nearest neighbor search of last VGG16 layer activations.

The VGG16 model is based on the paper by Simonyan and Zisserman [Simonyan15].

Parameters:documents (set of DocumentABC) – The provided document pages.
detect(self, frame, appeared_screens, existing_screens, disappeared_screens)
class video699.event.vgg16.RTreeDequeVGG16EventDetector(video, screen_detector, documents)

Bases: video699.event.screen.ScreenEventDetectorABC

A screen event detector that wraps VGG16PageDetector and serves as a facade.

A ScreenEventDetector is instantiated with the RTreeDequeConvexQuadrangleTracker convex quadrangle tracker and the VGG16PageDetector page detector.

Parameters:
  • video (VideoABC) – The video in which the events are detected.
  • screen_detector (ScreenDetectorABC) – A screen detector that will be used to detect lit projection screens in video frames.
  • documents (set of DocumentABC) – Documents whose pages are matched against detected lit projection screens.
video

VideoABC – The video in which the events are detected.

video
__iter__(self)