File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
projects/math/numerical-linalg/notebooks Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,15 @@ first-image
108108 bufimg/tensor->image)
109109
110110; ; Now let us collect the small tensors.
111+ ; ; We will take just 70 frames of the video,
112+ ; ; simply because it is enough for demonstrating
113+ ; ; the methods of this tutorial.
111114
112115(def small-tensors
113116 (into []
114- (map (comp image->small-tensor
115- clj-media.model/image))
117+ (comp (take 70 )
118+ (map (comp image->small-tensor
119+ clj-media.model/image)))
116120 (clj-media/frames
117121 (clj-media/file video-path)
118122 :video
@@ -258,7 +262,7 @@ first-image
258262 tensor-normalize
259263 (dfn/* 255 )
260264 dtype/->int-array
261- (tensor/reshape [120 160 350 ])
265+ (tensor/reshape [120 160 70 ])
262266 (tensor/transpose [2 0 1 ])
263267 (->> (mapv bufimg/tensor->image))))
264268
@@ -285,7 +289,7 @@ first-image
285289
286290(def generated-frames
287291 (let [frame-rate 7
288- seconds 50
292+ seconds 10
289293 num-frames (* seconds frame-rate)]
290294 (into []
291295 (map-indexed (fn [pts image]
You can’t perform that action at this time.
0 commit comments