ms-celeb-1m: Remove magic dependency from extraction script.

This commit is contained in:
Brandon Amos 2016-07-29 15:53:54 -04:00
parent 24f616b0bb
commit c35e2f38a8
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ import argparse
import base64
import csv
import os
import magic # Detect image type from buffer contents (disabled, all are jpg)
# import magic # Detect image type from buffer contents (disabled, all are jpg)
parser = argparse.ArgumentParser()
parser.add_argument('croppedTSV', type=str)
@ -42,7 +42,7 @@ with open(args.croppedTSV, 'r') as tsvF:
saveDir = os.path.join(args.outputDir, faceID)
savePath = os.path.join(saveDir, MID+'.jpg')
assert(magic.from_buffer(data) == 'JPEG image data, JFIF standard 1.01')
# assert(magic.from_buffer(data) == 'JPEG image data, JFIF standard 1.01')
os.makedirs(saveDir, exist_ok=True)
with open(savePath, 'wb') as f: