scannertools

Scannertools is a high-level Python library for scalable video analysis built on the Scanner video processing engine. Scannertools provides easy-to-use, off-the-shelf implementations of:

Examples are provided below (visuals from this video). Auto-generated API documentation is available here.

Object detection

Find many kinds of objects (people, cars, chairs, …) in a video using detect_objects(). Full example here.

import scannertools.object_detection as objdet
import scannertools.vis as vis
bboxes = objdet.detect_objects(db, video)
vis.draw_bboxes(db, video, bboxes)

Face detection

Find people’s faces in a video using detect_faces(). Full example here.

import scannertools.face_detection as facedet
import scannertools.vis as vis
bboxes = facedet.detect_faces(db, video)
vis.draw_bboxes(db, video, bboxes)

Pose detection

Detect people’s poses (two-dimensional skeletons) using detect_poses(). Full example here.

import scannertools.pose_detection as posedet
import scannertools.vis as vis
poses = posedet.detect_poses(db, video)
vis.draw_poses(db, video, poses)

Optical flow

Compute dense motion vectors between frames with compute_flow(). Full example here.

import scannertools.optical_flow as optflow
import scannertools.vis as vis
flow_fields = optflow.compute_flow(db, video)
vis.draw_flow_fields(db, video, flow_fields)

Shot detection

Find shot changes in a video using detect_shots(). Full example here.

import scannertools.shot_detection as shotdet
shots = shotdet.detect_shots(db, video)
montage_img = video.montage(shots)
tb.imwrite('shots.jpg', montage_img)
https://storage.googleapis.com/scanner-data/public/sample-shots-small.jpg

Random frame access

Extract individual frames from a video with low overhead using Video.frame. Full example here.

frame = video.frame(0)
tb.imwrite('frame0.jpg', frame)
https://storage.googleapis.com/scanner-data/public/sample-frame.jpg