Scannertools¶
Scannertools is a high-level python library for scalable video analysis built on Scanner. 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)
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)
