Permalink
Branch: master
Find file Copy path
52559c0 Dec 9, 2018
1 contributor

Users who have contributed to this file

15 lines (12 sloc) 523 Bytes
from scannertools import face_detection, vis, sample_video
import scannerpy
import os
def main():
with sample_video() as video:
db = scannerpy.Database()
frames = list(range(50))
bboxes = face_detection.detect_faces(db, videos=[video], frames=[frames])
vis.draw_bboxes(db, videos=[video], frames=[frames], bboxes=bboxes, paths=['sample_faces.mp4'])
print('Wrote video with objects drawn to {}'.format(os.path.abspath('sample_faces.mp4')))
if __name__ == "__main__":
main()