Spaces:
Sleeping
Sleeping
danibalcells
commited on
Commit
•
da734e6
1
Parent(s):
8d972cb
Add crop preprocessing script
Browse files- preprocess.py +3 -2
preprocess.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import os
|
2 |
from PIL import Image
|
3 |
import random
|
|
|
4 |
|
5 |
# Define the source and destination directories
|
6 |
-
src_dir = Path('
|
7 |
-
dst_dir = Path('
|
8 |
dst_dir.mkdir(parents=True, exist_ok=True)
|
9 |
|
10 |
# Define the scale
|
|
|
1 |
import os
|
2 |
from PIL import Image
|
3 |
import random
|
4 |
+
from pathlib import Path
|
5 |
|
6 |
# Define the source and destination directories
|
7 |
+
src_dir = Path('dataset/parents')
|
8 |
+
dst_dir = Path('dataset/crops')
|
9 |
dst_dir.mkdir(parents=True, exist_ok=True)
|
10 |
|
11 |
# Define the scale
|