/ Модель

Характеристики

Лицензия
Своя лицензия
Опубликована
9 сен 2026

oil-classificiation

Классификация изображенийИзображение → label3 профессии
0скачиваний за 30 дней0лайковвеса обновлены9 сен 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Классификатор Sentinel-1 SAR определяет, содержит ли сцена разлив нефти, похожее явление или не содержит нефти.

SAR Oil-Spill Classifier — исследовательская модель Vinayak Rastogi для трёхклассовой классификации спутниковых снимков Sentinel-1 SAR. Она относит сцену к одному из классов: no_oil, lookalike или oil; результат можно использовать как этап обнаружения в конвейере мониторинга разливов нефти, перед отдельной моделью сегментации площади загрязнения.

Модель построена на ResNet18 с предварительно обученной на ImageNet основой и изменённым первым свёрточным слоем для двух каналов VH и VV. На вход подаются данные SAR в dB после процентильного ограничения, масштабирования и изменения размера до 512 × 512; выход — три логита в фиксированном порядке no_oil, lookalike, oil. В README сообщается о точности 86,89% на сбалансированной тестовой выборке из 450 сцен; полнота класса lookalike ниже, чем у остальных классов.

Модель предназначена для исследований и прототипирования. Она выдаёт метку для всей сцены, не определяет местоположение или площадь разлива и проверена только на распределении одного набора данных. Не следует использовать её без проверки человеком для оперативных решений или отчётности. Лицензия указана на Hugging Face как other; конкретные условия в предоставленных данных не раскрыты.

Сценарии применения

  • первичная фильтрация сцен Sentinel-1 для поиска разливов нефти
  • классификация SAR-сцен на нефть, похожие явления и отсутствие нефти
  • отбор сцен для последующей сегментации площади разлива
  • прототипирование систем спутникового мониторинга нефтяных загрязнений

Ограничения

Модель слабо распознаёт класс lookalike; оценка проведена только на одном наборе данных и не подтверждает качество на других регионах, сенсорах и условиях съёмки. Она классифицирует сцену целиком, не локализует разлив, а вход требует точной предварительной обработки двух каналов VH/VV.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

SAR Oil-Spill Classifier

A 3-way classifier (oil / lookalike / no_oil) for Sentinel-1 SAR imagery, built as the detection stage of a larger pipeline whose next stage segments confirmed oil scenes to estimate spill area.

Research/hackathon prototype, not a certified detector. Read the Limitations section before using this for anything beyond experimentation.

Input format — read this before loading any of your own data

This model does not take RGB photos. It expects 2-channel Sentinel-1 dual-polarization SAR backscatter (VH, VV), in dB, preprocessed exactly as follows:

  1. Per-scene percentile clip (1st-99th percentile) of each band to compress dynamic range, then scaled to uint8 (0-255).
  2. Resized to 512x512.
  3. Normalized as (pixel/255 - 0.5) / 0.5.
  4. Channel order: index 0 = VH, index 1 = VV.

model.py's preprocess() function does steps 3-4 for you, given an already 512x512, already-percentile-normalized uint8 array (step 1-2). If you're starting from a raw Sentinel-1 product, you need to reproduce steps 1-2 yourself first — feeding this model raw dB floats, a 3-channel image, or an unnormalized array will not error, it will just produce meaningless output.

Output format

3 logits, softmax to get probabilities, in this exact, fixed order:

CLASS_NAMES = ["no_oil", "lookalike", "oil"]

argmax gives the predicted index into that list. This order is fixed by how the model was trained — do not assume alphabetical or any other order.

Quickstart

pip install torch torchvision safetensors numpy
python inference_example.py

Runs the model on the bundled sample_tile.npz (a real held-out test image, true label oil) and prints the prediction — confirms your environment can load and run the model before you point it at your own data.

Minimal manual usage:

import numpy as np
import torch
from safetensors.torch import load_file
from model import build_classifier, preprocess, CLASS_NAMES

model = build_classifier()
model.load_state_dict(load_file("model.safetensors"))
model.eval()

image = np.load("your_tile.npz")["image"]  # (512, 512, 2) uint8, VH/VV, percentile-normalized
with torch.no_grad():
    probs = torch.softmax(model(preprocess(image)), dim=1).squeeze(0)
print(CLASS_NAMES[probs.argmax().item()], probs.tolist())

Architecture

ResNet18 (ImageNet-pretrained backbone) with its first convolution replaced to accept 2 input channels instead of 3 — initialized by averaging the pretrained 3-channel weights across the 2 output channels, so the rest of the pretrained network starts from a reasonable warm state despite the input change. See model.py for the exact, minimal reconstruction code required to load model.safetensors — the weights are a bare state_dict, not a pickled model object.

Trained with torch==2.14.0, torchvision==0.29.0.

Training data

Sentinel-1 IW GRD scenes (dual-pol, calibrated, terrain-corrected, dB), 2048x2048 native resolution, resized to 512x512 for this classifier. Class label = source dataset folder (oil / lookalike / no_oil) — a whole-scene label, not a pixel-level annotation. Trained on 2,570 scenes, evaluated on a held-out 450-scene split (150 per class, untouched during training).

Metrics (test set, n=450, balanced 150/150/150)

Accuracy: 86.89%

classrecallprecision
no_oil94.7%74.7%
lookalike65.3%83.8%
oil91.3%95.8%

Confusion matrix (rows = true, columns = predicted; note this specific matrix was captured from the run's final epoch rather than reloaded from the best checkpoint, so exact cell counts may differ slightly from the 86.89% headline number — the pattern below is representative regardless):

              no_oil  lookalike  oil
no_oil           142          8    0
lookalike         46         98    6
oil                2         11  137

Limitations

  • lookalike is the weak class. The model separates oil and no_oil cleanly; most errors are lookalike scenes misread as plain no_oil. This mirrors the genuine difficulty of the underlying problem — look-alike SAR phenomena (low-wind zones, biogenic slicks, current shear) exist specifically because they resemble one of the other two classes.
  • Resizing to 512x512 (from a 2048x2048 native scene) may wash out subtle, spatially small look-alike texture — a likely contributor to the recall gap above.
  • Whole-scene labels, not pixel-level ground truth — this model tells you whether a scene contains oil, not where. Pixel-level extent comes from a separate segmentation model downstream.
  • Evaluated on one dataset's distribution and geography. Not validated against out-of-distribution regions, sensors, or acquisition conditions.
  • Not evaluated for adversarial robustness, calibration, or fairness across any subgroup.

Intended use

Research and prototyping for oil-spill monitoring pipelines. Not intended, and not validated, for autonomous operational decision-making, regulatory reporting, or any use where a missed or false detection carries real-world consequences without human review.

License

Placeholder — set this before publishing. These weights were trained on a Zenodo-hosted SAR oil-spill dataset; check that dataset's own license before choosing how to release the weights, since a restrictive source license can carry through to a model trained on it. Update the license: field in this file's YAML header once decided.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Не удалось определить, чем загружать веса модели (нет library_name и architectures).

Ревизия весов
b5c3977

0 моделей