pidoko commited on
Commit
fc9b81e
·
verified ·
1 Parent(s): e31f97a

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +24 -23
config.py CHANGED
@@ -1,23 +1,24 @@
1
- from pathlib import Path
2
- import numpy as np
3
-
4
- # Base path for dataset
5
- BASE_PATH = Path("C:/Users/peter_idoko.VACFSS/Documents/VSCode/textureClassification")
6
-
7
- # Output directory for CSV files
8
- OUTPUT_DIR = BASE_PATH / "features"
9
-
10
- # Image processing parameters
11
- IMAGE_SIZE = (64, 64) # Resize images for consistency
12
-
13
- # GLCM Parameters
14
- DISTANCES = [1, 2, 3, 4]
15
- ANGLES = [0, 0.25 * np.pi, 0.5 * np.pi, 0.75 * np.pi] # 0°, 45°, 90°, 135°
16
-
17
- # LBP Parameters
18
- LBP_RADIUS = 3
19
- LBP_POINTS = min(8 * LBP_RADIUS, 24)
20
- LBP_METHOD = "uniform"
21
-
22
- # Texture classes
23
- TEXTURE_CLASSES = ["wood", "brick", "stone"]
 
 
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"]