diff --git a/project/__pycache__/config.cpython-310.pyc b/project/__pycache__/config.cpython-310.pyc index 4a84538..03fe13a 100644 Binary files a/project/__pycache__/config.cpython-310.pyc and b/project/__pycache__/config.cpython-310.pyc differ diff --git a/project/config.py b/project/config.py index 26ecdef..3d3337f 100644 --- a/project/config.py +++ b/project/config.py @@ -18,7 +18,7 @@ class Config: raw_dataset_path="datasets/raw/" filtered_output_directory="datasets/filtered/" obfuscated_output_directory="datasets/obfuscated/" - max_images_per_dataset= 10000 + max_images_per_dataset= 1500 seg_model_type="models/yolo11l-seg.pt" pose_model_type="models/yolo11l-pose.pt" @@ -33,7 +33,7 @@ class Config: "obfuscation": True, # optional if already done "post_extract": True, # optional if already done "analysis": True, # optional if already done - "visualize": False #Should be always true, since it is the last step for reasoning + "visualize": True #Should be always true, since it is the last step for reasoning } diff --git a/project/main.py b/project/main.py index bffda62..54050aa 100644 --- a/project/main.py +++ b/project/main.py @@ -103,38 +103,9 @@ def main(): percent_axis=True ) - -#TODO: AM WIDER FACE DATENSATZ PRÜFEN, WARUM DIE SCORES SO KOMISCH SIND UND NICHT 100% - #DIE DATEN SIND JA VORBEREITET MIT NO_OP, usw. alles prüfen - - - - -#TODO Nur WIDER und CELEBA/UTK; wegen objektverteilung - -#TODO: Man NO_OP; Prüfen, wegen objekt matching und klassen -#TODO: HEATMAPS zeichnen; CELEBA, WIDER; verteilung Blau auf schwarz? - -#TODO GAnonymization mit "normaler" kopie? - -#TODO In paper beispiele zeigen mit den modellen - #TODO: Experimente für kleine modelle wiederholen? Also statt yolov11l zb yolov11n verwenden? #Möglicherweise gibt es weniger probleme mit besserem modell -#TODO: Die Berechnung jeder einzelnen Metrik überprüfen, metriken prüfen? -#TODO: Die Validitätsprüfung der Daten überprüfen -#TODO: WIE WERDEN DIE METRIKEN BERECHNET? -#TODO: Statt Mittelwert -> Boxplot, bzw Range pro Metrik - -#TODO: EINE VISUALISIERUNG MIT NEM OVERALL SCORE, Durchschnitt aller scores? - -#TODO Und dann zahlen aufschreibern - -#TODO: GGF. Ringmasken verwenden? - -#TODO: Verteilung von Gesichtern und Objekten Visualisieren mit Heatmap, pro datenset? - #TODO: "Make unknown faces happy" # Inputgesicht so optimieren dass emotion besser wird und verschleierung, N-iterationen, Techniken, Parameter anpassen, ... # !!Idee iterativer generic issue solver? Ein kernel der Bildbasiert-die nutzbarkeit optimiert!!@BA? diff --git a/project/obfuscation/obfuscation_engine.py b/project/obfuscation/obfuscation_engine.py index 2e4a487..c3e5323 100644 --- a/project/obfuscation/obfuscation_engine.py +++ b/project/obfuscation/obfuscation_engine.py @@ -58,7 +58,6 @@ class ObfuscationEngine: def obfuscate_datasets(self, path_to_filtered_datasets, output_path, verbose=False): sub_dataset_folders = [os.path.join(path_to_filtered_datasets, sub_dataset_folder) for sub_dataset_folder in os.listdir(path_to_filtered_datasets)] - iterable = sub_dataset_folders if verbose: iterable = tqdm(sub_dataset_folders, desc="Obfuscating folders") diff --git a/project/obfuscation/style.py b/project/obfuscation/style.py index 72972e8..c8d4e7a 100644 --- a/project/obfuscation/style.py +++ b/project/obfuscation/style.py @@ -13,10 +13,11 @@ class Style(ObfuscationTechnique): Replace face with generated face """ def __init__(self): - print("Style not activated") - # self.image_processing_path = "C:/Users/bijan/Desktop/obfuscation_platform/project/models/vtoonify/image_cache/" - # resp = requests.get("http://127.0.0.1:8002/init", timeout=180) - # resp.raise_for_status() + # print("Style not activated") + print("Style activated") + self.image_processing_path = "C:/Users/bijan/Desktop/obfuscation_platform/project/models/vtoonify/image_cache/" + resp = requests.get("http://127.0.0.1:8002/init", timeout=180) + resp.raise_for_status() def obfuscate(self, face_roi_img_bgr: np.ndarray) -> np.ndarray: diff --git a/project/obfuscation/swap.py b/project/obfuscation/swap.py index 9f608f3..0d95e8f 100644 --- a/project/obfuscation/swap.py +++ b/project/obfuscation/swap.py @@ -12,10 +12,11 @@ class Swap(ObfuscationTechnique): Replace face with generated face """ def __init__(self): - print("epic not active") - # self.image_processing_path = "C:/Users/bijan/Desktop/obfuscation_platform/project/models/epic/image_cache/" - # resp = requests.get(f"http://127.0.0.1:8000/init", timeout=60) - # resp.raise_for_status() + # print("epic not active") + print("epic active") + self.image_processing_path = "C:/Users/bijan/Desktop/obfuscation_platform/project/models/epic/image_cache/" + resp = requests.get(f"http://127.0.0.1:8000/init", timeout=60) + resp.raise_for_status() def obfuscate(self, face_roi_img_bgr: np.ndarray) -> np.ndarray: diff --git a/project/obfuscation/synthetic.py b/project/obfuscation/synthetic.py index ea8f939..ac96994 100644 --- a/project/obfuscation/synthetic.py +++ b/project/obfuscation/synthetic.py @@ -13,10 +13,11 @@ class Synthetic(ObfuscationTechnique): """ def __init__(self): - print("synthetic not active") - # self.image_processing_path = "C:/Users/bijan/Desktop/obfuscation_platform/project/models/ganonymization/image_cache/" - # resp = requests.get(f"http://127.0.0.1:8003/init", timeout=120) - # resp.raise_for_status() + # print("synthetic not active") + print("synthetic active") + self.image_processing_path = "C:/Users/bijan/Desktop/obfuscation_platform/project/models/ganonymization/image_cache/" + resp = requests.get(f"http://127.0.0.1:8003/init", timeout=120) + resp.raise_for_status() def obfuscate(self, face_roi_img_bgr: np.ndarray) -> np.ndarray: diff --git a/project/yolo11m-pose.pt b/project/yolo11m-pose.pt deleted file mode 100644 index 5ba48ea..0000000 Binary files a/project/yolo11m-pose.pt and /dev/null differ diff --git a/project/yolo11n-pose.pt b/project/yolo11n-pose.pt deleted file mode 100644 index f8e7370..0000000 Binary files a/project/yolo11n-pose.pt and /dev/null differ diff --git a/project/yolo11n-seg.pt b/project/yolo11n-seg.pt deleted file mode 100644 index 628f517..0000000 Binary files a/project/yolo11n-seg.pt and /dev/null differ