this is some bullshit
Browse files
app.py
CHANGED
@@ -189,8 +189,10 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
|
|
189 |
num_channels = int(num_channels)
|
190 |
W = int(dim)
|
191 |
|
|
|
192 |
print("Loading data")
|
193 |
print(image)
|
|
|
194 |
image = np.load(image.name, allow_pickle=True)
|
195 |
image = image.astype(np.float32)
|
196 |
|
@@ -203,13 +205,12 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
|
|
203 |
print("Data loaded")
|
204 |
|
205 |
print("Loading model")
|
|
|
206 |
model_loading_name = model_path + "%s_%i_planet_detection" % (model_name, num_channels)
|
207 |
|
208 |
if 'eff' in model_name:
|
209 |
hparams = effnet_hparams[num_channels]
|
210 |
hparams = SimpleNamespace(**hparams)
|
211 |
-
|
212 |
-
|
213 |
config = EfficientNetConfig(
|
214 |
dropout=hparams.dropout,
|
215 |
num_channels=hparams.num_channels,
|
|
|
189 |
num_channels = int(num_channels)
|
190 |
W = int(dim)
|
191 |
|
192 |
+
print("Running %s for %i channels" % (model_name, num_channels))
|
193 |
print("Loading data")
|
194 |
print(image)
|
195 |
+
|
196 |
image = np.load(image.name, allow_pickle=True)
|
197 |
image = image.astype(np.float32)
|
198 |
|
|
|
205 |
print("Data loaded")
|
206 |
|
207 |
print("Loading model")
|
208 |
+
|
209 |
model_loading_name = model_path + "%s_%i_planet_detection" % (model_name, num_channels)
|
210 |
|
211 |
if 'eff' in model_name:
|
212 |
hparams = effnet_hparams[num_channels]
|
213 |
hparams = SimpleNamespace(**hparams)
|
|
|
|
|
214 |
config = EfficientNetConfig(
|
215 |
dropout=hparams.dropout,
|
216 |
num_channels=hparams.num_channels,
|