Moving video imports inside classigy_video method
..to remove hard dependency on video modules
@@ -55,7 +55,6 @@ from time import time
import tempfile
-from video_util import get_center_frame, get_frames_interval, get_n_frames
import flask
@@ -422,6 +421,9 @@ def classify_video():
ext - If video is sent in binary format, then ext is needed to tell OpenCV which decoder to use. eg ".mp4"
"""
+ #This import is placed here to ensure that video_util and OpenCV is not required for image recognition APIs
+ #It will be imported only once during first API call and so first call could be slow
+ from video_util import get_center_frame, get_frames_interval, get_n_frames
st = current_time()
topk = int(request.args.get("topk", "10"))
