From 9653571c226632eea2ddb316b006d9ccd043f514 Mon Sep 17 00:00:00 2001 From: Divyashree Sreepathihalli Date: Mon, 14 Oct 2024 19:06:09 -0700 Subject: [PATCH] update presets to point to the main Keras Kaggle page (#1921) * update presets to point to the main keras page * update mit path --- .../models/deeplab_v3/deeplab_v3_presets.py | 2 +- .../src/models/densenet/densenet_presets.py | 6 +- .../mix_transformer_presets.py | 24 ++++---- keras_hub/src/models/resnet/resnet_presets.py | 12 ++-- keras_hub/src/models/sam/sam_presets.py | 6 +- .../stable_diffusion_3_presets.py | 2 +- keras_hub/src/models/vgg/vgg_presets.py | 56 +++++++++++++++++++ 7 files changed, 82 insertions(+), 26 deletions(-) create mode 100644 keras_hub/src/models/vgg/vgg_presets.py diff --git a/keras_hub/src/models/deeplab_v3/deeplab_v3_presets.py b/keras_hub/src/models/deeplab_v3/deeplab_v3_presets.py index 9a4db0b121..11bd7594ac 100644 --- a/keras_hub/src/models/deeplab_v3/deeplab_v3_presets.py +++ b/keras_hub/src/models/deeplab_v3/deeplab_v3_presets.py @@ -13,6 +13,6 @@ "path": "deeplabv3", "model_card": "https://arxiv.org/abs/1802.02611", }, - "kaggle_handle": "kaggle://kerashub/deeplabv3/keras/deeplabv3_plus_resnet50_pascalvoc", + "kaggle_handle": "kaggle://keras/deeplabv3/keras/deeplabv3_plus_resnet50_pascalvoc/3", }, } diff --git a/keras_hub/src/models/densenet/densenet_presets.py b/keras_hub/src/models/densenet/densenet_presets.py index 2c3ef77842..72675345e1 100644 --- a/keras_hub/src/models/densenet/densenet_presets.py +++ b/keras_hub/src/models/densenet/densenet_presets.py @@ -12,7 +12,7 @@ "path": "densenet", "model_card": "https://arxiv.org/abs/1608.06993", }, - "kaggle_handle": "kaggle://kerashub/densenet/keras/densenet_121_imagenet", + "kaggle_handle": "kaggle://keras/densenet/keras/densenet_121_imagenet/1", }, "densenet_169_imagenet": { "metadata": { @@ -25,7 +25,7 @@ "path": "densenet", "model_card": "https://arxiv.org/abs/1608.06993", }, - "kaggle_handle": "kaggle://kerashub/densenet/keras/densenet_169_imagenet", + "kaggle_handle": "kaggle://keras/densenet/keras/densenet_169_imagenet/1", }, "densenet_201_imagenet": { "metadata": { @@ -38,6 +38,6 @@ "path": "densenet", "model_card": "https://arxiv.org/abs/1608.06993", }, - "kaggle_handle": "kaggle://kerashub/densenet/keras/densenet_201_imagenet", + "kaggle_handle": "kaggle://keras/densenet/keras/densenet_201_imagenet/1", }, } diff --git a/keras_hub/src/models/mix_transformer/mix_transformer_presets.py b/keras_hub/src/models/mix_transformer/mix_transformer_presets.py index 840fa9e1d3..2408f5529b 100644 --- a/keras_hub/src/models/mix_transformer/mix_transformer_presets.py +++ b/keras_hub/src/models/mix_transformer/mix_transformer_presets.py @@ -21,7 +21,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b0_ade20k_512", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b0_ade20k_512/1", }, "mit_b1_ade20k_512": { "metadata": { @@ -32,7 +32,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b1_ade20k_512", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b1_ade20k_512/1", }, "mit_b2_ade20k_512": { "metadata": { @@ -43,7 +43,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b2_ade20k_512", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b2_ade20k_512/1", }, "mit_b3_ade20k_512": { "metadata": { @@ -54,7 +54,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b3_ade20k_512", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b3_ade20k_512/1", }, "mit_b4_ade20k_512": { "metadata": { @@ -65,7 +65,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b4_ade20k_512", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b4_ade20k_512/1", }, "mit_b5_ade20k_640": { "metadata": { @@ -76,7 +76,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b5_ade20k_512", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b5_ade20k_512/1", }, "mit_b0_cityscapes_1024": { "metadata": { @@ -87,7 +87,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b0_cityscapes_1024", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b0_cityscapes_1024/1", }, "mit_b1_cityscapes_1024": { "metadata": { @@ -98,7 +98,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b1_cityscapes_1024", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b1_cityscapes_1024/1", }, "mit_b2_cityscapes_1024": { "metadata": { @@ -109,7 +109,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b2_cityscapes_1024", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b2_cityscapes_1024/1", }, "mit_b3_cityscapes_1024": { "metadata": { @@ -120,7 +120,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b3_cityscapes_1024", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b3_cityscapes_1024/1", }, "mit_b4_cityscapes_1024": { "metadata": { @@ -131,7 +131,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b4_cityscapes_1024", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b4_cityscapes_1024/1", }, "mit_b5_cityscapes_1024": { "metadata": { @@ -142,7 +142,7 @@ "official_name": "MiT", "path": "mit", }, - "kaggle_handle": "kaggle://kerashub/mix-transformer/keras/mit_b5_cityscapes_1024", + "kaggle_handle": "kaggle://keras/mit/keras/mit_b5_cityscapes_1024/1", }, } diff --git a/keras_hub/src/models/resnet/resnet_presets.py b/keras_hub/src/models/resnet/resnet_presets.py index 58bed3d90a..7aff71b9bf 100644 --- a/keras_hub/src/models/resnet/resnet_presets.py +++ b/keras_hub/src/models/resnet/resnet_presets.py @@ -12,7 +12,7 @@ "path": "resnet", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/resnetv1/keras/resnet_18_imagenet/3", + "kaggle_handle": "kaggle://keras/resnetv1/keras/resnet_18_imagenet/1", }, "resnet_50_imagenet": { "metadata": { @@ -25,7 +25,7 @@ "path": "resnet", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/resnetv1/keras/resnet_50_imagenet/3", + "kaggle_handle": "kaggle://keras/resnetv1/keras/resnet_50_imagenet/1", }, "resnet_101_imagenet": { "metadata": { @@ -38,7 +38,7 @@ "path": "resnet", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/resnetv1/keras/resnet_101_imagenet/3", + "kaggle_handle": "kaggle://keras/resnetv1/keras/resnet_101_imagenet/1", }, "resnet_152_imagenet": { "metadata": { @@ -51,7 +51,7 @@ "path": "resnet", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/resnetv1/keras/resnet_152_imagenet/3", + "kaggle_handle": "kaggle://keras/resnetv1/keras/resnet_152_imagenet/1", }, "resnet_v2_50_imagenet": { "metadata": { @@ -64,7 +64,7 @@ "path": "resnet", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/resnetv2/keras/resnet_v2_50_imagenet/3", + "kaggle_handle": "kaggle://keras/resnetv2/keras/resnet_v2_50_imagenet/1", }, "resnet_v2_101_imagenet": { "metadata": { @@ -77,6 +77,6 @@ "path": "resnet", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/resnetv2/keras/resnet_v2_101_imagenet/3", + "kaggle_handle": "kaggle://keras/resnetv2/keras/resnet_v2_101_imagenet/1", }, } diff --git a/keras_hub/src/models/sam/sam_presets.py b/keras_hub/src/models/sam/sam_presets.py index 7b7986662c..89d89c63a8 100644 --- a/keras_hub/src/models/sam/sam_presets.py +++ b/keras_hub/src/models/sam/sam_presets.py @@ -9,7 +9,7 @@ "path": "sam", "model_card": "https://arxiv.org/abs/2304.02643", }, - "kaggle_handle": "kaggle://kerashub/sam/keras/sam_base_sa1b/2", + "kaggle_handle": "kaggle://keras/sam/keras/sam_base_sa1b/2", }, "sam_large_sa1b": { "metadata": { @@ -19,7 +19,7 @@ "path": "sam", "model_card": "https://arxiv.org/abs/2304.02643", }, - "kaggle_handle": "kaggle://kerashub/sam/keras/sam_large_sa1b/2", + "kaggle_handle": "kaggle://keras/sam/keras/sam_large_sa1b/3", }, "sam_huge_sa1b": { "metadata": { @@ -29,6 +29,6 @@ "path": "sam", "model_card": "https://arxiv.org/abs/2304.02643", }, - "kaggle_handle": "kaggle://kerashub/sam/keras/sam_huge_sa1b/2", + "kaggle_handle": "kaggle://keras/sam/keras/sam_huge_sa1b/3", }, } diff --git a/keras_hub/src/models/stable_diffusion_3/stable_diffusion_3_presets.py b/keras_hub/src/models/stable_diffusion_3/stable_diffusion_3_presets.py index af55ac276a..dc32214bed 100644 --- a/keras_hub/src/models/stable_diffusion_3/stable_diffusion_3_presets.py +++ b/keras_hub/src/models/stable_diffusion_3/stable_diffusion_3_presets.py @@ -13,6 +13,6 @@ "path": "stablediffusion3", "model_card": "https://arxiv.org/abs/2110.00476", }, - "kaggle_handle": "kaggle://kerashub/stablediffusion3/keras/stable_diffusion_3_medium/4", + "kaggle_handle": "kaggle://keras/stablediffusion3/keras/stable_diffusion_3_medium/1", } } diff --git a/keras_hub/src/models/vgg/vgg_presets.py b/keras_hub/src/models/vgg/vgg_presets.py new file mode 100644 index 0000000000..e0379a8da0 --- /dev/null +++ b/keras_hub/src/models/vgg/vgg_presets.py @@ -0,0 +1,56 @@ +"""vgg preset configurations.""" + +backbone_presets = { + "vgg_11_imagenet": { + "metadata": { + "description": ( + "11-layer vgg model pre-trained on the ImageNet 1k dataset " + "at a 224x224 resolution." + ), + "params": 9220480, + "official_name": "vgg", + "path": "vgg", + "model_card": "https://arxiv.org/abs/1409.1556", + }, + "kaggle_handle": "kaggle://keras/vgg/keras/vgg_11_imagenet/1", + }, + "vgg_13_imagenet": { + "metadata": { + "description": ( + "13-layer vgg model pre-trained on the ImageNet 1k dataset " + "at a 224x224 resolution." + ), + "params": 9404992, + "official_name": "vgg", + "path": "vgg", + "model_card": "https://arxiv.org/abs/1409.1556", + }, + "kaggle_handle": "kaggle://keras/vgg/keras/vgg_13_imagenet/1", + }, + "vgg_16_imagenet": { + "metadata": { + "description": ( + "16-layer vgg model pre-trained on the ImageNet 1k dataset " + "at a 224x224 resolution." + ), + "params": 14714688, + "official_name": "vgg", + "path": "vgg", + "model_card": "https://arxiv.org/abs/1409.1556", + }, + "kaggle_handle": "kaggle://keras/vgg/keras/vgg_16_imagenet/1", + }, + "vgg_19_imagenet": { + "metadata": { + "description": ( + "19-layer vgg model pre-trained on the ImageNet 1k dataset " + "at a 224x224 resolution." + ), + "params": 20024384, + "official_name": "vgg", + "path": "vgg", + "model_card": "https://arxiv.org/abs/1409.1556", + }, + "kaggle_handle": "kaggle://keras/vgg/keras/vgg_19_imagenet/1", + }, +}