Provisioning of the project code

We start scripting our project in the file tensorflow_detection.py by loading the necessary packages:

import osimport numpy as npimport tensorflow as tfimport six.moves.urllib as urllibimport tarfilefrom PIL import Imagefrom tqdm import tqdmfrom time import gmtime, strftimeimport jsonimport cv2

In order to be able to process videos, apart from OpenCV 3, we also need the moviepy package. The package moviepy is a project that can be found at http://zulko.github.io/moviepy/ and freely used since it is distributed with an MIT license. As described on its home page, moviepy is a tool for video editing (that is cuts, concatenations, title insertions), video compositing (non-linear editing), video processing, or ...

Get TensorFlow Deep Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.