Spaces:
Sleeping
Sleeping
Update config.py
Browse files
config.py
CHANGED
|
@@ -1,23 +1,24 @@
|
|
| 1 |
-
from pathlib import Path
|
| 2 |
-
import numpy as np
|
| 3 |
-
|
| 4 |
-
#
|
| 5 |
-
BASE_PATH = Path(
|
| 6 |
-
|
| 7 |
-
# Output directory for CSV files
|
| 8 |
-
OUTPUT_DIR = BASE_PATH / "features"
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
import numpy as np
|
| 3 |
+
|
| 4 |
+
# Dynamically get the base path for dataset
|
| 5 |
+
BASE_PATH = Path(__file__).parent.resolve()
|
| 6 |
+
|
| 7 |
+
# Output directory for CSV files
|
| 8 |
+
OUTPUT_DIR = BASE_PATH / "features"
|
| 9 |
+
OUTPUT_DIR.mkdir(parents=True, exist_ok=True) # Ensure directory exists
|
| 10 |
+
|
| 11 |
+
# Image processing parameters
|
| 12 |
+
IMAGE_SIZE = (64, 64) # Resize images for consistency
|
| 13 |
+
|
| 14 |
+
# GLCM Parameters
|
| 15 |
+
DISTANCES = [1, 2, 3, 4]
|
| 16 |
+
ANGLES = [0, 0.25 * np.pi, 0.5 * np.pi, 0.75 * np.pi] # 0°, 45°, 90°, 135°
|
| 17 |
+
|
| 18 |
+
# LBP Parameters
|
| 19 |
+
LBP_RADIUS = 3
|
| 20 |
+
LBP_POINTS = min(8 * LBP_RADIUS, 24)
|
| 21 |
+
LBP_METHOD = "uniform"
|
| 22 |
+
|
| 23 |
+
# Texture classes
|
| 24 |
+
TEXTURE_CLASSES = ["wood", "brick", "stone"]
|