reyhane1222 commited on
Commit
e0a018b
·
verified ·
1 Parent(s): 5f66e0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -140,11 +140,12 @@ def calc_deltaT(material, T_air, RH, u, S):
140
  gamma = S / max(h_c, 1e-6)
141
  return gamma * C_m / 1000.0
142
 
143
- def get_patches(image, size=224, stride=100):
144
  patches = []
145
  w, h = image.size
146
 
147
- for scale in [1.0, 0.75]:
 
148
  scaled_w, scaled_h = int(w * scale), int(h * scale)
149
  if min(scaled_w, scaled_h) < size:
150
  continue
@@ -160,6 +161,7 @@ def get_patches(image, size=224, stride=100):
160
 
161
  return patches
162
 
 
163
  # ==============================
164
  # 🎯 تابع اصلی تحلیل
165
  # ==============================
 
140
  gamma = S / max(h_c, 1e-6)
141
  return gamma * C_m / 1000.0
142
 
143
+ ddef get_patches(image, size=224, stride=100): # کاهش stride از 200 به 100
144
  patches = []
145
  w, h = image.size
146
 
147
+ # افزودن مقیاس‌های مختلف
148
+ for scale in [1.0, 0.75, 0.5]:
149
  scaled_w, scaled_h = int(w * scale), int(h * scale)
150
  if min(scaled_w, scaled_h) < size:
151
  continue
 
161
 
162
  return patches
163
 
164
+
165
  # ==============================
166
  # 🎯 تابع اصلی تحلیل
167
  # ==============================