Conor Brennan (k23064919) commited on
Commit
b4cabda
·
unverified ·
1 Parent(s): d2037f7

Update config.py

Browse files

clean config file

Files changed (1) hide show
  1. ui/config.py +6 -68
ui/config.py CHANGED
@@ -1,77 +1,15 @@
1
- """
2
- Configuration file for Plant Disease Detection UI
3
- Contains class names, paths, and other settings
4
- """
5
 
6
- # PlantVillage dataset has 39 classes
7
- CLASS_NAMES = [
8
- "Apple___Apple_scab",
9
- "Apple___Black_rot",
10
- "Apple___Cedar_apple_rust",
11
- "Apple___healthy",
12
- "Blueberry___healthy",
13
- "Cherry_(including_sour)___Powdery_mildew",
14
- "Cherry_(including_sour)___healthy",
15
- "Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot",
16
- "Corn_(maize)___Common_rust_",
17
- "Corn_(maize)___Northern_Leaf_Blight",
18
- "Corn_(maize)___healthy",
19
- "Grape___Black_rot",
20
- "Grape___Esca_(Black_Measles)",
21
- "Grape___Leaf_blight_(Isariopsis_Leaf_Spot)",
22
- "Grape___healthy",
23
- "Orange___Haunglongbing_(Citrus_greening)",
24
- "Peach___Bacterial_spot",
25
- "Peach___healthy",
26
- "Pepper,_bell___Bacterial_spot",
27
- "Pepper,_bell___healthy",
28
- "Potato___Early_blight",
29
- "Potato___Late_blight",
30
- "Potato___healthy",
31
- "Raspberry___healthy",
32
- "Soybean___healthy",
33
- "Squash___Powdery_mildew",
34
- "Strawberry___Leaf_scorch",
35
- "Strawberry___healthy",
36
- "Tomato___Bacterial_spot",
37
- "Tomato___Early_blight",
38
- "Tomato___Late_blight",
39
- "Tomato___Leaf_Mold",
40
- "Tomato___Septoria_leaf_spot",
41
- "Tomato___Spider_mites Two-spotted_spider_mite",
42
- "Tomato___Target_Spot",
43
- "Tomato___Tomato_Yellow_Leaf_Curl_Virus",
44
- "Tomato___Tomato_mosaic_virus",
45
- "Tomato___healthy"
46
- ]
47
-
48
- # Model configurations
49
  MODEL_CONFIGS = {
50
  "CNN from Scratch": {
51
  "description": "Custom CNN model trained from scratch",
52
- "input_size": (256, 256),
53
- "model_type": "cnn"
54
  },
55
  "Transfer Learning (ResNet18)": {
56
  "description": "Fine-tuned ResNet18 model",
57
- "input_size": (256, 256),
58
- "model_type": "resnet18"
59
  }
60
  }
61
-
62
- # Image preprocessing settings
63
- IMAGE_SIZE = (256, 256)
64
- NORMALIZE_MEAN = [0.485, 0.456, 0.406] # ImageNet mean
65
- NORMALIZE_STD = [0.229, 0.224, 0.225] # ImageNet std
66
-
67
- # UI settings
68
- TOP_K_PREDICTIONS = 10
69
- CONFIDENCE_THRESHOLD = 0.01 # Minimum confidence to display
70
-
71
- # Paths (will be updated when integrating with real model)
72
- MODEL_PATH = "models/best_model.pth"
73
- EXAMPLES_PATH = "ui/examples/"
74
-
75
- # ClearML settings (for fetching model from ClearML)
76
- CLEARML_PROJECT_NAME = "Plant Disease Detection"
77
- CLEARML_TASK_NAME = "CNN Training"
 
1
+ CLEARML_PROJECT_NAME = "LGT3 Plant Disease Classifier"
2
+ CLEARML_TASK_NAME_DEFAULT = "CNN Training (Latest)"
 
 
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  MODEL_CONFIGS = {
5
  "CNN from Scratch": {
6
  "description": "Custom CNN model trained from scratch",
7
+ "model_type": "cnn",
8
+ "clearml_task_id": "SET_ME_TO_YOUR_BEST_CNN_TASK_ID"
9
  },
10
  "Transfer Learning (ResNet18)": {
11
  "description": "Fine-tuned ResNet18 model",
12
+ "model_type": "resnet18",
13
+ "clearml_task_id": "SET_ME_TO_YOUR_RESNET_TASK_ID"
14
  }
15
  }