From 5a91b25503473c733dfbf044b37dc627bf9bc260 Mon Sep 17 00:00:00 2001 From: HappyZ Date: Mon, 10 Jun 2019 11:55:44 -0500 Subject: [PATCH] Update 002.extract_measurements.py --- .../002.extract_measurements.py | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/opencellid_parsing/002.extract_measurements.py b/opencellid_parsing/002.extract_measurements.py index c88cf06..f3f766d 100644 --- a/opencellid_parsing/002.extract_measurements.py +++ b/opencellid_parsing/002.extract_measurements.py @@ -4,8 +4,7 @@ import os import sys import pickle -print("load ~55GB data into memory! do not try this if not on server machine") - +print("load ~45GB data into memory! do not try this if not on server machine") ############################ # extract measurements @@ -51,26 +50,3 @@ for key in data: pickle.dump(data_with_gt, open(pickle_fp_with_gt, 'wb')) pickle.dump(data_no_gt, open(pickle_no_gt, 'wb')) pickle.dump(data_unseen, open(pickle_fp_unseen, 'wb')) - - -# print("extracting each file to disk (only groundtruth we cared)..") -# counter = 0 -# for filepath in data: -# if "with_groundtruth" not in filepath: -# continue -# if not os.path.isfile(filepath): -# outputsubfolder = os.path.dirname(filepath) -# if not os.path.isdir(outputsubfolder): -# try: -# os.makedirs(outputsubfolder) -# except BaseException: -# print("err: cannot create folder {}!!!!".format(outputsubfolder)) -# continue -# with open(filepath, 'w') as of: -# of.write(headlines.get(data[filepath][0], headline) + '\n') -# with open(filepath, 'a') as of: -# for dataline in data[filepath][1]: -# of.write(dataline + "\n") -# counter += 1 -# if counter % 1000 == 0: -# print("progress: {} out of {} files extracted ({:.2f}%)".format(counter, len(data), 100.0 * counter / len(data)))