/ Модель

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

Лицензия
Своя лицензия
Библиотека
onnx
Опубликована
28 окт 2026

clash-of-clans-deploy-zone

Сегментация изображенийИзображение → mask3 профессии

Модель сегментирует скриншоты Clash of Clans, выделяя зоны высадки войск, запретные области и элементы интерфейса.

0скачиваний за 30 дней0лайковвеса обновлены2 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

Модель Clash of Clans Deploy Zone Segmentation от nihatxp предназначена для сегментации скриншотов Clash of Clans и определения зон, куда можно или нельзя высаживать войска. В репозитории представлены две версии на архитектуре U-Net: облегчённая с энкодером MobileNetV2 и полной точностью на выходе для класса «нельзя высаживать», а также полная с энкодером EfficientNet-B4, которая выделяет зоны высадки, запретные зоны и элементы интерфейса. Веса доступны в форматах ONNX и PyTorch; вход — изображение, выход — карта сегментации по пикселям.

Модель рассчитана на экраны атаки и разведки. Облегчённая версия обрабатывает изображение с длинной стороной 640 пикселей, полная — до 1280 пикселей без увеличения исходного размера. Для обеих версий размеры после подготовки должны быть кратны 32. На валидационных кадрах, разделённых по деревням, IoU запретной зоны составил 0,987 для облегчённой и 0,996 для полной версии; эти показатели не гарантируют такую же точность на любых изображениях.

Модель обучалась на скриншотах версий игры 18.600 и 18.647. Крупные визуальные изменения игры могут потребовать переобучения, а эффекты поверх базы способны снижать точность границ. Для иных разрешений качество отдельно не измерялось. Доступ предоставляется после покупки; в README указана лицензия «other», без дополнительных условий использования.

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

  • поиск допустимой зоны высадки войск на скриншоте базы
  • выделение запретной для высадки области
  • отделение элементов игрового интерфейса от поля боя
  • автоматический анализ экранов атаки и разведки Clash of Clans

Ограничения

Обучена на скриншотах версий 18.600 и 18.647; крупные изменения графики и эффекты поверх базы могут ухудшить сегментацию. Точность на разрешениях, отличных от 2400×1080 и 1121×978, отдельно не измерялась.

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

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

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

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

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

Открыть на Hugging Face

Clash of Clans Deploy Zone Segmentation

Access is granted after purchase. Buy through the Telegram bot @cocvision_shop_bot; access opens on this page once the payment is confirmed. Pay with USDT or Bitcoin and access opens on its own within minutes. Monero payments are checked by hand, usually within a few hours, so please message me before paying with Monero. Questions: Telegram @nihatxp.

Two segmentation models that find the no-deploy area on a Clash of Clans attack or scout screenshot: the region around the base where troops cannot be dropped. The boundary of that region is where deployment starts.

Screenshot and model output

Try before you buy

Models

LightFull
ArchitectureU-Net, MobileNetV2 encoderU-Net, EfficientNet-B4 encoder
Output1 channel: no-deploy logit3 classes: deployable, no-deploy, interface
Input sizelong side 640 pxlong side up to 1280 px (no upscaling)
Labelled frames (train + val)4,6748,824
ONNX size27 MB78 MB
CPU (onnxruntime, desktop)51 ms at 640×288447 ms at 1280×576
GPU (PyTorch, fp32)17 ms at 640×640not measured
In the browser, 2400×1080 screenshotabout 0.5 s1–3.5 s

The full model also segments the interface (army bar, buttons, resource bars) as its own class, so the no-deploy area does not spill onto the army bar at the bottom of the screen.

Accuracy

IoU of the no-deploy area, measured on validation frames that neither model saw in training. Validation is split by village, so no base in validation appears in training.

Validation setFramesLightFull
Held-out frames used by both models7010.9870.996
All full-model validation frames1,4580.996
└ 2400×10801,3220.996
└ 1121×9781360.995

The full model was evaluated with a horizontal flip averaged in (see below); the light model without it. On the 1,458 frames the full model also reaches 0.987 IoU on the interface class.

The boundary follows the game's tile grid, including the gaps inside the border where troops can still be dropped:

Wall-heavy base

Both screen sizes work:

Another base

Files

light/deploy_zone_light.onnx   ONNX, opset 17, dynamic height/width
light/deploy_zone_light.pt     PyTorch state_dict (segmentation_models_pytorch)
full/deploy_zone_full.onnx     ONNX, opset 17, dynamic height/width
full/deploy_zone_full.pt       PyTorch state_dict (segmentation_models_pytorch)
InputOutput
Lightimage float32 [1, 3, H, W]no_deploy_logit float32 [1, 1, H, W]; > 0 means no-deploy
Fullimage float32 [1, 3, H, W]class_logit float32 [1, 3, H, W]; argmax: 0 deployable, 1 no-deploy, 2 interface

H and W must be multiples of 32.

Usage

Preprocessing is the same for both models: resize so the long side is 640 (light) or at most 1280 (full) keeping the aspect ratio, scale to 0–1, normalise with ImageNet mean and std, pad right and bottom to a multiple of 32.

import numpy as np, onnxruntime as ort
from PIL import Image

MEAN = np.array([0.485, 0.456, 0.406], np.float32)
STD = np.array([0.229, 0.224, 0.225], np.float32)

def predict(path, model="light/deploy_zone_light.onnx", long_side=640, flip=False):
    sess = ort.InferenceSession(model, providers=["CPUExecutionProvider"])
    img = Image.open(path).convert("RGB")
    W, H = img.size
    k = long_side / max(W, H)
    if "full" in model:
        k = min(k, 1.0)  # the full model never upscales
    w, h = round(W * k), round(H * k)
    x = (np.asarray(img.resize((w, h), Image.BILINEAR), np.float32) / 255 - MEAN) / STD
    pad = np.zeros((-(-h // 32) * 32, -(-w // 32) * 32, 3), np.float32)
    pad[:h, :w] = x
    x = pad.transpose(2, 0, 1)[None]
    y = sess.run(None, {"image": x})[0][0]
    if flip:  # optional test-time augmentation: average with the mirrored image
        y = y + sess.run(None, {"image": x[..., ::-1].copy()})[0][0][..., ::-1]
    y = y[:, :h, :w]
    mask = (y[0] > 0) if y.shape[0] == 1 else (y.argmax(0) == 1)
    return np.asarray(Image.fromarray(mask.astype(np.uint8) * 255).resize((W, H), Image.NEAREST)) > 0

no_deploy = predict("screenshot.png")
no_deploy_full = predict("screenshot.png", "full/deploy_zone_full.onnx", 1280, flip=True)

flip=True averages the logits of the normal and the mirrored image. The full-model scores above were measured by averaging the softmax probabilities of the two passes instead. The ONNX and PyTorch files are the best checkpoint of each run. PyTorch weights load with segmentation_models_pytorch:

import segmentation_models_pytorch as smp, torch

light = smp.Unet("mobilenet_v2", encoder_weights=None, classes=1)
light.load_state_dict(torch.load("light/deploy_zone_light.pt", map_location="cpu"))

full = smp.Unet("efficientnet-b4", encoder_weights=None, classes=3)
full.load_state_dict(torch.load("full/deploy_zone_full.pt", map_location="cpu"))

Limitations

  • Trained on screenshots from game versions 18.600 and 18.647. A large visual update may need retraining.
  • Only attack and scout screens at the two screen sizes above (2400×1080 and 1121×978). Other resolutions work when resized as described, but were not measured.
  • Heavy effects drawn over the base (spells, troop swarms) can make the border less precise.

Licence

  • Use the models for any purpose, including commercial work, and ship them inside free or paid apps.
  • The weights, or converted versions of them, may not be shared, published or sold as standalone files.
  • They may not be used in cheats, bots or other tools that break Clash of Clans' terms of service.
  • No attribution is required. Provided as is, without warranty.

Not affiliated with, endorsed, sponsored or approved by Supercell. Clash of Clans is a trademark of Supercell Oy.

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

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

GPU в ailist

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

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

В репозитории нет config.json: не понять архитектуру модели.

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

0 моделей