Image Classification
Keras
LiteRT
English
computer-vision
satellite-imagery
tensorflow
remote-sensing
land-cover-classification
Instructions to use Mirutex/Celyrix-1.0-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Mirutex/Celyrix-1.0-Vision with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Mirutex/Celyrix-1.0-Vision") - Notebooks
- Google Colab
- Kaggle
File size: 882 Bytes
17124c2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from src.common import SIZE
def build_model(seed=42):
from tensorflow import keras
layers = keras.layers
inputs = keras.Input((SIZE, SIZE, 3), name="rgb_pixels_0_255")
x = layers.RandomFlip("horizontal_and_vertical", seed=seed)(inputs)
x = layers.RandomRotation(0.5, fill_mode="reflect", seed=seed + 1)(x)
x = layers.Rescaling(1 / 255.0)(x)
for filters in (16, 32, 64):
x = layers.Conv2D(filters, 3, padding="same", use_bias=False)(x)
x = layers.BatchNormalization()(x)
x = layers.Activation("relu")(x)
x = layers.MaxPooling2D()(x)
x = layers.Conv2D(96, 3, padding="same", activation="relu")(x)
x = layers.GlobalAveragePooling2D()(x)
x = layers.Dropout(0.25, seed=seed + 2)(x)
outputs = layers.Dense(5, activation="softmax", name="land_cover")(x)
return keras.Model(inputs, outputs, name="CELYRIX")
|