kerasformers 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. kerasformers-1.0.0/LICENSE +201 -0
  2. kerasformers-1.0.0/PKG-INFO +201 -0
  3. kerasformers-1.0.0/README.md +168 -0
  4. kerasformers-1.0.0/kerasformers/__init__.py +13 -0
  5. kerasformers-1.0.0/kerasformers/_test_runner.py +171 -0
  6. kerasformers-1.0.0/kerasformers/base/__init__.py +13 -0
  7. kerasformers-1.0.0/kerasformers/base/base_audio_feature_extractor.py +20 -0
  8. kerasformers-1.0.0/kerasformers/base/base_image_processor.py +20 -0
  9. kerasformers-1.0.0/kerasformers/base/base_model.py +422 -0
  10. kerasformers-1.0.0/kerasformers/base/base_processor.py +37 -0
  11. kerasformers-1.0.0/kerasformers/base/base_tokenizer.py +31 -0
  12. kerasformers-1.0.0/kerasformers/layers/__init__.py +3 -0
  13. kerasformers-1.0.0/kerasformers/layers/image_normalization.py +104 -0
  14. kerasformers-1.0.0/kerasformers/layers/layer_scale.py +51 -0
  15. kerasformers-1.0.0/kerasformers/layers/stochastic_depth.py +51 -0
  16. kerasformers-1.0.0/kerasformers/models/__init__.py +59 -0
  17. kerasformers-1.0.0/kerasformers/models/cait/__init__.py +3 -0
  18. kerasformers-1.0.0/kerasformers/models/cait/cait_layers.py +677 -0
  19. kerasformers-1.0.0/kerasformers/models/cait/cait_model.py +543 -0
  20. kerasformers-1.0.0/kerasformers/models/cait/config.py +135 -0
  21. kerasformers-1.0.0/kerasformers/models/cait/convert_cait_timm_to_keras.py +123 -0
  22. kerasformers-1.0.0/kerasformers/models/clip/__init__.py +25 -0
  23. kerasformers-1.0.0/kerasformers/models/clip/clip_image_processor.py +266 -0
  24. kerasformers-1.0.0/kerasformers/models/clip/clip_layers.py +557 -0
  25. kerasformers-1.0.0/kerasformers/models/clip/clip_model.py +1578 -0
  26. kerasformers-1.0.0/kerasformers/models/clip/clip_processor.py +164 -0
  27. kerasformers-1.0.0/kerasformers/models/clip/clip_tokenizer.py +163 -0
  28. kerasformers-1.0.0/kerasformers/models/clip/config.py +113 -0
  29. kerasformers-1.0.0/kerasformers/models/clip/convert_clip_hf_to_keras.py +256 -0
  30. kerasformers-1.0.0/kerasformers/models/convmixer/__init__.py +6 -0
  31. kerasformers-1.0.0/kerasformers/models/convmixer/config.py +47 -0
  32. kerasformers-1.0.0/kerasformers/models/convmixer/convert_convmixer_timm_to_keras.py +100 -0
  33. kerasformers-1.0.0/kerasformers/models/convmixer/convmixer_model.py +432 -0
  34. kerasformers-1.0.0/kerasformers/models/convnext/__init__.py +6 -0
  35. kerasformers-1.0.0/kerasformers/models/convnext/config.py +239 -0
  36. kerasformers-1.0.0/kerasformers/models/convnext/convert_convnext_timm_to_keras.py +115 -0
  37. kerasformers-1.0.0/kerasformers/models/convnext/convnext_layers.py +46 -0
  38. kerasformers-1.0.0/kerasformers/models/convnext/convnext_model.py +508 -0
  39. kerasformers-1.0.0/kerasformers/models/convnextv2/__init__.py +6 -0
  40. kerasformers-1.0.0/kerasformers/models/convnextv2/config.py +212 -0
  41. kerasformers-1.0.0/kerasformers/models/convnextv2/convert_convnextv2_timm_to_keras.py +60 -0
  42. kerasformers-1.0.0/kerasformers/models/convnextv2/convnextv2_model.py +206 -0
  43. kerasformers-1.0.0/kerasformers/models/deeplabv3/__init__.py +8 -0
  44. kerasformers-1.0.0/kerasformers/models/deeplabv3/config.py +21 -0
  45. kerasformers-1.0.0/kerasformers/models/deeplabv3/convert_deeplabv3_torch_to_keras.py +210 -0
  46. kerasformers-1.0.0/kerasformers/models/deeplabv3/deeplabv3_image_processor.py +182 -0
  47. kerasformers-1.0.0/kerasformers/models/deeplabv3/deeplabv3_model.py +486 -0
  48. kerasformers-1.0.0/kerasformers/models/deit/__init__.py +3 -0
  49. kerasformers-1.0.0/kerasformers/models/deit/config.py +275 -0
  50. kerasformers-1.0.0/kerasformers/models/deit/convert_deit_timm_to_keras.py +138 -0
  51. kerasformers-1.0.0/kerasformers/models/deit/deit_model.py +288 -0
  52. kerasformers-1.0.0/kerasformers/models/densenet/__init__.py +6 -0
  53. kerasformers-1.0.0/kerasformers/models/densenet/config.py +53 -0
  54. kerasformers-1.0.0/kerasformers/models/densenet/convert_densenet_timm_to_keras.py +104 -0
  55. kerasformers-1.0.0/kerasformers/models/densenet/densenet_model.py +497 -0
  56. kerasformers-1.0.0/kerasformers/models/depth_anything_v1/__init__.py +11 -0
  57. kerasformers-1.0.0/kerasformers/models/depth_anything_v1/config.py +41 -0
  58. kerasformers-1.0.0/kerasformers/models/depth_anything_v1/convert_depth_anything_v1_hf_to_keras.py +135 -0
  59. kerasformers-1.0.0/kerasformers/models/depth_anything_v1/depth_anything_v1_image_processor.py +153 -0
  60. kerasformers-1.0.0/kerasformers/models/depth_anything_v1/depth_anything_v1_model.py +887 -0
  61. kerasformers-1.0.0/kerasformers/models/depth_anything_v2/__init__.py +11 -0
  62. kerasformers-1.0.0/kerasformers/models/depth_anything_v2/config.py +125 -0
  63. kerasformers-1.0.0/kerasformers/models/depth_anything_v2/convert_depth_anything_v2_hf_to_keras.py +85 -0
  64. kerasformers-1.0.0/kerasformers/models/depth_anything_v2/depth_anything_v2_image_processor.py +153 -0
  65. kerasformers-1.0.0/kerasformers/models/depth_anything_v2/depth_anything_v2_model.py +54 -0
  66. kerasformers-1.0.0/kerasformers/models/detr/__init__.py +9 -0
  67. kerasformers-1.0.0/kerasformers/models/detr/config.py +37 -0
  68. kerasformers-1.0.0/kerasformers/models/detr/convert_detr_hf_to_keras.py +445 -0
  69. kerasformers-1.0.0/kerasformers/models/detr/detr_image_processor.py +196 -0
  70. kerasformers-1.0.0/kerasformers/models/detr/detr_layers.py +574 -0
  71. kerasformers-1.0.0/kerasformers/models/detr/detr_model.py +1113 -0
  72. kerasformers-1.0.0/kerasformers/models/dfine/__init__.py +8 -0
  73. kerasformers-1.0.0/kerasformers/models/dfine/config.py +95 -0
  74. kerasformers-1.0.0/kerasformers/models/dfine/convert_dfine_hf_to_keras.py +516 -0
  75. kerasformers-1.0.0/kerasformers/models/dfine/dfine_image_processor.py +229 -0
  76. kerasformers-1.0.0/kerasformers/models/dfine/dfine_layers.py +727 -0
  77. kerasformers-1.0.0/kerasformers/models/dfine/dfine_model.py +1957 -0
  78. kerasformers-1.0.0/kerasformers/models/dino/__init__.py +6 -0
  79. kerasformers-1.0.0/kerasformers/models/dino/config.py +54 -0
  80. kerasformers-1.0.0/kerasformers/models/dino/convert_dino_torch_to_keras.py +217 -0
  81. kerasformers-1.0.0/kerasformers/models/dino/dino_model.py +287 -0
  82. kerasformers-1.0.0/kerasformers/models/dino_v2/__init__.py +5 -0
  83. kerasformers-1.0.0/kerasformers/models/dino_v2/config.py +35 -0
  84. kerasformers-1.0.0/kerasformers/models/dino_v2/convert_dino_v2_hf_to_keras.py +219 -0
  85. kerasformers-1.0.0/kerasformers/models/dino_v2/dino_v2_model.py +187 -0
  86. kerasformers-1.0.0/kerasformers/models/dino_v3/__init__.py +6 -0
  87. kerasformers-1.0.0/kerasformers/models/dino_v3/config.py +88 -0
  88. kerasformers-1.0.0/kerasformers/models/dino_v3/convert_dino_v3_hf_to_keras.py +276 -0
  89. kerasformers-1.0.0/kerasformers/models/dino_v3/dino_v3_layers.py +261 -0
  90. kerasformers-1.0.0/kerasformers/models/dino_v3/dino_v3_model.py +574 -0
  91. kerasformers-1.0.0/kerasformers/models/efficientformer/__init__.py +9 -0
  92. kerasformers-1.0.0/kerasformers/models/efficientformer/config.py +41 -0
  93. kerasformers-1.0.0/kerasformers/models/efficientformer/convert_efficientformer_timm_to_keras.py +154 -0
  94. kerasformers-1.0.0/kerasformers/models/efficientformer/efficientformer_layers.py +196 -0
  95. kerasformers-1.0.0/kerasformers/models/efficientformer/efficientformer_model.py +716 -0
  96. kerasformers-1.0.0/kerasformers/models/efficientnet/__init__.py +6 -0
  97. kerasformers-1.0.0/kerasformers/models/efficientnet/config.py +258 -0
  98. kerasformers-1.0.0/kerasformers/models/efficientnet/convert_efficientnet_timm_to_keras.py +116 -0
  99. kerasformers-1.0.0/kerasformers/models/efficientnet/efficientnet_model.py +650 -0
  100. kerasformers-1.0.0/kerasformers/models/efficientnet_lite/__init__.py +9 -0
  101. kerasformers-1.0.0/kerasformers/models/efficientnet_lite/config.py +70 -0
  102. kerasformers-1.0.0/kerasformers/models/efficientnet_lite/convert_efficientnet_lite_timm_to_keras.py +106 -0
  103. kerasformers-1.0.0/kerasformers/models/efficientnet_lite/efficientnet_lite_model.py +629 -0
  104. kerasformers-1.0.0/kerasformers/models/efficientnetv2/__init__.py +9 -0
  105. kerasformers-1.0.0/kerasformers/models/efficientnetv2/config.py +193 -0
  106. kerasformers-1.0.0/kerasformers/models/efficientnetv2/convert_efficientnetv2_timm_to_keras.py +114 -0
  107. kerasformers-1.0.0/kerasformers/models/efficientnetv2/efficientnetv2_model.py +1115 -0
  108. kerasformers-1.0.0/kerasformers/models/eomt/__init__.py +8 -0
  109. kerasformers-1.0.0/kerasformers/models/eomt/config.py +70 -0
  110. kerasformers-1.0.0/kerasformers/models/eomt/convert_eomt_hf_to_keras.py +203 -0
  111. kerasformers-1.0.0/kerasformers/models/eomt/eomt_image_processor.py +448 -0
  112. kerasformers-1.0.0/kerasformers/models/eomt/eomt_layers.py +418 -0
  113. kerasformers-1.0.0/kerasformers/models/eomt/eomt_model.py +675 -0
  114. kerasformers-1.0.0/kerasformers/models/flexivit/__init__.py +6 -0
  115. kerasformers-1.0.0/kerasformers/models/flexivit/config.py +93 -0
  116. kerasformers-1.0.0/kerasformers/models/flexivit/convert_flexivit_timm_to_keras.py +52 -0
  117. kerasformers-1.0.0/kerasformers/models/flexivit/flexivit_model.py +301 -0
  118. kerasformers-1.0.0/kerasformers/models/inception_next/__init__.py +6 -0
  119. kerasformers-1.0.0/kerasformers/models/inception_next/config.py +75 -0
  120. kerasformers-1.0.0/kerasformers/models/inception_next/convert_inception_next_timm_to_keras.py +111 -0
  121. kerasformers-1.0.0/kerasformers/models/inception_next/inception_next_model.py +542 -0
  122. kerasformers-1.0.0/kerasformers/models/inception_resnetv2/__init__.py +9 -0
  123. kerasformers-1.0.0/kerasformers/models/inception_resnetv2/config.py +19 -0
  124. kerasformers-1.0.0/kerasformers/models/inception_resnetv2/convert_inceptionresnetv2_timm_to_keras.py +149 -0
  125. kerasformers-1.0.0/kerasformers/models/inception_resnetv2/inceptionresnetv2_model.py +652 -0
  126. kerasformers-1.0.0/kerasformers/models/inceptionv3/__init__.py +6 -0
  127. kerasformers-1.0.0/kerasformers/models/inceptionv3/config.py +24 -0
  128. kerasformers-1.0.0/kerasformers/models/inceptionv3/convert_inceptionv3_timm_to_keras.py +104 -0
  129. kerasformers-1.0.0/kerasformers/models/inceptionv3/inceptionv3_model.py +678 -0
  130. kerasformers-1.0.0/kerasformers/models/inceptionv4/__init__.py +6 -0
  131. kerasformers-1.0.0/kerasformers/models/inceptionv4/config.py +14 -0
  132. kerasformers-1.0.0/kerasformers/models/inceptionv4/convert_inceptionv4_timm_to_keras.py +119 -0
  133. kerasformers-1.0.0/kerasformers/models/inceptionv4/inceptionv4_model.py +846 -0
  134. kerasformers-1.0.0/kerasformers/models/mask2former/__init__.py +8 -0
  135. kerasformers-1.0.0/kerasformers/models/mask2former/config.py +119 -0
  136. kerasformers-1.0.0/kerasformers/models/mask2former/convert_mask2former_hf_to_keras.py +374 -0
  137. kerasformers-1.0.0/kerasformers/models/mask2former/mask2former_image_processor.py +84 -0
  138. kerasformers-1.0.0/kerasformers/models/mask2former/mask2former_layers.py +566 -0
  139. kerasformers-1.0.0/kerasformers/models/mask2former/mask2former_model.py +693 -0
  140. kerasformers-1.0.0/kerasformers/models/mask2former/mask2former_swin_layers.py +580 -0
  141. kerasformers-1.0.0/kerasformers/models/maskformer/__init__.py +14 -0
  142. kerasformers-1.0.0/kerasformers/models/maskformer/config.py +95 -0
  143. kerasformers-1.0.0/kerasformers/models/maskformer/convert_maskformer_hf_to_keras.py +335 -0
  144. kerasformers-1.0.0/kerasformers/models/maskformer/maskformer_image_processor.py +311 -0
  145. kerasformers-1.0.0/kerasformers/models/maskformer/maskformer_layers.py +236 -0
  146. kerasformers-1.0.0/kerasformers/models/maskformer/maskformer_model.py +691 -0
  147. kerasformers-1.0.0/kerasformers/models/maskformer/maskformer_swin_layers.py +576 -0
  148. kerasformers-1.0.0/kerasformers/models/maxvit/__init__.py +3 -0
  149. kerasformers-1.0.0/kerasformers/models/maxvit/config.py +263 -0
  150. kerasformers-1.0.0/kerasformers/models/maxvit/convert_maxvit_timm_to_keras.py +134 -0
  151. kerasformers-1.0.0/kerasformers/models/maxvit/maxvit_layers.py +503 -0
  152. kerasformers-1.0.0/kerasformers/models/maxvit/maxvit_model.py +723 -0
  153. kerasformers-1.0.0/kerasformers/models/metaclip2/__init__.py +27 -0
  154. kerasformers-1.0.0/kerasformers/models/metaclip2/config.py +316 -0
  155. kerasformers-1.0.0/kerasformers/models/metaclip2/convert_metaclip2_hf_to_keras.py +262 -0
  156. kerasformers-1.0.0/kerasformers/models/metaclip2/metaclip2_image_processor.py +90 -0
  157. kerasformers-1.0.0/kerasformers/models/metaclip2/metaclip2_model.py +1216 -0
  158. kerasformers-1.0.0/kerasformers/models/metaclip2/metaclip2_mt5_tokenizer.py +149 -0
  159. kerasformers-1.0.0/kerasformers/models/metaclip2/metaclip2_processor.py +110 -0
  160. kerasformers-1.0.0/kerasformers/models/metaclip2/metaclip2_tokenizer.py +165 -0
  161. kerasformers-1.0.0/kerasformers/models/mit/__init__.py +3 -0
  162. kerasformers-1.0.0/kerasformers/models/mit/config.py +71 -0
  163. kerasformers-1.0.0/kerasformers/models/mit/convert_mit_hf_to_keras.py +123 -0
  164. kerasformers-1.0.0/kerasformers/models/mit/mit_layers.py +228 -0
  165. kerasformers-1.0.0/kerasformers/models/mit/mit_model.py +564 -0
  166. kerasformers-1.0.0/kerasformers/models/mlp_mixer/__init__.py +6 -0
  167. kerasformers-1.0.0/kerasformers/models/mlp_mixer/config.py +62 -0
  168. kerasformers-1.0.0/kerasformers/models/mlp_mixer/convert_mlpmixer_timm_to_keras.py +99 -0
  169. kerasformers-1.0.0/kerasformers/models/mlp_mixer/mlp_mixer_model.py +476 -0
  170. kerasformers-1.0.0/kerasformers/models/mobilenetv2/__init__.py +6 -0
  171. kerasformers-1.0.0/kerasformers/models/mobilenetv2/config.py +65 -0
  172. kerasformers-1.0.0/kerasformers/models/mobilenetv2/convert_mobilenetv2_timm_to_keras.py +116 -0
  173. kerasformers-1.0.0/kerasformers/models/mobilenetv2/mobilenetv2_model.py +537 -0
  174. kerasformers-1.0.0/kerasformers/models/mobilenetv3/__init__.py +6 -0
  175. kerasformers-1.0.0/kerasformers/models/mobilenetv3/config.py +106 -0
  176. kerasformers-1.0.0/kerasformers/models/mobilenetv3/convert_mobilenetv3_timm_to_keras.py +174 -0
  177. kerasformers-1.0.0/kerasformers/models/mobilenetv3/mobilenetv3_model.py +806 -0
  178. kerasformers-1.0.0/kerasformers/models/mobilevit/__init__.py +15 -0
  179. kerasformers-1.0.0/kerasformers/models/mobilevit/config.py +92 -0
  180. kerasformers-1.0.0/kerasformers/models/mobilevit/convert_mobilevit_hf_to_keras.py +266 -0
  181. kerasformers-1.0.0/kerasformers/models/mobilevit/convert_mobilevit_timm_to_keras.py +133 -0
  182. kerasformers-1.0.0/kerasformers/models/mobilevit/mobilevit_image_processor.py +196 -0
  183. kerasformers-1.0.0/kerasformers/models/mobilevit/mobilevit_layers.py +458 -0
  184. kerasformers-1.0.0/kerasformers/models/mobilevit/mobilevit_model.py +1014 -0
  185. kerasformers-1.0.0/kerasformers/models/mobilevitv2/__init__.py +15 -0
  186. kerasformers-1.0.0/kerasformers/models/mobilevitv2/config.py +144 -0
  187. kerasformers-1.0.0/kerasformers/models/mobilevitv2/convert_mobilevitv2_hf_to_keras.py +242 -0
  188. kerasformers-1.0.0/kerasformers/models/mobilevitv2/convert_mobilevitv2_timm_to_keras.py +120 -0
  189. kerasformers-1.0.0/kerasformers/models/mobilevitv2/mobilevitv2_image_processor.py +20 -0
  190. kerasformers-1.0.0/kerasformers/models/mobilevitv2/mobilevitv2_model.py +835 -0
  191. kerasformers-1.0.0/kerasformers/models/nextvit/__init__.py +3 -0
  192. kerasformers-1.0.0/kerasformers/models/nextvit/config.py +125 -0
  193. kerasformers-1.0.0/kerasformers/models/nextvit/convert_nextvit_timm_to_keras.py +109 -0
  194. kerasformers-1.0.0/kerasformers/models/nextvit/nextvit_layers.py +120 -0
  195. kerasformers-1.0.0/kerasformers/models/nextvit/nextvit_model.py +865 -0
  196. kerasformers-1.0.0/kerasformers/models/owlv2/__init__.py +21 -0
  197. kerasformers-1.0.0/kerasformers/models/owlv2/config.py +95 -0
  198. kerasformers-1.0.0/kerasformers/models/owlv2/convert_owlv2_hf_to_keras.py +332 -0
  199. kerasformers-1.0.0/kerasformers/models/owlv2/owlv2_image_processor.py +264 -0
  200. kerasformers-1.0.0/kerasformers/models/owlv2/owlv2_layers.py +344 -0
  201. kerasformers-1.0.0/kerasformers/models/owlv2/owlv2_model.py +988 -0
  202. kerasformers-1.0.0/kerasformers/models/owlv2/owlv2_processor.py +128 -0
  203. kerasformers-1.0.0/kerasformers/models/owlvit/__init__.py +21 -0
  204. kerasformers-1.0.0/kerasformers/models/owlvit/config.py +50 -0
  205. kerasformers-1.0.0/kerasformers/models/owlvit/convert_owlvit_hf_to_keras.py +310 -0
  206. kerasformers-1.0.0/kerasformers/models/owlvit/owlvit_image_processor.py +177 -0
  207. kerasformers-1.0.0/kerasformers/models/owlvit/owlvit_layers.py +344 -0
  208. kerasformers-1.0.0/kerasformers/models/owlvit/owlvit_model.py +961 -0
  209. kerasformers-1.0.0/kerasformers/models/owlvit/owlvit_processor.py +124 -0
  210. kerasformers-1.0.0/kerasformers/models/pit/__init__.py +3 -0
  211. kerasformers-1.0.0/kerasformers/models/pit/config.py +135 -0
  212. kerasformers-1.0.0/kerasformers/models/pit/convert_pit_timm_to_keras.py +133 -0
  213. kerasformers-1.0.0/kerasformers/models/pit/pit_model.py +609 -0
  214. kerasformers-1.0.0/kerasformers/models/poolformer/__init__.py +6 -0
  215. kerasformers-1.0.0/kerasformers/models/poolformer/config.py +65 -0
  216. kerasformers-1.0.0/kerasformers/models/poolformer/convert_poolformer_timm_to_keras.py +104 -0
  217. kerasformers-1.0.0/kerasformers/models/poolformer/poolformer_model.py +533 -0
  218. kerasformers-1.0.0/kerasformers/models/res2net/__init__.py +3 -0
  219. kerasformers-1.0.0/kerasformers/models/res2net/config.py +82 -0
  220. kerasformers-1.0.0/kerasformers/models/res2net/convert_res2net_timm_to_keras.py +102 -0
  221. kerasformers-1.0.0/kerasformers/models/res2net/res2net_model.py +573 -0
  222. kerasformers-1.0.0/kerasformers/models/resmlp/__init__.py +3 -0
  223. kerasformers-1.0.0/kerasformers/models/resmlp/config.py +86 -0
  224. kerasformers-1.0.0/kerasformers/models/resmlp/convert_resmlp_timm_to_keras.py +113 -0
  225. kerasformers-1.0.0/kerasformers/models/resmlp/resmlp_layers.py +70 -0
  226. kerasformers-1.0.0/kerasformers/models/resmlp/resmlp_model.py +469 -0
  227. kerasformers-1.0.0/kerasformers/models/resnet/__init__.py +3 -0
  228. kerasformers-1.0.0/kerasformers/models/resnet/config.py +62 -0
  229. kerasformers-1.0.0/kerasformers/models/resnet/convert_resnet_timm_to_keras.py +100 -0
  230. kerasformers-1.0.0/kerasformers/models/resnet/resnet_model.py +700 -0
  231. kerasformers-1.0.0/kerasformers/models/resnetv2/__init__.py +6 -0
  232. kerasformers-1.0.0/kerasformers/models/resnetv2/config.py +137 -0
  233. kerasformers-1.0.0/kerasformers/models/resnetv2/convert_resnetv2_timm_to_keras.py +114 -0
  234. kerasformers-1.0.0/kerasformers/models/resnetv2/resnetv2_layers.py +136 -0
  235. kerasformers-1.0.0/kerasformers/models/resnetv2/resnetv2_model.py +559 -0
  236. kerasformers-1.0.0/kerasformers/models/resnext/__init__.py +11 -0
  237. kerasformers-1.0.0/kerasformers/models/resnext/config.py +105 -0
  238. kerasformers-1.0.0/kerasformers/models/resnext/convert_resnext_timm_to_keras.py +49 -0
  239. kerasformers-1.0.0/kerasformers/models/resnext/resnext_model.py +319 -0
  240. kerasformers-1.0.0/kerasformers/models/rf_detr/__init__.py +8 -0
  241. kerasformers-1.0.0/kerasformers/models/rf_detr/config.py +60 -0
  242. kerasformers-1.0.0/kerasformers/models/rf_detr/convert_rf_detr_torch_to_keras.py +377 -0
  243. kerasformers-1.0.0/kerasformers/models/rf_detr/rf_detr_image_processor.py +218 -0
  244. kerasformers-1.0.0/kerasformers/models/rf_detr/rf_detr_layers.py +844 -0
  245. kerasformers-1.0.0/kerasformers/models/rf_detr/rf_detr_model.py +1647 -0
  246. kerasformers-1.0.0/kerasformers/models/rt_detr/__init__.py +8 -0
  247. kerasformers-1.0.0/kerasformers/models/rt_detr/config.py +65 -0
  248. kerasformers-1.0.0/kerasformers/models/rt_detr/convert_rt_detr_hf_to_keras.py +404 -0
  249. kerasformers-1.0.0/kerasformers/models/rt_detr/rt_detr_image_processor.py +221 -0
  250. kerasformers-1.0.0/kerasformers/models/rt_detr/rt_detr_layers.py +543 -0
  251. kerasformers-1.0.0/kerasformers/models/rt_detr/rt_detr_model.py +1476 -0
  252. kerasformers-1.0.0/kerasformers/models/rt_detr_v2/__init__.py +8 -0
  253. kerasformers-1.0.0/kerasformers/models/rt_detr_v2/config.py +53 -0
  254. kerasformers-1.0.0/kerasformers/models/rt_detr_v2/convert_rt_detr_v2_hf_to_keras.py +412 -0
  255. kerasformers-1.0.0/kerasformers/models/rt_detr_v2/rt_detr_v2_image_processor.py +221 -0
  256. kerasformers-1.0.0/kerasformers/models/rt_detr_v2/rt_detr_v2_layers.py +435 -0
  257. kerasformers-1.0.0/kerasformers/models/rt_detr_v2/rt_detr_v2_model.py +1571 -0
  258. kerasformers-1.0.0/kerasformers/models/sam/__init__.py +14 -0
  259. kerasformers-1.0.0/kerasformers/models/sam/config.py +38 -0
  260. kerasformers-1.0.0/kerasformers/models/sam/convert_sam_hf_to_keras.py +342 -0
  261. kerasformers-1.0.0/kerasformers/models/sam/sam_image_processor.py +1083 -0
  262. kerasformers-1.0.0/kerasformers/models/sam/sam_layers.py +1372 -0
  263. kerasformers-1.0.0/kerasformers/models/sam/sam_model.py +692 -0
  264. kerasformers-1.0.0/kerasformers/models/sam2/__init__.py +14 -0
  265. kerasformers-1.0.0/kerasformers/models/sam2/config.py +54 -0
  266. kerasformers-1.0.0/kerasformers/models/sam2/convert_sam2_hf_to_keras.py +322 -0
  267. kerasformers-1.0.0/kerasformers/models/sam2/sam2_image_processor.py +501 -0
  268. kerasformers-1.0.0/kerasformers/models/sam2/sam2_layers.py +1633 -0
  269. kerasformers-1.0.0/kerasformers/models/sam2/sam2_model.py +954 -0
  270. kerasformers-1.0.0/kerasformers/models/sam3/__init__.py +29 -0
  271. kerasformers-1.0.0/kerasformers/models/sam3/config.py +57 -0
  272. kerasformers-1.0.0/kerasformers/models/sam3/convert_sam3_hf_to_keras.py +383 -0
  273. kerasformers-1.0.0/kerasformers/models/sam3/sam3_clip_tokenizer.py +140 -0
  274. kerasformers-1.0.0/kerasformers/models/sam3/sam3_layers.py +1229 -0
  275. kerasformers-1.0.0/kerasformers/models/sam3/sam3_model.py +2061 -0
  276. kerasformers-1.0.0/kerasformers/models/sam3/sam3_processor.py +279 -0
  277. kerasformers-1.0.0/kerasformers/models/sam3/sam3_utils.py +384 -0
  278. kerasformers-1.0.0/kerasformers/models/segformer/__init__.py +8 -0
  279. kerasformers-1.0.0/kerasformers/models/segformer/config.py +135 -0
  280. kerasformers-1.0.0/kerasformers/models/segformer/convert_segformer_hf_to_keras.py +195 -0
  281. kerasformers-1.0.0/kerasformers/models/segformer/segformer_image_processor.py +231 -0
  282. kerasformers-1.0.0/kerasformers/models/segformer/segformer_model.py +322 -0
  283. kerasformers-1.0.0/kerasformers/models/senet/__init__.py +3 -0
  284. kerasformers-1.0.0/kerasformers/models/senet/config.py +59 -0
  285. kerasformers-1.0.0/kerasformers/models/senet/convert_senet_timm_to_keras.py +49 -0
  286. kerasformers-1.0.0/kerasformers/models/senet/senet_model.py +227 -0
  287. kerasformers-1.0.0/kerasformers/models/siglip/__init__.py +21 -0
  288. kerasformers-1.0.0/kerasformers/models/siglip/config.py +167 -0
  289. kerasformers-1.0.0/kerasformers/models/siglip/convert_siglip_hf_to_keras.py +262 -0
  290. kerasformers-1.0.0/kerasformers/models/siglip/siglip_image_processor.py +257 -0
  291. kerasformers-1.0.0/kerasformers/models/siglip/siglip_layers.py +564 -0
  292. kerasformers-1.0.0/kerasformers/models/siglip/siglip_model.py +1327 -0
  293. kerasformers-1.0.0/kerasformers/models/siglip/siglip_processor.py +242 -0
  294. kerasformers-1.0.0/kerasformers/models/siglip/siglip_tokenizer.py +226 -0
  295. kerasformers-1.0.0/kerasformers/models/siglip2/__init__.py +23 -0
  296. kerasformers-1.0.0/kerasformers/models/siglip2/config.py +239 -0
  297. kerasformers-1.0.0/kerasformers/models/siglip2/convert_siglip2_hf_to_keras.py +108 -0
  298. kerasformers-1.0.0/kerasformers/models/siglip2/siglip2_image_processor.py +37 -0
  299. kerasformers-1.0.0/kerasformers/models/siglip2/siglip2_model.py +335 -0
  300. kerasformers-1.0.0/kerasformers/models/siglip2/siglip2_processor.py +133 -0
  301. kerasformers-1.0.0/kerasformers/models/siglip2/siglip2_tokenizer.py +191 -0
  302. kerasformers-1.0.0/kerasformers/models/swin/__init__.py +3 -0
  303. kerasformers-1.0.0/kerasformers/models/swin/config.py +188 -0
  304. kerasformers-1.0.0/kerasformers/models/swin/convert_swin_timm_to_keras.py +114 -0
  305. kerasformers-1.0.0/kerasformers/models/swin/swin_layers.py +480 -0
  306. kerasformers-1.0.0/kerasformers/models/swin/swin_model.py +790 -0
  307. kerasformers-1.0.0/kerasformers/models/swinv2/__init__.py +3 -0
  308. kerasformers-1.0.0/kerasformers/models/swinv2/config.py +185 -0
  309. kerasformers-1.0.0/kerasformers/models/swinv2/convert_swinv2_timm_to_keras.py +142 -0
  310. kerasformers-1.0.0/kerasformers/models/swinv2/swinv2_layers.py +636 -0
  311. kerasformers-1.0.0/kerasformers/models/swinv2/swinv2_model.py +809 -0
  312. kerasformers-1.0.0/kerasformers/models/vgg/__init__.py +3 -0
  313. kerasformers-1.0.0/kerasformers/models/vgg/config.py +235 -0
  314. kerasformers-1.0.0/kerasformers/models/vgg/convert_vgg_timm_to_keras.py +96 -0
  315. kerasformers-1.0.0/kerasformers/models/vgg/vgg_model.py +404 -0
  316. kerasformers-1.0.0/kerasformers/models/vit/__init__.py +3 -0
  317. kerasformers-1.0.0/kerasformers/models/vit/config.py +354 -0
  318. kerasformers-1.0.0/kerasformers/models/vit/convert_vit_timm_to_keras.py +124 -0
  319. kerasformers-1.0.0/kerasformers/models/vit/vit_layers.py +567 -0
  320. kerasformers-1.0.0/kerasformers/models/vit/vit_model.py +636 -0
  321. kerasformers-1.0.0/kerasformers/models/whisper/__init__.py +13 -0
  322. kerasformers-1.0.0/kerasformers/models/whisper/config.py +244 -0
  323. kerasformers-1.0.0/kerasformers/models/whisper/convert_whisper_hf_to_keras.py +292 -0
  324. kerasformers-1.0.0/kerasformers/models/whisper/whisper_feature_extractor.py +155 -0
  325. kerasformers-1.0.0/kerasformers/models/whisper/whisper_layers.py +295 -0
  326. kerasformers-1.0.0/kerasformers/models/whisper/whisper_model.py +863 -0
  327. kerasformers-1.0.0/kerasformers/models/whisper/whisper_processor.py +170 -0
  328. kerasformers-1.0.0/kerasformers/models/whisper/whisper_tokenizer.py +167 -0
  329. kerasformers-1.0.0/kerasformers/models/xception/__init__.py +6 -0
  330. kerasformers-1.0.0/kerasformers/models/xception/config.py +71 -0
  331. kerasformers-1.0.0/kerasformers/models/xception/convert_xception_timm_to_keras.py +131 -0
  332. kerasformers-1.0.0/kerasformers/models/xception/xception_model.py +739 -0
  333. kerasformers-1.0.0/kerasformers/utils/__init__.py +24 -0
  334. kerasformers-1.0.0/kerasformers/utils/image.py +283 -0
  335. kerasformers-1.0.0/kerasformers/utils/labels.py +528 -0
  336. kerasformers-1.0.0/kerasformers/utils/video.py +426 -0
  337. kerasformers-1.0.0/kerasformers/utils/viz.py +534 -0
  338. kerasformers-1.0.0/kerasformers/version.py +5 -0
  339. kerasformers-1.0.0/kerasformers/weight_utils/__init__.py +19 -0
  340. kerasformers-1.0.0/kerasformers/weight_utils/custom_exception.py +63 -0
  341. kerasformers-1.0.0/kerasformers/weight_utils/file_downloader.py +65 -0
  342. kerasformers-1.0.0/kerasformers/weight_utils/hf_gated_weight_download.py +158 -0
  343. kerasformers-1.0.0/kerasformers/weight_utils/model_equivalence_tester.py +581 -0
  344. kerasformers-1.0.0/kerasformers/weight_utils/weight_split_torch_and_keras.py +209 -0
  345. kerasformers-1.0.0/kerasformers/weight_utils/weight_transfer_torch_to_keras.py +554 -0
  346. kerasformers-1.0.0/kerasformers.egg-info/PKG-INFO +201 -0
  347. kerasformers-1.0.0/kerasformers.egg-info/SOURCES.txt +352 -0
  348. kerasformers-1.0.0/kerasformers.egg-info/dependency_links.txt +1 -0
  349. kerasformers-1.0.0/kerasformers.egg-info/entry_points.txt +2 -0
  350. kerasformers-1.0.0/kerasformers.egg-info/requires.txt +6 -0
  351. kerasformers-1.0.0/kerasformers.egg-info/top_level.txt +1 -0
  352. kerasformers-1.0.0/pyproject.toml +98 -0
  353. kerasformers-1.0.0/setup.cfg +4 -0
  354. kerasformers-1.0.0/tests/test_modelling.py +530 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: kerasformers
3
+ Version: 1.0.0
4
+ Summary: Pretrained keras 3 vision models
5
+ Author-email: Gitesh Chawda <gitesh.ch.0912@gmail.com>
6
+ License: Apache License 2.0
7
+ Project-URL: homepage, https://github.com/IMvision12/KerasFormers
8
+ Project-URL: documentation, https://github.com/IMvision12/KerasFormers
9
+ Project-URL: repository, https://github.com/IMvision12/KerasFormers.git
10
+ Keywords: machine-learning,jax,computer-vision,neural-networks,tensorflow,torch,deep-learning,keras,imagenet,pretrained-weights,convolutional-neural-networks,transfer-learning,python-ml,data-science,ai-research,vision-transformer,image-classification,model-training,pytorch
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Software Development :: Libraries
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: keras
28
+ Provides-Extra: test
29
+ Requires-Dist: pytest; extra == "test"
30
+ Requires-Dist: pytest-cov; extra == "test"
31
+ Requires-Dist: requests; extra == "test"
32
+ Dynamic: license-file
33
+
34
+ # KerasFormers 🚀
35
+
36
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
37
+ [![Keras](https://img.shields.io/badge/keras-v3.5.0+-success.svg)](https://github.com/keras-team/keras)
38
+ ![Python](https://img.shields.io/badge/python-v3.10.0+-success.svg)
39
+
40
+ ## 📖 Introduction
41
+
42
+ KerasFormers 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, OWL-ViT, OWLv2), segmentation (SAM, SAM2, SAM3, SegFormer, DeepLabV3, EoMT, MaskFormer, Mask2Former, MobileViT-DeepLabV3), monocular depth estimation (Depth Anything V1, Depth Anything V2), feature extraction (DINO, DINOv2, DINOv3), vision-language modeling (CLIP, SigLIP, SigLIP2, MetaCLIP 2), speech recognition (Whisper), and more. It includes hybrid architectures like MaxViT alongside traditional CNNs and pure transformers. kerasformers 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.
43
+
44
+ ## ⚡ Installation
45
+
46
+ From PyPI (recommended)
47
+
48
+ ```shell
49
+ pip install -U kerasformers
50
+ ```
51
+
52
+ From Source
53
+
54
+ ```shell
55
+ pip install -U git+https://github.com/IMvision12/KerasFormers
56
+ ```
57
+
58
+ ## 📑 Documentation
59
+
60
+ Per-model guides with architecture notes, usage examples, and available pretrained weights live in the [`docs/`](docs/) folder. You'll find dedicated pages for [classification backbones](docs/classification_backbones.md) (CaiT, ViT, ResNet, ConvNeXt, EfficientNet, Swin, and the 30+ other backbones listed below — all share the same `XModel` / `XImageClassify` two-class structure), segmentation (SAM family, SegFormer, DeepLabV3, EoMT, [MaskFormer](docs/maskformer.md), [Mask2Former](docs/mask2former.md), [MobileViT](docs/mobilevit.md)), object detection (DETR variants, D-FINE, OWL-ViT, OWLv2), feature extraction (DINO v1/v2/v3), depth estimation (Depth Anything v1/v2), vision-language models (CLIP, SigLIP, SigLIP2, MetaCLIP 2), and speech recognition ([Whisper](docs/whisper.md)).
61
+
62
+ ## 📑 Models
63
+
64
+ - Backbones
65
+
66
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
67
+ |---------------|-------------------|---------------------|
68
+ | CaiT | [Going deeper with Image Transformers](https://arxiv.org/abs/2103.17239) | `timm` |
69
+ | ConvMixer | [Patches Are All You Need?](https://arxiv.org/abs/2201.09792) | `timm` |
70
+ | ConvNeXt | [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) | `timm` |
71
+ | ConvNeXt V2 | [ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders](https://arxiv.org/abs/2301.00808) | `timm` |
72
+ | DeiT | [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) | `timm` |
73
+ | DenseNet | [Densely Connected Convolutional Networks](https://arxiv.org/abs/1608.06993) | `timm` |
74
+ | EfficientNet | [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946) | `timm` |
75
+ | EfficientNet-Lite | [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946) | `timm` |
76
+ | EfficientNetV2 | [EfficientNetV2: Smaller Models and Faster Training](https://arxiv.org/abs/2104.00298) | `timm` |
77
+ | FlexiViT | [FlexiViT: One Model for All Patch Sizes](https://arxiv.org/abs/2212.08013) | `timm` |
78
+ | InceptionNeXt | [InceptionNeXt: When Inception Meets ConvNeXt](https://arxiv.org/abs/2303.16900) | `timm` |
79
+ | Inception-ResNet-v2 | [Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning](https://arxiv.org/abs/1602.07261) | `timm` |
80
+ | Inception-v3 | [Rethinking the Inception Architecture for Computer Vision](https://arxiv.org/abs/1512.00567) | `timm` |
81
+ | Inception-v4 | [Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning](https://arxiv.org/abs/1602.07261) | `timm` |
82
+ | MaxViT | [MaxViT: Multi-Axis Vision Transformer](https://arxiv.org/abs/2204.01697) | `timm` |
83
+ | MiT | [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) | `transformers` |
84
+ | MLP-Mixer | [MLP-Mixer: An all-MLP Architecture for Vision](https://arxiv.org/abs/2105.01601) | `timm` |
85
+ | MobileNetV2 | [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) | `timm` |
86
+ | MobileNetV3 | [Searching for MobileNetV3](https://arxiv.org/abs/1905.02244) | `keras` |
87
+ | MobileViT | [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) | `transformers` |
88
+ | MobileViTV2 | [Separable Self-attention for Mobile Vision Transformers](https://arxiv.org/abs/2206.02680) | `transformers` |
89
+ | NextViT | [Next-ViT: Next Generation Vision Transformer for Efficient Deployment in Realistic Industrial Scenarios](https://arxiv.org/abs/2207.05501) | `timm` |
90
+ | PiT | [Rethinking Spatial Dimensions of Vision Transformers](https://arxiv.org/abs/2103.16302) | `timm` |
91
+ | PoolFormer | [MetaFormer is Actually What You Need for Vision](https://arxiv.org/abs/2111.11418) | `timm` |
92
+ | Res2Net | [Res2Net: A New Multi-scale Backbone Architecture](https://arxiv.org/abs/1904.01169) | `timm` |
93
+ | ResMLP | [ResMLP: Feedforward networks for image classification with data-efficient training](https://arxiv.org/abs/2105.03404) | `timm` |
94
+ | ResNet | [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) | `timm` |
95
+ | ResNetV2 | [Identity Mappings in Deep Residual Networks](https://arxiv.org/abs/1603.05027) | `timm` |
96
+ | ResNeXt | [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/abs/1611.05431) | `timm` |
97
+ | SENet | [Squeeze-and-Excitation Networks](https://arxiv.org/abs/1709.01507) | `timm` |
98
+ | Swin Transformer | [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) | `timm` |
99
+ | Swin Transformer V2 | [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) | `timm` |
100
+ | VGG | [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://arxiv.org/abs/1409.1556) | `timm` |
101
+ | ViT | [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) | `timm` |
102
+ | Xception | [Xception: Deep Learning with Depthwise Separable Convolutions](https://arxiv.org/abs/1610.02357) | `keras` |
103
+
104
+ <br>
105
+
106
+ - Object Detection
107
+
108
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
109
+ |---------------|-------------------|---------------------|
110
+ | D-FINE | [D-FINE: Redefine Regression Task of DETRs as Fine-grained Distribution Refinement](https://arxiv.org/abs/2410.13842) | `transformers` |
111
+ | DETR | [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) | `transformers`|
112
+ | RT-DETR | [DETRs Beat YOLOs on Real-time Object Detection](https://arxiv.org/abs/2304.08069) | `transformers` |
113
+ | RT-DETRv2 | [RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformers](https://arxiv.org/abs/2407.17140) | `transformers` |
114
+ | RF-DETR | [RF-DETR: Neural Architecture Search for Real-Time Detection Transformers](https://arxiv.org/abs/2511.09554) | `rfdetr` |
115
+ | OWL-ViT | [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) | `transformers` |
116
+ | OWLv2 | [Scaling Open-Vocabulary Object Detection](https://arxiv.org/abs/2306.09683) | `transformers` |
117
+
118
+ <br>
119
+
120
+ - Segmentation
121
+
122
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
123
+ |---------------|-------------------|---------------------|
124
+ | DeepLabV3 | [Rethinking Atrous Convolution for Semantic Image Segmentation](https://arxiv.org/abs/1706.05587) | `torchvision` |
125
+ | EoMT | [Your ViT is Secretly an Image Segmentation Model](https://arxiv.org/abs/2503.19108) | `transformers` |
126
+ | MaskFormer | [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) | `transformers` |
127
+ | Mask2Former | [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) | `transformers` |
128
+ | MobileViT | [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) | `transformers` |
129
+ | MobileViTV2 | [Separable Self-attention for Mobile Vision Transformers](https://arxiv.org/abs/2206.02680) | `transformers` |
130
+ | SAM | [Segment Anything](https://arxiv.org/abs/2304.02643) | `transformers` |
131
+ | SAM2 | [SAM 2: Segment Anything in Images and Videos](https://arxiv.org/abs/2408.00714) | `transformers` |
132
+ | SAM3 | [SAM 3: Segment Anything with Concepts](https://arxiv.org/abs/2511.16719) | `transformers` (gated) |
133
+ | SegFormer | [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) | `transformers`|
134
+
135
+ <br>
136
+
137
+ - Feature Extraction
138
+
139
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
140
+ |---------------|-------------------|---------------------|
141
+ | DINO | [Emerging Properties in Self-Supervised Vision Transformers](https://arxiv.org/abs/2104.14294) | `torch.hub` |
142
+ | DINOv2 | [DINOv2: Learning Robust Visual Features without Supervision](https://arxiv.org/abs/2304.07193) | `transformers` |
143
+ | DINOv3 | [DINOv3: Self-Supervised Visual Representation Learning at Scale](https://arxiv.org/abs/2508.10104) | `transformers` (gated) |
144
+
145
+ <br>
146
+
147
+ - Depth Estimation
148
+
149
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
150
+ |---------------|-------------------|---------------------|
151
+ | Depth Anything V1 | [Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data](https://arxiv.org/abs/2401.10891) | `transformers` |
152
+ | Depth Anything V2 | [Depth Anything V2](https://arxiv.org/abs/2406.09414) | `transformers` |
153
+
154
+ <br>
155
+
156
+ - Multimodal Models
157
+
158
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
159
+ |---------------|-------------------|---------------------|
160
+ | CLIP | [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) | `transformers`|
161
+ | MetaCLIP 2 | [MetaCLIP 2: A Worldwide Scaling Recipe](https://arxiv.org/abs/2507.22062) | `transformers`|
162
+ | SigLIP | [Sigmoid Loss for Language Image Pre-Training](https://arxiv.org/abs/2303.15343) | `transformers`|
163
+ | SigLIP2 | [SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding, Localization, and Dense Features](https://arxiv.org/abs/2502.14786) | `transformers`|
164
+
165
+ <br>
166
+
167
+ - Speech
168
+
169
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
170
+ |---------------|-------------------|---------------------|
171
+ | Whisper | [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) | `transformers` |
172
+
173
+ <br>
174
+
175
+ ## 📜 License
176
+
177
+ This project leverages [timm](https://github.com/huggingface/pytorch-image-models#licenses) and [transformers](https://github.com/huggingface/transformers#license) for converting pretrained weights from PyTorch to Keras. For licensing details, please refer to the respective repositories.
178
+
179
+ - 🔖 **kerasformers Code**: This repository is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
180
+
181
+
182
+ ## 🌟 Credits
183
+
184
+ - The [Keras](https://github.com/keras-team/keras) team for their powerful and user-friendly deep learning framework
185
+ - The [Transformers](https://github.com/huggingface/transformers) library for its robust tools for loading and adapting pretrained models
186
+ - The [pytorch-image-models (timm)](https://github.com/huggingface/pytorch-image-models) project for pioneering many computer vision model implementations
187
+ - All contributors to the original papers and architectures implemented in this library
188
+
189
+ ## Citing
190
+
191
+ ### BibTeX
192
+
193
+ ```bash
194
+ @misc{gc2025kerasformers,
195
+ author = {Gitesh Chawda},
196
+ title = {KerasFormers},
197
+ year = {2025},
198
+ publisher = {GitHub},
199
+ journal = {GitHub repository},
200
+ howpublished = {\url{https://github.com/IMvision12/KerasFormers}}
201
+ ```
@@ -0,0 +1,168 @@
1
+ # KerasFormers 🚀
2
+
3
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4
+ [![Keras](https://img.shields.io/badge/keras-v3.5.0+-success.svg)](https://github.com/keras-team/keras)
5
+ ![Python](https://img.shields.io/badge/python-v3.10.0+-success.svg)
6
+
7
+ ## 📖 Introduction
8
+
9
+ KerasFormers 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, OWL-ViT, OWLv2), segmentation (SAM, SAM2, SAM3, SegFormer, DeepLabV3, EoMT, MaskFormer, Mask2Former, MobileViT-DeepLabV3), monocular depth estimation (Depth Anything V1, Depth Anything V2), feature extraction (DINO, DINOv2, DINOv3), vision-language modeling (CLIP, SigLIP, SigLIP2, MetaCLIP 2), speech recognition (Whisper), and more. It includes hybrid architectures like MaxViT alongside traditional CNNs and pure transformers. kerasformers 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.
10
+
11
+ ## ⚡ Installation
12
+
13
+ From PyPI (recommended)
14
+
15
+ ```shell
16
+ pip install -U kerasformers
17
+ ```
18
+
19
+ From Source
20
+
21
+ ```shell
22
+ pip install -U git+https://github.com/IMvision12/KerasFormers
23
+ ```
24
+
25
+ ## 📑 Documentation
26
+
27
+ Per-model guides with architecture notes, usage examples, and available pretrained weights live in the [`docs/`](docs/) folder. You'll find dedicated pages for [classification backbones](docs/classification_backbones.md) (CaiT, ViT, ResNet, ConvNeXt, EfficientNet, Swin, and the 30+ other backbones listed below — all share the same `XModel` / `XImageClassify` two-class structure), segmentation (SAM family, SegFormer, DeepLabV3, EoMT, [MaskFormer](docs/maskformer.md), [Mask2Former](docs/mask2former.md), [MobileViT](docs/mobilevit.md)), object detection (DETR variants, D-FINE, OWL-ViT, OWLv2), feature extraction (DINO v1/v2/v3), depth estimation (Depth Anything v1/v2), vision-language models (CLIP, SigLIP, SigLIP2, MetaCLIP 2), and speech recognition ([Whisper](docs/whisper.md)).
28
+
29
+ ## 📑 Models
30
+
31
+ - Backbones
32
+
33
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
34
+ |---------------|-------------------|---------------------|
35
+ | CaiT | [Going deeper with Image Transformers](https://arxiv.org/abs/2103.17239) | `timm` |
36
+ | ConvMixer | [Patches Are All You Need?](https://arxiv.org/abs/2201.09792) | `timm` |
37
+ | ConvNeXt | [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) | `timm` |
38
+ | ConvNeXt V2 | [ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders](https://arxiv.org/abs/2301.00808) | `timm` |
39
+ | DeiT | [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) | `timm` |
40
+ | DenseNet | [Densely Connected Convolutional Networks](https://arxiv.org/abs/1608.06993) | `timm` |
41
+ | EfficientNet | [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946) | `timm` |
42
+ | EfficientNet-Lite | [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946) | `timm` |
43
+ | EfficientNetV2 | [EfficientNetV2: Smaller Models and Faster Training](https://arxiv.org/abs/2104.00298) | `timm` |
44
+ | FlexiViT | [FlexiViT: One Model for All Patch Sizes](https://arxiv.org/abs/2212.08013) | `timm` |
45
+ | InceptionNeXt | [InceptionNeXt: When Inception Meets ConvNeXt](https://arxiv.org/abs/2303.16900) | `timm` |
46
+ | Inception-ResNet-v2 | [Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning](https://arxiv.org/abs/1602.07261) | `timm` |
47
+ | Inception-v3 | [Rethinking the Inception Architecture for Computer Vision](https://arxiv.org/abs/1512.00567) | `timm` |
48
+ | Inception-v4 | [Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning](https://arxiv.org/abs/1602.07261) | `timm` |
49
+ | MaxViT | [MaxViT: Multi-Axis Vision Transformer](https://arxiv.org/abs/2204.01697) | `timm` |
50
+ | MiT | [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) | `transformers` |
51
+ | MLP-Mixer | [MLP-Mixer: An all-MLP Architecture for Vision](https://arxiv.org/abs/2105.01601) | `timm` |
52
+ | MobileNetV2 | [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) | `timm` |
53
+ | MobileNetV3 | [Searching for MobileNetV3](https://arxiv.org/abs/1905.02244) | `keras` |
54
+ | MobileViT | [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) | `transformers` |
55
+ | MobileViTV2 | [Separable Self-attention for Mobile Vision Transformers](https://arxiv.org/abs/2206.02680) | `transformers` |
56
+ | NextViT | [Next-ViT: Next Generation Vision Transformer for Efficient Deployment in Realistic Industrial Scenarios](https://arxiv.org/abs/2207.05501) | `timm` |
57
+ | PiT | [Rethinking Spatial Dimensions of Vision Transformers](https://arxiv.org/abs/2103.16302) | `timm` |
58
+ | PoolFormer | [MetaFormer is Actually What You Need for Vision](https://arxiv.org/abs/2111.11418) | `timm` |
59
+ | Res2Net | [Res2Net: A New Multi-scale Backbone Architecture](https://arxiv.org/abs/1904.01169) | `timm` |
60
+ | ResMLP | [ResMLP: Feedforward networks for image classification with data-efficient training](https://arxiv.org/abs/2105.03404) | `timm` |
61
+ | ResNet | [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) | `timm` |
62
+ | ResNetV2 | [Identity Mappings in Deep Residual Networks](https://arxiv.org/abs/1603.05027) | `timm` |
63
+ | ResNeXt | [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/abs/1611.05431) | `timm` |
64
+ | SENet | [Squeeze-and-Excitation Networks](https://arxiv.org/abs/1709.01507) | `timm` |
65
+ | Swin Transformer | [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) | `timm` |
66
+ | Swin Transformer V2 | [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) | `timm` |
67
+ | VGG | [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://arxiv.org/abs/1409.1556) | `timm` |
68
+ | ViT | [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) | `timm` |
69
+ | Xception | [Xception: Deep Learning with Depthwise Separable Convolutions](https://arxiv.org/abs/1610.02357) | `keras` |
70
+
71
+ <br>
72
+
73
+ - Object Detection
74
+
75
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
76
+ |---------------|-------------------|---------------------|
77
+ | D-FINE | [D-FINE: Redefine Regression Task of DETRs as Fine-grained Distribution Refinement](https://arxiv.org/abs/2410.13842) | `transformers` |
78
+ | DETR | [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) | `transformers`|
79
+ | RT-DETR | [DETRs Beat YOLOs on Real-time Object Detection](https://arxiv.org/abs/2304.08069) | `transformers` |
80
+ | RT-DETRv2 | [RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformers](https://arxiv.org/abs/2407.17140) | `transformers` |
81
+ | RF-DETR | [RF-DETR: Neural Architecture Search for Real-Time Detection Transformers](https://arxiv.org/abs/2511.09554) | `rfdetr` |
82
+ | OWL-ViT | [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) | `transformers` |
83
+ | OWLv2 | [Scaling Open-Vocabulary Object Detection](https://arxiv.org/abs/2306.09683) | `transformers` |
84
+
85
+ <br>
86
+
87
+ - Segmentation
88
+
89
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
90
+ |---------------|-------------------|---------------------|
91
+ | DeepLabV3 | [Rethinking Atrous Convolution for Semantic Image Segmentation](https://arxiv.org/abs/1706.05587) | `torchvision` |
92
+ | EoMT | [Your ViT is Secretly an Image Segmentation Model](https://arxiv.org/abs/2503.19108) | `transformers` |
93
+ | MaskFormer | [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) | `transformers` |
94
+ | Mask2Former | [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) | `transformers` |
95
+ | MobileViT | [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) | `transformers` |
96
+ | MobileViTV2 | [Separable Self-attention for Mobile Vision Transformers](https://arxiv.org/abs/2206.02680) | `transformers` |
97
+ | SAM | [Segment Anything](https://arxiv.org/abs/2304.02643) | `transformers` |
98
+ | SAM2 | [SAM 2: Segment Anything in Images and Videos](https://arxiv.org/abs/2408.00714) | `transformers` |
99
+ | SAM3 | [SAM 3: Segment Anything with Concepts](https://arxiv.org/abs/2511.16719) | `transformers` (gated) |
100
+ | SegFormer | [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) | `transformers`|
101
+
102
+ <br>
103
+
104
+ - Feature Extraction
105
+
106
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
107
+ |---------------|-------------------|---------------------|
108
+ | DINO | [Emerging Properties in Self-Supervised Vision Transformers](https://arxiv.org/abs/2104.14294) | `torch.hub` |
109
+ | DINOv2 | [DINOv2: Learning Robust Visual Features without Supervision](https://arxiv.org/abs/2304.07193) | `transformers` |
110
+ | DINOv3 | [DINOv3: Self-Supervised Visual Representation Learning at Scale](https://arxiv.org/abs/2508.10104) | `transformers` (gated) |
111
+
112
+ <br>
113
+
114
+ - Depth Estimation
115
+
116
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
117
+ |---------------|-------------------|---------------------|
118
+ | Depth Anything V1 | [Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data](https://arxiv.org/abs/2401.10891) | `transformers` |
119
+ | Depth Anything V2 | [Depth Anything V2](https://arxiv.org/abs/2406.09414) | `transformers` |
120
+
121
+ <br>
122
+
123
+ - Multimodal Models
124
+
125
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
126
+ |---------------|-------------------|---------------------|
127
+ | CLIP | [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) | `transformers`|
128
+ | MetaCLIP 2 | [MetaCLIP 2: A Worldwide Scaling Recipe](https://arxiv.org/abs/2507.22062) | `transformers`|
129
+ | SigLIP | [Sigmoid Loss for Language Image Pre-Training](https://arxiv.org/abs/2303.15343) | `transformers`|
130
+ | SigLIP2 | [SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding, Localization, and Dense Features](https://arxiv.org/abs/2502.14786) | `transformers`|
131
+
132
+ <br>
133
+
134
+ - Speech
135
+
136
+ | 🏷️ Model Name | 📜 Reference Paper | 📦 Source of Weights |
137
+ |---------------|-------------------|---------------------|
138
+ | Whisper | [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) | `transformers` |
139
+
140
+ <br>
141
+
142
+ ## 📜 License
143
+
144
+ This project leverages [timm](https://github.com/huggingface/pytorch-image-models#licenses) and [transformers](https://github.com/huggingface/transformers#license) for converting pretrained weights from PyTorch to Keras. For licensing details, please refer to the respective repositories.
145
+
146
+ - 🔖 **kerasformers Code**: This repository is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
147
+
148
+
149
+ ## 🌟 Credits
150
+
151
+ - The [Keras](https://github.com/keras-team/keras) team for their powerful and user-friendly deep learning framework
152
+ - The [Transformers](https://github.com/huggingface/transformers) library for its robust tools for loading and adapting pretrained models
153
+ - The [pytorch-image-models (timm)](https://github.com/huggingface/pytorch-image-models) project for pioneering many computer vision model implementations
154
+ - All contributors to the original papers and architectures implemented in this library
155
+
156
+ ## Citing
157
+
158
+ ### BibTeX
159
+
160
+ ```bash
161
+ @misc{gc2025kerasformers,
162
+ author = {Gitesh Chawda},
163
+ title = {KerasFormers},
164
+ year = {2025},
165
+ publisher = {GitHub},
166
+ journal = {GitHub repository},
167
+ howpublished = {\url{https://github.com/IMvision12/KerasFormers}}
168
+ ```
@@ -0,0 +1,13 @@
1
+ from kerasformers import layers, models, utils, weight_utils
2
+ from kerasformers.version import version
3
+
4
+ __version__ = "1.0.0"
5
+
6
+ __all__ = [
7
+ "layers",
8
+ "models",
9
+ "utils",
10
+ "weight_utils",
11
+ "version",
12
+ "__version__",
13
+ ]