sharktide/FV-FloodNet
By sharktide · ↓ 0 · ♥ 0 · Updated 2025-07-16
What's in this repo
This page lists the files in sharktide/FV-FloodNet, including FV-FloodNet.onnx.
- 1 ONNX models (.onnx files)
- 5 files, including 1 .onnx, 1 .md, 1 .py, 1 .h5
- Last updated 2025-07-16
ONNX files
| File | Size | Download |
|---|---|---|
| FV-FloodNet.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
This model requires the following custom objects:
import tensorflow as tf
from tensorflow.keras.saving import register_keras_serializable
from tensorflow.keras import layers, models, backend as K
import numpy as np
@register_keras_serializable()
def cold_temp_penalty(inputs):
temp = inputs[:, 0]
penalty = tf.where(
temp > 295.0,
1.0,
tf.where(
temp < 290.0,
0.0,
(temp - 290.0) / 5.0
)
)
return penalty[:, None]
@register_keras_serializable()
def fire_risk_booster(inputs):
temp = inputs[:, 0]
humidity = inputs[:, 1]
wind = inputs[:, 2]
veg = inputs[:, 3]
# Boost ranges
temp_boost = tf.sigmoid((temp - 305.0) * 1.2)
humidity_boost = tf.sigmoid((20.0 - humidity) * 0.5)
wind_boost = tf.sigmoid((wind - 15.0) * 0.8)
veg_boost = tf.sigmoid((veg - 70.0) * 0.5)
# Combine and scale
combined = temp_boost * humidity_boost * wind_boost * veg_boost
boost = 1.0 + 0.3 * combined # Up to 30% increase in fire score
return boost[:, None]
@register_keras_serializable()
def fire_suppression_mask(inputs):
temp = inputs[:, 0]
humidity = inputs[:, 1]
wind = inputs[:, 2]
# Suppress if warm but humid and still
temp_flag = tf.sigmoid((temp - 293.0) * 1.2)
humid_flag = tf.sigmoid((humidity - 50.0) * 0.4)
wind_flag = 1 - tf.sigmoid((wind - 5.0) * 0.8)
suppression = temp_flag * humid_flag * wind_flag
penalty = 1.0 - 0.3 * suppression # Max 30% suppression
return penalty[:, None]
CUSTOM_OBJECTS = {
"cold_temp_penalty": cold_temp_penalty,
"fire_risk_booster": fire_risk_booster,
"fire_suppression_mask": fire_suppression_mask
}
Model info
tabular-classification
keras
keras
tf
onnx
tabular-classification
en
region:us
↓ 0
♥ 0
Created: 2025-06-28
Updated: 2025-07-16
View on Hugging FaceFiles (5)
.gitattributes
FV-FloodNet.onnx
ONNX
README.md
custom_objects.py
tf_model.h5