{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Start by creating a new `conda` environment:\n", "\n", "```bash\n", "$ conda create -n pyannote python=3.6 anaconda\n", "$ source activate pyannote\n", "```\n", "\n", "Then, install `pyannote-video` and its dependencies:\n", "\n", "```bash\n", "$ pip install pyannote-video\n", "```\n", "\n", "Finally, download sample video and `dlib` models:\n", "\n", "```bash\n", "$ git clone https://github.com/pyannote/pyannote-data.git\n", "$ git clone https://github.com/davisking/dlib-models.git\n", "$ bunzip2 dlib-models/dlib_face_recognition_resnet_model_v1.dat.bz2\n", "$ bunzip2 dlib-models/shape_predictor_68_face_landmarks.dat.bz2\n", "```\n", "\n", "To execute this notebook locally:\n", "```bash\n", "$ git clone https://github.com/pyannote/pyannote-video.git\n", "$ jupyter notebook --notebook-dir=\"pyannote-video/doc\"\n", "```\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "%pylab inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Shot segmentation" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Video structure\r\n", "\r\n", "The standard pipeline for is the following:\r\n", "\r\n", " shot boundary detection ==> shot threading ==> segmentation into scenes\r\n", "\r\n", "Usage:\r\n", " pyannote-structure.py shot [options]