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
Download src/model.py from Mirutex/Celyrix-1.0-Vision: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/Mirutex/Celyrix-1.0-Vision/resolve/main/src/model.py
- Command line
-
hf download hf://Mirutex/Celyrix-1.0-Vision/src/model.py
-
curl -L -o model.py https://huggingface.co/Mirutex/Celyrix-1.0-Vision/resolve/main/src/model.py
882 Bytes
| 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") | |