Skip to content

Commit

Permalink
feat: added tqdm to video processing
Browse files Browse the repository at this point in the history
  • Loading branch information
ksakmann committed Feb 23, 2017
1 parent 85b8814 commit 772af47
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions search_classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from IPython.display import HTML
from collections import deque
from scipy.ndimage.measurements import label
from IPython.core.debugger import Tracer; debug_here = Tracer()
from tqdm import tqdm


# Load the classifier and parameters
Expand Down Expand Up @@ -277,7 +279,7 @@ def draw_labeled_bboxes(img, labels):
draw_img = draw_labeled_bboxes(np.copy(image), labels)
# Display the image
plt.imshow(draw_img)
plt.show()
#plt.show()



Expand All @@ -300,13 +302,17 @@ def process_image(image):



# Video Processing
print('Processing the video')

out_dir='./output_images/'
inpfile='project_video.mp4'
outfile=out_dir+'processed_'+inpfile
clip = VideoFileClip(inpfile)
out_clip = clip.fl_image(process_image)
get_ipython().magic('time out_clip.write_videofile(outfile, audio=False)')
tqdm(out_clip.write_videofile(outfile, audio=False))

print('Done')

# ## Images for Readme

Expand Down

0 comments on commit 772af47

Please sign in to comment.