Keras Models (kmodels) is a collection of models with pretrained weights, built entirely with Keras 3. It supports a range of tasks, including classification, object detection (DETR, RT-DETR, RT-DETRv2, RF-DETR, D-FINE), segmentation (SAM, SAM2, SAM3, SegFormer, DeepLabV3, EoMT), monocular depth estimation (Depth Anything V1, Depth Anything V2), feature extraction (DINO, DINOv2, DINOv3), vision-language modeling (CLIP, SigLIP, SigLIP2), and more. It includes hybrid architectures like MaxViT alongside traditional CNNs and pure transformers. kmodels includes custom layers and backbone support, providing flexibility and efficiency across various applications. For backbones, there are various weight variants like in1k, in21k, fb_dist_in1k, ms_in22k, fb_in22k_ft_in1k, ns_jft_in1k, aa_in1k, cvnets_in1k, augreg_in21k_ft_in1k, augreg_in21k, and many more.
From PyPI (recommended)
pip install -U kmodelsFrom Source
pip install -U git+https://github.com/IMvision12/keras-modelsPer-model guides with architecture notes, usage examples, and available pretrained weights live in the docs/ folder. You'll find dedicated pages for backbones, segmentation (SAM family, SegFormer, DeepLabV3, EoMT), object detection (DETR variants, D-FINE), feature extraction (DINO v1/v2/v3), depth estimation (Depth Anything v1/v2), and vision-language models (CLIP, SigLIP, SigLIP2).
-
Backbones
-
Object Detection
🏷️ Model Name 📜 Reference Paper 📦 Source of Weights D-FINE D-FINE: Redefine Regression Task of DETRs as Fine-grained Distribution Refinement transformersDETR End-to-End Object Detection with Transformers transformersRT-DETR DETRs Beat YOLOs on Real-time Object Detection transformersRT-DETRv2 RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformers transformersRF-DETR RF-DETR: Neural Architecture Search for Real-Time Detection Transformers rfdetr
-
Segmentation
🏷️ Model Name 📜 Reference Paper 📦 Source of Weights DeepLabV3 Rethinking Atrous Convolution for Semantic Image Segmentation torchvisionEoMT Your ViT is Secretly an Image Segmentation Model transformersSAM Segment Anything transformersSAM2 SAM 2: Segment Anything in Images and Videos transformersSAM2 Video SAM 2: Segment Anything in Images and Videos transformersSAM3 SAM 3: Segment Anything with Concepts transformers(gated)SegFormer SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers transformers
-
Feature Extraction
🏷️ Model Name 📜 Reference Paper 📦 Source of Weights DINO Emerging Properties in Self-Supervised Vision Transformers torch.hubDINOv2 DINOv2: Learning Robust Visual Features without Supervision transformersDINOv3 DINOv3: Self-Supervised Visual Representation Learning at Scale transformers(gated)
-
Depth Estimation
🏷️ Model Name 📜 Reference Paper 📦 Source of Weights Depth Anything V1 Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data transformersDepth Anything V2 Depth Anything V2 transformers
-
Multimodal Models
🏷️ Model Name 📜 Reference Paper 📦 Source of Weights CLIP Learning Transferable Visual Models From Natural Language Supervision transformersMetaCLIP 2 MetaCLIP 2: A Worldwide Scaling Recipe transformersSigLIP Sigmoid Loss for Language Image Pre-Training transformersSigLIP2 SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding, Localization, and Dense Features transformers
This project leverages timm and transformers for converting pretrained weights from PyTorch to Keras. For licensing details, please refer to the respective repositories.
- 🔖 kmodels Code: This repository is licensed under the Apache 2.0 License.
- The Keras team for their powerful and user-friendly deep learning framework
- The Transformers library for its robust tools for loading and adapting pretrained models
- The pytorch-image-models (timm) project for pioneering many computer vision model implementations
- All contributors to the original papers and architectures implemented in this library
@misc{gc2025kmodels,
author = {Gitesh Chawda},
title = {Keras Models},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/IMvision12/keras-models}}