Upload folder using huggingface_hub
Browse files- README.md +44 -0
- config.json +156 -0
- image_converter.json +28 -0
- metadata.json +9 -0
- model.weights.h5 +3 -0
- preprocessor.json +46 -0
- task.json +246 -0
README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: keras-hub
|
| 3 |
+
---
|
| 4 |
+
This is a [`DFine` model](https://keras.io/api/keras_hub/models/d_fine) uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
|
| 5 |
+
This model is related to a `ObjectDetector` task.
|
| 6 |
+
|
| 7 |
+
Model config:
|
| 8 |
+
* **name:** d_fine_backbone
|
| 9 |
+
* **trainable:** True
|
| 10 |
+
* **backbone:** {'module': 'keras_hub.src.models.hgnetv2.hgnetv2_backbone', 'class_name': 'HGNetV2Backbone', 'config': {'name': 'hg_net_v2_backbone', 'trainable': True, 'depths': [3, 4, 6, 3], 'embedding_size': 32, 'hidden_sizes': [128, 256, 512, 1024], 'stem_channels': [3, 16, 16], 'hidden_act': 'relu', 'use_learnable_affine_block': True, 'stackwise_stage_filters': [[16, 16, 64, 1, 3, 3], [64, 32, 256, 1, 3, 3], [256, 64, 512, 2, 3, 5], [512, 128, 1024, 1, 3, 5]], 'apply_downsample': [False, True, True, True], 'use_lightweight_conv_block': [False, False, True, True], 'image_shape': [None, None, 3], 'out_features': ['stage2', 'stage3', 'stage4'], 'data_format': 'channels_last'}, 'registered_name': 'keras_hub>HGNetV2Backbone'}
|
| 11 |
+
* **decoder_in_channels:** [256, 256, 256]
|
| 12 |
+
* **encoder_hidden_dim:** 256
|
| 13 |
+
* **num_labels:** 80
|
| 14 |
+
* **num_denoising:** 100
|
| 15 |
+
* **learn_initial_query:** False
|
| 16 |
+
* **num_queries:** 300
|
| 17 |
+
* **anchor_image_size:** [640, 640]
|
| 18 |
+
* **feat_strides:** [8, 16, 32]
|
| 19 |
+
* **num_feature_levels:** 3
|
| 20 |
+
* **hidden_dim:** 256
|
| 21 |
+
* **encoder_in_channels:** [256, 512, 1024]
|
| 22 |
+
* **encode_proj_layers:** [2]
|
| 23 |
+
* **num_attention_heads:** 8
|
| 24 |
+
* **encoder_ffn_dim:** 1024
|
| 25 |
+
* **num_encoder_layers:** 1
|
| 26 |
+
* **hidden_expansion:** 0.5
|
| 27 |
+
* **depth_multiplier:** 0.34
|
| 28 |
+
* **eval_idx:** -1
|
| 29 |
+
* **box_noise_scale:** 1.0
|
| 30 |
+
* **label_noise_ratio:** 0.5
|
| 31 |
+
* **labels:** None
|
| 32 |
+
* **num_decoder_layers:** 3
|
| 33 |
+
* **decoder_attention_heads:** 8
|
| 34 |
+
* **decoder_ffn_dim:** 1024
|
| 35 |
+
* **decoder_method:** default
|
| 36 |
+
* **decoder_n_points:** [3, 6, 3]
|
| 37 |
+
* **lqe_hidden_dim:** 64
|
| 38 |
+
* **num_lqe_layers:** 2
|
| 39 |
+
* **seed:** 0
|
| 40 |
+
* **image_shape:** [None, None, 3]
|
| 41 |
+
* **data_format:** channels_last
|
| 42 |
+
* **out_features:** ['stage2', 'stage3', 'stage4']
|
| 43 |
+
|
| 44 |
+
This model card has been generated automatically and should be completed by the model author. See [Model Cards documentation](https://huggingface.co/docs/hub/model-cards) for more information.
|
config.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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2.hgnetv2_backbone",
|
| 9 |
+
"class_name": "HGNetV2Backbone",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "hg_net_v2_backbone",
|
| 12 |
+
"trainable": true,
|
| 13 |
+
"depths": [
|
| 14 |
+
3,
|
| 15 |
+
4,
|
| 16 |
+
6,
|
| 17 |
+
3
|
| 18 |
+
],
|
| 19 |
+
"embedding_size": 32,
|
| 20 |
+
"hidden_sizes": [
|
| 21 |
+
128,
|
| 22 |
+
256,
|
| 23 |
+
512,
|
| 24 |
+
1024
|
| 25 |
+
],
|
| 26 |
+
"stem_channels": [
|
| 27 |
+
3,
|
| 28 |
+
16,
|
| 29 |
+
16
|
| 30 |
+
],
|
| 31 |
+
"hidden_act": "relu",
|
| 32 |
+
"use_learnable_affine_block": true,
|
| 33 |
+
"stackwise_stage_filters": [
|
| 34 |
+
[
|
| 35 |
+
16,
|
| 36 |
+
16,
|
| 37 |
+
64,
|
| 38 |
+
1,
|
| 39 |
+
3,
|
| 40 |
+
3
|
| 41 |
+
],
|
| 42 |
+
[
|
| 43 |
+
64,
|
| 44 |
+
32,
|
| 45 |
+
256,
|
| 46 |
+
1,
|
| 47 |
+
3,
|
| 48 |
+
3
|
| 49 |
+
],
|
| 50 |
+
[
|
| 51 |
+
256,
|
| 52 |
+
64,
|
| 53 |
+
512,
|
| 54 |
+
2,
|
| 55 |
+
3,
|
| 56 |
+
5
|
| 57 |
+
],
|
| 58 |
+
[
|
| 59 |
+
512,
|
| 60 |
+
128,
|
| 61 |
+
1024,
|
| 62 |
+
1,
|
| 63 |
+
3,
|
| 64 |
+
5
|
| 65 |
+
]
|
| 66 |
+
],
|
| 67 |
+
"apply_downsample": [
|
| 68 |
+
false,
|
| 69 |
+
true,
|
| 70 |
+
true,
|
| 71 |
+
true
|
| 72 |
+
],
|
| 73 |
+
"use_lightweight_conv_block": [
|
| 74 |
+
false,
|
| 75 |
+
false,
|
| 76 |
+
true,
|
| 77 |
+
true
|
| 78 |
+
],
|
| 79 |
+
"image_shape": [
|
| 80 |
+
null,
|
| 81 |
+
null,
|
| 82 |
+
3
|
| 83 |
+
],
|
| 84 |
+
"out_features": [
|
| 85 |
+
"stage2",
|
| 86 |
+
"stage3",
|
| 87 |
+
"stage4"
|
| 88 |
+
],
|
| 89 |
+
"data_format": "channels_last"
|
| 90 |
+
},
|
| 91 |
+
"registered_name": "keras_hub>HGNetV2Backbone"
|
| 92 |
+
},
|
| 93 |
+
"decoder_in_channels": [
|
| 94 |
+
256,
|
| 95 |
+
256,
|
| 96 |
+
256
|
| 97 |
+
],
|
| 98 |
+
"encoder_hidden_dim": 256,
|
| 99 |
+
"num_labels": 80,
|
| 100 |
+
"num_denoising": 100,
|
| 101 |
+
"learn_initial_query": false,
|
| 102 |
+
"num_queries": 300,
|
| 103 |
+
"anchor_image_size": [
|
| 104 |
+
640,
|
| 105 |
+
640
|
| 106 |
+
],
|
| 107 |
+
"feat_strides": [
|
| 108 |
+
8,
|
| 109 |
+
16,
|
| 110 |
+
32
|
| 111 |
+
],
|
| 112 |
+
"num_feature_levels": 3,
|
| 113 |
+
"hidden_dim": 256,
|
| 114 |
+
"encoder_in_channels": [
|
| 115 |
+
256,
|
| 116 |
+
512,
|
| 117 |
+
1024
|
| 118 |
+
],
|
| 119 |
+
"encode_proj_layers": [
|
| 120 |
+
2
|
| 121 |
+
],
|
| 122 |
+
"num_attention_heads": 8,
|
| 123 |
+
"encoder_ffn_dim": 1024,
|
| 124 |
+
"num_encoder_layers": 1,
|
| 125 |
+
"hidden_expansion": 0.5,
|
| 126 |
+
"depth_multiplier": 0.34,
|
| 127 |
+
"eval_idx": -1,
|
| 128 |
+
"box_noise_scale": 1.0,
|
| 129 |
+
"label_noise_ratio": 0.5,
|
| 130 |
+
"labels": null,
|
| 131 |
+
"num_decoder_layers": 3,
|
| 132 |
+
"decoder_attention_heads": 8,
|
| 133 |
+
"decoder_ffn_dim": 1024,
|
| 134 |
+
"decoder_method": "default",
|
| 135 |
+
"decoder_n_points": [
|
| 136 |
+
3,
|
| 137 |
+
6,
|
| 138 |
+
3
|
| 139 |
+
],
|
| 140 |
+
"lqe_hidden_dim": 64,
|
| 141 |
+
"num_lqe_layers": 2,
|
| 142 |
+
"seed": 0,
|
| 143 |
+
"image_shape": [
|
| 144 |
+
null,
|
| 145 |
+
null,
|
| 146 |
+
3
|
| 147 |
+
],
|
| 148 |
+
"data_format": "channels_last",
|
| 149 |
+
"out_features": [
|
| 150 |
+
"stage2",
|
| 151 |
+
"stage3",
|
| 152 |
+
"stage4"
|
| 153 |
+
]
|
| 154 |
+
},
|
| 155 |
+
"registered_name": "keras_hub>DFineBackbone"
|
| 156 |
+
}
|
image_converter.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.d_fine.d_fine_image_converter",
|
| 3 |
+
"class_name": "DFineImageConverter",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "d_fine_image_converter",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"dtype": {
|
| 8 |
+
"module": "keras",
|
| 9 |
+
"class_name": "DTypePolicy",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "float32"
|
| 12 |
+
},
|
| 13 |
+
"registered_name": null
|
| 14 |
+
},
|
| 15 |
+
"image_size": [
|
| 16 |
+
640,
|
| 17 |
+
640
|
| 18 |
+
],
|
| 19 |
+
"scale": 0.00392156862745098,
|
| 20 |
+
"offset": null,
|
| 21 |
+
"interpolation": "bilinear",
|
| 22 |
+
"antialias": false,
|
| 23 |
+
"crop_to_aspect_ratio": true,
|
| 24 |
+
"pad_to_aspect_ratio": false,
|
| 25 |
+
"bounding_box_format": "yxyx"
|
| 26 |
+
},
|
| 27 |
+
"registered_name": "keras_hub>DFineImageConverter"
|
| 28 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"keras_version": "3.10.0",
|
| 3 |
+
"keras_hub_version": "0.23.0.dev0",
|
| 4 |
+
"parameter_count": 10329321,
|
| 5 |
+
"date_saved": "2025-08-26@07:48:10",
|
| 6 |
+
"tasks": [
|
| 7 |
+
"ObjectDetector"
|
| 8 |
+
]
|
| 9 |
+
}
|
model.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d1d31dcc49223401a912375cdcbbcee4b19ff594358a518c979d6abd886954d
|
| 3 |
+
size 43140280
|
preprocessor.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.d_fine.d_fine_object_detector_preprocessor",
|
| 3 |
+
"class_name": "DFineObjectDetectorPreprocessor",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "d_fine_object_detector_preprocessor",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"dtype": {
|
| 8 |
+
"module": "keras",
|
| 9 |
+
"class_name": "DTypePolicy",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "float32"
|
| 12 |
+
},
|
| 13 |
+
"registered_name": null
|
| 14 |
+
},
|
| 15 |
+
"image_converter": {
|
| 16 |
+
"module": "keras_hub.src.models.d_fine.d_fine_image_converter",
|
| 17 |
+
"class_name": "DFineImageConverter",
|
| 18 |
+
"config": {
|
| 19 |
+
"name": "d_fine_image_converter",
|
| 20 |
+
"trainable": true,
|
| 21 |
+
"dtype": {
|
| 22 |
+
"module": "keras",
|
| 23 |
+
"class_name": "DTypePolicy",
|
| 24 |
+
"config": {
|
| 25 |
+
"name": "float32"
|
| 26 |
+
},
|
| 27 |
+
"registered_name": null
|
| 28 |
+
},
|
| 29 |
+
"image_size": [
|
| 30 |
+
640,
|
| 31 |
+
640
|
| 32 |
+
],
|
| 33 |
+
"scale": 0.00392156862745098,
|
| 34 |
+
"offset": null,
|
| 35 |
+
"interpolation": "bilinear",
|
| 36 |
+
"antialias": false,
|
| 37 |
+
"crop_to_aspect_ratio": true,
|
| 38 |
+
"pad_to_aspect_ratio": false,
|
| 39 |
+
"bounding_box_format": "yxyx"
|
| 40 |
+
},
|
| 41 |
+
"registered_name": "keras_hub>DFineImageConverter"
|
| 42 |
+
},
|
| 43 |
+
"config_file": "preprocessor.json"
|
| 44 |
+
},
|
| 45 |
+
"registered_name": "keras_hub>DFineObjectDetectorPreprocessor"
|
| 46 |
+
}
|
task.json
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.d_fine.d_fine_object_detector",
|
| 3 |
+
"class_name": "DFineObjectDetector",
|
| 4 |
+
"config": {
|
| 5 |
+
"backbone": {
|
| 6 |
+
"module": "keras_hub.src.models.d_fine.d_fine_backbone",
|
| 7 |
+
"class_name": "DFineBackbone",
|
| 8 |
+
"config": {
|
| 9 |
+
"name": "d_fine_backbone",
|
| 10 |
+
"trainable": true,
|
| 11 |
+
"backbone": {
|
| 12 |
+
"module": "keras_hub.src.models.hgnetv2.hgnetv2_backbone",
|
| 13 |
+
"class_name": "HGNetV2Backbone",
|
| 14 |
+
"config": {
|
| 15 |
+
"name": "hg_net_v2_backbone",
|
| 16 |
+
"trainable": true,
|
| 17 |
+
"depths": [
|
| 18 |
+
3,
|
| 19 |
+
4,
|
| 20 |
+
6,
|
| 21 |
+
3
|
| 22 |
+
],
|
| 23 |
+
"embedding_size": 32,
|
| 24 |
+
"hidden_sizes": [
|
| 25 |
+
128,
|
| 26 |
+
256,
|
| 27 |
+
512,
|
| 28 |
+
1024
|
| 29 |
+
],
|
| 30 |
+
"stem_channels": [
|
| 31 |
+
3,
|
| 32 |
+
16,
|
| 33 |
+
16
|
| 34 |
+
],
|
| 35 |
+
"hidden_act": "relu",
|
| 36 |
+
"use_learnable_affine_block": true,
|
| 37 |
+
"stackwise_stage_filters": [
|
| 38 |
+
[
|
| 39 |
+
16,
|
| 40 |
+
16,
|
| 41 |
+
64,
|
| 42 |
+
1,
|
| 43 |
+
3,
|
| 44 |
+
3
|
| 45 |
+
],
|
| 46 |
+
[
|
| 47 |
+
64,
|
| 48 |
+
32,
|
| 49 |
+
256,
|
| 50 |
+
1,
|
| 51 |
+
3,
|
| 52 |
+
3
|
| 53 |
+
],
|
| 54 |
+
[
|
| 55 |
+
256,
|
| 56 |
+
64,
|
| 57 |
+
512,
|
| 58 |
+
2,
|
| 59 |
+
3,
|
| 60 |
+
5
|
| 61 |
+
],
|
| 62 |
+
[
|
| 63 |
+
512,
|
| 64 |
+
128,
|
| 65 |
+
1024,
|
| 66 |
+
1,
|
| 67 |
+
3,
|
| 68 |
+
5
|
| 69 |
+
]
|
| 70 |
+
],
|
| 71 |
+
"apply_downsample": [
|
| 72 |
+
false,
|
| 73 |
+
true,
|
| 74 |
+
true,
|
| 75 |
+
true
|
| 76 |
+
],
|
| 77 |
+
"use_lightweight_conv_block": [
|
| 78 |
+
false,
|
| 79 |
+
false,
|
| 80 |
+
true,
|
| 81 |
+
true
|
| 82 |
+
],
|
| 83 |
+
"image_shape": [
|
| 84 |
+
null,
|
| 85 |
+
null,
|
| 86 |
+
3
|
| 87 |
+
],
|
| 88 |
+
"out_features": [
|
| 89 |
+
"stage2",
|
| 90 |
+
"stage3",
|
| 91 |
+
"stage4"
|
| 92 |
+
],
|
| 93 |
+
"data_format": "channels_last"
|
| 94 |
+
},
|
| 95 |
+
"registered_name": "keras_hub>HGNetV2Backbone"
|
| 96 |
+
},
|
| 97 |
+
"decoder_in_channels": [
|
| 98 |
+
256,
|
| 99 |
+
256,
|
| 100 |
+
256
|
| 101 |
+
],
|
| 102 |
+
"encoder_hidden_dim": 256,
|
| 103 |
+
"num_labels": 80,
|
| 104 |
+
"num_denoising": 100,
|
| 105 |
+
"learn_initial_query": false,
|
| 106 |
+
"num_queries": 300,
|
| 107 |
+
"anchor_image_size": [
|
| 108 |
+
640,
|
| 109 |
+
640
|
| 110 |
+
],
|
| 111 |
+
"feat_strides": [
|
| 112 |
+
8,
|
| 113 |
+
16,
|
| 114 |
+
32
|
| 115 |
+
],
|
| 116 |
+
"num_feature_levels": 3,
|
| 117 |
+
"hidden_dim": 256,
|
| 118 |
+
"encoder_in_channels": [
|
| 119 |
+
256,
|
| 120 |
+
512,
|
| 121 |
+
1024
|
| 122 |
+
],
|
| 123 |
+
"encode_proj_layers": [
|
| 124 |
+
2
|
| 125 |
+
],
|
| 126 |
+
"num_attention_heads": 8,
|
| 127 |
+
"encoder_ffn_dim": 1024,
|
| 128 |
+
"num_encoder_layers": 1,
|
| 129 |
+
"hidden_expansion": 0.5,
|
| 130 |
+
"depth_multiplier": 0.34,
|
| 131 |
+
"eval_idx": -1,
|
| 132 |
+
"box_noise_scale": 1.0,
|
| 133 |
+
"label_noise_ratio": 0.5,
|
| 134 |
+
"labels": null,
|
| 135 |
+
"num_decoder_layers": 3,
|
| 136 |
+
"decoder_attention_heads": 8,
|
| 137 |
+
"decoder_ffn_dim": 1024,
|
| 138 |
+
"decoder_method": "default",
|
| 139 |
+
"decoder_n_points": [
|
| 140 |
+
3,
|
| 141 |
+
6,
|
| 142 |
+
3
|
| 143 |
+
],
|
| 144 |
+
"lqe_hidden_dim": 64,
|
| 145 |
+
"num_lqe_layers": 2,
|
| 146 |
+
"seed": 0,
|
| 147 |
+
"image_shape": [
|
| 148 |
+
null,
|
| 149 |
+
null,
|
| 150 |
+
3
|
| 151 |
+
],
|
| 152 |
+
"data_format": "channels_last",
|
| 153 |
+
"out_features": [
|
| 154 |
+
"stage2",
|
| 155 |
+
"stage3",
|
| 156 |
+
"stage4"
|
| 157 |
+
]
|
| 158 |
+
},
|
| 159 |
+
"registered_name": "keras_hub>DFineBackbone"
|
| 160 |
+
},
|
| 161 |
+
"preprocessor": {
|
| 162 |
+
"module": "keras_hub.src.models.d_fine.d_fine_object_detector_preprocessor",
|
| 163 |
+
"class_name": "DFineObjectDetectorPreprocessor",
|
| 164 |
+
"config": {
|
| 165 |
+
"name": "d_fine_object_detector_preprocessor",
|
| 166 |
+
"trainable": true,
|
| 167 |
+
"dtype": {
|
| 168 |
+
"module": "keras",
|
| 169 |
+
"class_name": "DTypePolicy",
|
| 170 |
+
"config": {
|
| 171 |
+
"name": "float32"
|
| 172 |
+
},
|
| 173 |
+
"registered_name": null
|
| 174 |
+
},
|
| 175 |
+
"image_converter": {
|
| 176 |
+
"module": "keras_hub.src.models.d_fine.d_fine_image_converter",
|
| 177 |
+
"class_name": "DFineImageConverter",
|
| 178 |
+
"config": {
|
| 179 |
+
"name": "d_fine_image_converter",
|
| 180 |
+
"trainable": true,
|
| 181 |
+
"dtype": {
|
| 182 |
+
"module": "keras",
|
| 183 |
+
"class_name": "DTypePolicy",
|
| 184 |
+
"config": {
|
| 185 |
+
"name": "float32"
|
| 186 |
+
},
|
| 187 |
+
"registered_name": null
|
| 188 |
+
},
|
| 189 |
+
"image_size": [
|
| 190 |
+
640,
|
| 191 |
+
640
|
| 192 |
+
],
|
| 193 |
+
"scale": 0.00392156862745098,
|
| 194 |
+
"offset": null,
|
| 195 |
+
"interpolation": "bilinear",
|
| 196 |
+
"antialias": false,
|
| 197 |
+
"crop_to_aspect_ratio": true,
|
| 198 |
+
"pad_to_aspect_ratio": false,
|
| 199 |
+
"bounding_box_format": "yxyx"
|
| 200 |
+
},
|
| 201 |
+
"registered_name": "keras_hub>DFineImageConverter"
|
| 202 |
+
},
|
| 203 |
+
"config_file": "preprocessor.json"
|
| 204 |
+
},
|
| 205 |
+
"registered_name": "keras_hub>DFineObjectDetectorPreprocessor"
|
| 206 |
+
},
|
| 207 |
+
"name": "d_fine_object_detector",
|
| 208 |
+
"num_classes": 80,
|
| 209 |
+
"bounding_box_format": "yxyx",
|
| 210 |
+
"matcher_class_cost": 2.0,
|
| 211 |
+
"matcher_bbox_cost": 5.0,
|
| 212 |
+
"matcher_ciou_cost": 2.0,
|
| 213 |
+
"use_focal_loss": true,
|
| 214 |
+
"matcher_alpha": 0.25,
|
| 215 |
+
"matcher_gamma": 2.0,
|
| 216 |
+
"weight_loss_vfl": 1.0,
|
| 217 |
+
"weight_loss_bbox": 5.0,
|
| 218 |
+
"weight_loss_ciou": 2.0,
|
| 219 |
+
"weight_loss_fgl": 0.15,
|
| 220 |
+
"weight_loss_ddf": 1.5,
|
| 221 |
+
"ddf_temperature": 5.0,
|
| 222 |
+
"prediction_decoder": {
|
| 223 |
+
"module": "keras_hub.src.layers.modeling.non_max_supression",
|
| 224 |
+
"class_name": "NonMaxSuppression",
|
| 225 |
+
"config": {
|
| 226 |
+
"name": "non_max_suppression",
|
| 227 |
+
"trainable": true,
|
| 228 |
+
"dtype": {
|
| 229 |
+
"module": "keras",
|
| 230 |
+
"class_name": "DTypePolicy",
|
| 231 |
+
"config": {
|
| 232 |
+
"name": "float32"
|
| 233 |
+
},
|
| 234 |
+
"registered_name": null
|
| 235 |
+
},
|
| 236 |
+
"bounding_box_format": "yxyx",
|
| 237 |
+
"from_logits": true,
|
| 238 |
+
"iou_threshold": 0.5,
|
| 239 |
+
"confidence_threshold": 0.5,
|
| 240 |
+
"max_detections": 300
|
| 241 |
+
},
|
| 242 |
+
"registered_name": "keras_hub>NonMaxSuppression"
|
| 243 |
+
}
|
| 244 |
+
},
|
| 245 |
+
"registered_name": "keras_hub>DFineObjectDetector"
|
| 246 |
+
}
|