File size: 1,004 Bytes
c4a514c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
setup_dirs.py — MFAF-Net Directory Setup Script

Run once before starting the application to ensure all required
directories exist.

Usage:
    python setup_dirs.py
"""

import os

ROOT = os.path.dirname(os.path.abspath(__file__))

REQUIRED_DIRS = [
    os.path.join(ROOT, 'static', 'results'),
    os.path.join(ROOT, 'static', 'uploads'),
    os.path.join(ROOT, 'static', 'css'),
    os.path.join(ROOT, 'static', 'js'),
    os.path.join(ROOT, 'templates'),
    os.path.join(ROOT, 'mfaf_net'),
    # Dataset directory — extract Complete_PlasticSurgery_Datasets.zip here
    os.path.join(ROOT, 'data'),
]


def setup():
    print("MFAF-Net — Directory Setup")
    print("=" * 40)
    for d in REQUIRED_DIRS:
        if os.path.isdir(d):
            print(f"  [exists]  {d}")
        else:
            os.makedirs(d, exist_ok=True)
            print(f"  [created] {d}")
    print("=" * 40)
    print("Setup complete. All required directories are ready.")


if __name__ == '__main__':
    setup()