/ Модель

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

Лицензия
CC BY-NC 4.0
Библиотека
tf-keras
Опубликована
17 сен 2026

cat-face-landmarks

Языковая модель3 профессии

Двухэтапный набор моделей для обнаружения кошачьего лица и определения 48 ориентиров CatFLW в мобильных и компьютерно-зрительных приложениях.

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

Бенчмарки

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

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

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

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

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

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

Cat Facial Landmarks (CatFLW, 48 points) — набор моделей для двухэтапного анализа кошачьих лиц, опубликованный hugocornellier. Локализатор на EfficientNetB2 находит лицо, затем модель на MobileNetV3-Large определяет 48 ориентиров схемы CatFLW: уши, глаза, нос, рот и подбородок. Основная поставляемая модель ориентиров экспортирована в TFLite с входом 384 × 384; локализатор работает с изображением 224 × 224. Модели также доступны в формате Keras.

Набор предназначен для определения координат ключевых точек кошачьей морды в мобильных приложениях и других сценариях компьютерного зрения. На валидационной выборке CatFLW из 311 изображений NME_IOD модели ориентиров составляет 3,48, а локализатор достигает IoU рамки 0,81. Для запуска графа модели ориентиров на GPU LiteRT нужны совместимые операции и GPU delegate; на XNNPACK CPU она также работает, но медленнее. Лицензия CC-BY-NC-4.0 разрешает использование с указанием авторства и ограничивает коммерческое применение.

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

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

Ограничения

Модель обучена на 1 768 изображениях, а оценка приведена для валидационной выборки CatFLW из 311 изображений; её точность ниже указанного результата ансамбля ELD из статьи CatFLW. Координаты ориентиров заданы относительно обрезанной области лица, поэтому для получения координат исходного изображения их нужно преобразовать обратно с учётом обрезки.

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

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

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

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

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

Открыть на Hugging Face

Cat Facial Landmarks (CatFLW, 48 points)

Demo

The 48 landmarks predicted by this repository's models (face localizer, then landmark model) on "Wide-eyed tiger cat" by Caleb Woods (CC0, Wikimedia Commons). Blue: ears. Green: eyes. Orange: nose. Yellow: mouth and chin.

Two-stage cat face analysis in TFLite: a face localizer that finds the face, and a landmark detector that predicts the 48-point CatFLW scheme on the resulting crop.

These are the models that ship in the cat_detection Flutter package. As far as I can tell they are the first publicly released weights trained on CatFLW.

Training code, the full experiment journal, and the evaluation harness are at hugocornellier/cat-face-landmarks-training.

A Kaggle notebook, Cat Facial Landmarks on CatFLW (TFLite), runs both stages on a CatFLW image and draws the landmarks.

Files

FileSizeWhat it is
cat_face_localizer.tflite16 MBStage 1. EfficientNetB2, 224px, predicts one face box
cat_face_landmarks_full.tflite11 MBStage 2. MobileNetV3-Large, 384px, 48 landmarks. The shipped model
keras/*.keras35 to 62 MBFull Keras models, for fine-tuning or re-export
metadata/*.jsonPer-model training config and validation metrics
metadata/*.csvFull per-epoch training logs

Both .tflite files are float16 static-shape exports (batch-1 concrete function). In the landmark model, the ReLU after each deconv is also a separate op instead of being fused into TRANSPOSE_CONV. The GPU delegate needs both to run the whole graph, and scripts/reexport_static.py in the training repository does both. That matters: on an M4 Max the landmark stage runs 27.10 ms on XNNPACK CPU against 3.82 ms on GPU via CompiledModel.

Accuracy

NME_IOD (normalized mean error, inter-ocular distance) on the CatFLW validation split of 311 images. Lower is better.

ModelBackboneResNME_IOD+ TTASize
cat_face_landmarks_fullMobileNetV3-Large3843.483.3111 MB

For reference, the CatFLW paper's ELD ensemble reaches 2.91. This project started at 3.72.

Until 24 September 2026 this repository also had a larger EfficientNetV2-S landmark model (3.27, 55 MB). It was withdrawn to keep one landmark model that runs on every LiteRT runtime, CPU and GPU. It is still in the repository history.

Localizer: 0.81 bbox IoU on the same split.

Trained on 1,768 images, validated on 311.

Input and output contract

Localizer takes [1, 224, 224, 3] float32 in [0, 1], letterboxed to square. It returns bbox_xyxy, normalized [0, 1] in letterboxed coordinates. Undo the letterbox to get image coordinates.

Landmarks takes [1, 384, 384, 3] float32 in [0, 1]: crop the image to the face box expanded by a 0.1 margin, then resize to square. It returns landmarks_xy of shape [1, 96], flattened [x0, y0, x1, y1, ... x47, y47], normalized [0, 1] relative to the crop, not the original image. Map them back through the same crop to get image coordinates.

Rescaling to [0, 255] for the backbone happens inside the graph. Do not do it yourself.

Exact per-model config, including every augmentation setting, is in metadata/*.json.

Usage

Python:

# pip install ai-edge-litert
import os
import numpy as np
from ai_edge_litert.compiled_model import CompiledModel
from ai_edge_litert.cpu_options import CpuOptions
from ai_edge_litert.hardware_accelerator import HardwareAccelerator
from ai_edge_litert.options import Options

# Set the thread count: left at its default, the CPU ran single-threaded in my tests.
options = Options(HardwareAccelerator.CPU, cpu_options=CpuOptions(num_threads=os.cpu_count()))
model = CompiledModel.from_file("cat_face_landmarks_full.tflite", options=options)
inputs, outputs = model.create_input_buffers(0), model.create_output_buffers(0)

# crop: face box + 0.1 margin, resized to 384x384, float32 in [0, 1]
inputs[0].write(crop[None].astype(np.float32))
model.run_by_index(0, inputs, outputs)
xy = outputs[0].read(96, np.float32).reshape(48, 2)  # normalized to the crop

For the GPU, pass HardwareAccelerator.GPU | HardwareAccelerator.CPU instead: on an M4 Max the landmark model then runs entirely on the GPU, in about 2 ms from Python. CompiledModel logs some INFO lines and an "NPU accelerator could not be loaded" warning to stderr when it loads a model; both are harmless. LiteRT's Interpreter (ai_edge_litert.interpreter) runs these files too.

The demo notebook runs both stages, localizer included, on a CatFLW image.

Flutter: use cat_detection, which wires both stages together, handles the crop math, and adds a species gate.

License

CC BY-NC 4.0. Non-commercial use only. See LICENSE.

These weights are derived from the CatFLW dataset, which is CC BY-NC 4.0. I asked the dataset authors directly how they wanted weights trained on their annotations to be licensed. They asked for CC BY-NC 4.0 rather than a permissive license, to stay consistent with the non-commercial terms of the source data, and granted permission to publish on that basis.

If you need commercial use, that permission is not mine alone to give. Contact the dataset authors at the Tech4Animals Lab, University of Haifa.

The training code in the GitHub repository is Apache 2.0. Only the weights are non-commercial.

Citation

Please cite the CatFLW papers:

@article{martvel2023catflw,
  title={Catflw: Cat facial landmarks in the wild dataset},
  author={Martvel, George and Farhat, Nareed and Shimshoni, Ilan and Zamansky, Anna},
  journal={arXiv preprint arXiv:2305.04232},
  year={2023}
}

@article{martvel2024automated,
  title={Automated Detection of Cat Facial Landmarks},
  author={Martvel, George and Shimshoni, Ilan and Zamansky, Anna},
  journal={International Journal of Computer Vision},
  pages={1--16},
  year={2024},
  publisher={Springer}
}

Acknowledgements

Thanks to George Martvel, Nareed Farhat, Ilan Shimshoni, and Anna Zamansky at the Tech4Animals Lab, University of Haifa, for publishing CatFLW and for permission to release these weights.

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

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

GPU в ailist

Универсальный рантайм · tf-keras

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

Keras/TensorFlow-модели рантайм не загружает.

Ревизия весов
8404a7a

0 моделей