certified
This commit is contained in:
@@ -9,10 +9,10 @@ class CelebA(Data):
|
||||
|
||||
def get_set(self):
|
||||
set = datasets.CelebA(
|
||||
root = "./data",
|
||||
root = "../data",
|
||||
split='all',
|
||||
target_type='identity',
|
||||
download=True,
|
||||
download=False,
|
||||
transform=None
|
||||
)
|
||||
# set the target first
|
||||
|
||||
@@ -75,7 +75,7 @@ def extract_selected_binary(rec_path, idx_path, output_dir, top_labels):
|
||||
current_count = save_counters[label]
|
||||
img_filename = f"{current_count}.jpg"
|
||||
img_path = os.path.join(target_folder, img_filename)
|
||||
if(current_count > 200):
|
||||
if(current_count > 405):
|
||||
continue
|
||||
|
||||
with open(img_path, 'wb') as img_f:
|
||||
@@ -119,9 +119,9 @@ if __name__ == "__main__":
|
||||
'''
|
||||
if __name__ == "__main__":
|
||||
base_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
REC = os.path.join(base_dir, 'casia', 'train.rec')
|
||||
IDX = os.path.join(base_dir, 'casia', 'train.idx')
|
||||
OUT = os.path.join(base_dir, 'casia-set')
|
||||
REC = os.path.join(base_dir, '../data/casia-set', 'train.rec')
|
||||
IDX = os.path.join(base_dir, '../data/casia-set', 'train.idx')
|
||||
OUT = os.path.join(base_dir, '../data/casia-set')
|
||||
|
||||
# Step 1: Trust the binary, not the text file
|
||||
top_verified_labels = get_top_identities_binary(REC, IDX, top_n=50)
|
||||
|
||||
Reference in New Issue
Block a user