mirror of
https://github.com/MarcosRodrigoT/ViT-Face-Recognition.git
synced 2025-12-30 08:02:29 +00:00
Load data
This commit is contained in:
@@ -1,7 +1,26 @@
|
||||
import os
|
||||
import tensorflow as tf
|
||||
from vit_keras import vit
|
||||
|
||||
|
||||
"""
|
||||
CREATE DATASET
|
||||
"""
|
||||
BASE_DIR = '/mnt/Data/mrt/SCface_database'
|
||||
MUGSHOT_DIR = f'{BASE_DIR}/mugshot_frontal_cropped_all'
|
||||
SURVEILLANCE_DIR = f'{BASE_DIR}/surveillance_cameras_all'
|
||||
|
||||
print(os.listdir(MUGSHOT_DIR))
|
||||
mugshot_data = {}
|
||||
for file in os.listdir(MUGSHOT_DIR):
|
||||
person = file.split('_')[0]
|
||||
file_path = os.path.join(MUGSHOT_DIR, file)
|
||||
mugshot_data[person] = {'file': file_path, 'embeddings': None}
|
||||
|
||||
surveillance_data = {}
|
||||
for person in mugshot_data.keys():
|
||||
surveillance_data[person] = {'files': [], 'embeddings': []}
|
||||
for file in os.listdir(SURVEILLANCE_DIR):
|
||||
person = file.split('_')[0]
|
||||
file_path = os.path.join(SURVEILLANCE_DIR, file)
|
||||
surveillance_data[person]['files'].append(file_path)
|
||||
surveillance_data[person]['embeddings'].append(None)
|
||||
|
||||
Reference in New Issue
Block a user