Skip to content

Commit 3fc6560

Browse files
committed
Switched from dump() to save(), so that pickel is not needed when loading the array back.
1 parent b0a283a commit 3fc6560

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

dfki_sl_videotools/extract_face_data.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,14 @@ def extract_face_data(videofilename: str,
406406
out_composite_video_path=compositevideopath,
407407
normalize_landmarks=normalize_landmarks)
408408
# Save numpy arrays to a file
409-
for filepath, data in [(landmarkspath, landmarksdata),
410-
(nosetippositionpath, nosetipdata),
411-
(facerotationpath, facerotdata),
412-
(facescalepath, facescaledata)]:
409+
for filepath, data in\
410+
[(landmarkspath, landmarksdata),
411+
(nosetippositionpath, nosetipdata),
412+
(facerotationpath, facerotdata),
413+
(facescalepath, facescaledata)]:
414+
413415
if filepath is not None:
414416
print("Saving numpy array to '{}'".format(filepath))
415-
data.dump(file=filepath)
417+
np.save(file=filepath, arr=data, allow_pickle=False)
416418

417419
print("Done.")

0 commit comments

Comments
 (0)