MFAF-Net / setup_dirs.py
haresh2792005's picture
Upload MFAF-Net (model)
c4a514c verified
Raw History Blame Contribute Delete
1 kB
"""
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()