Upload folder using huggingface_hub
Browse files- README.md +32 -0
- config.json +46 -0
- image_converter.json +36 -0
- metadata.json +9 -0
- model.weights.h5 +3 -0
- preprocessor.json +54 -0
- task.json +112 -0
- task.weights.h5 +3 -0
README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: keras-hub
|
| 3 |
+
---
|
| 4 |
+
This is a [`CSPNet` model](https://keras.io/api/keras_hub/models/csp_net) uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
|
| 5 |
+
This model is related to a `ImageClassifier` task.
|
| 6 |
+
|
| 7 |
+
Model config:
|
| 8 |
+
* **name:** csp_net_backbone
|
| 9 |
+
* **trainable:** True
|
| 10 |
+
* **stem_filters:** 32
|
| 11 |
+
* **stem_kernel_size:** 3
|
| 12 |
+
* **stem_strides:** 1
|
| 13 |
+
* **stackwise_depth:** [1, 2, 8, 8, 4]
|
| 14 |
+
* **stackwise_strides:** 2
|
| 15 |
+
* **stackwise_num_filters:** [64, 128, 256, 512, 1024]
|
| 16 |
+
* **stage_type:** dark
|
| 17 |
+
* **block_type:** dark_block
|
| 18 |
+
* **output_strides:** 32
|
| 19 |
+
* **groups:** 1
|
| 20 |
+
* **activation:** leaky_relu
|
| 21 |
+
* **bottle_ratio:** 0.5
|
| 22 |
+
* **block_ratio:** 1.0
|
| 23 |
+
* **expand_ratio:** None
|
| 24 |
+
* **stem_padding:** same
|
| 25 |
+
* **stem_pooling:** None
|
| 26 |
+
* **avg_down:** None
|
| 27 |
+
* **down_growth:** None
|
| 28 |
+
* **cross_linear:** None
|
| 29 |
+
* **image_shape:** [None, None, 3]
|
| 30 |
+
* **data_format:** channels_last
|
| 31 |
+
|
| 32 |
+
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,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.cspnet.cspnet_backbone",
|
| 3 |
+
"class_name": "CSPNetBackbone",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "csp_net_backbone",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"stem_filters": 32,
|
| 8 |
+
"stem_kernel_size": 3,
|
| 9 |
+
"stem_strides": 1,
|
| 10 |
+
"stackwise_depth": [
|
| 11 |
+
1,
|
| 12 |
+
2,
|
| 13 |
+
8,
|
| 14 |
+
8,
|
| 15 |
+
4
|
| 16 |
+
],
|
| 17 |
+
"stackwise_strides": 2,
|
| 18 |
+
"stackwise_num_filters": [
|
| 19 |
+
64,
|
| 20 |
+
128,
|
| 21 |
+
256,
|
| 22 |
+
512,
|
| 23 |
+
1024
|
| 24 |
+
],
|
| 25 |
+
"stage_type": "dark",
|
| 26 |
+
"block_type": "dark_block",
|
| 27 |
+
"output_strides": 32,
|
| 28 |
+
"groups": 1,
|
| 29 |
+
"activation": "leaky_relu",
|
| 30 |
+
"bottle_ratio": 0.5,
|
| 31 |
+
"block_ratio": 1.0,
|
| 32 |
+
"expand_ratio": null,
|
| 33 |
+
"stem_padding": "same",
|
| 34 |
+
"stem_pooling": null,
|
| 35 |
+
"avg_down": null,
|
| 36 |
+
"down_growth": null,
|
| 37 |
+
"cross_linear": null,
|
| 38 |
+
"image_shape": [
|
| 39 |
+
null,
|
| 40 |
+
null,
|
| 41 |
+
3
|
| 42 |
+
],
|
| 43 |
+
"data_format": "channels_last"
|
| 44 |
+
},
|
| 45 |
+
"registered_name": "keras_hub>CSPNetBackbone"
|
| 46 |
+
}
|
image_converter.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.cspnet.cspnet_image_converter",
|
| 3 |
+
"class_name": "CSPNetImageConverter",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "csp_net_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 |
+
256,
|
| 17 |
+
256
|
| 18 |
+
],
|
| 19 |
+
"scale": [
|
| 20 |
+
0.017124753831663668,
|
| 21 |
+
0.01750700280112045,
|
| 22 |
+
0.017429193899782133
|
| 23 |
+
],
|
| 24 |
+
"offset": [
|
| 25 |
+
-2.1179039301310043,
|
| 26 |
+
-2.0357142857142856,
|
| 27 |
+
-1.8044444444444445
|
| 28 |
+
],
|
| 29 |
+
"interpolation": "bicubic",
|
| 30 |
+
"antialias": false,
|
| 31 |
+
"crop_to_aspect_ratio": true,
|
| 32 |
+
"pad_to_aspect_ratio": false,
|
| 33 |
+
"bounding_box_format": "yxyx"
|
| 34 |
+
},
|
| 35 |
+
"registered_name": "keras_hub>CSPNetImageConverter"
|
| 36 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"keras_version": "3.8.0",
|
| 3 |
+
"keras_hub_version": "0.20.0.dev0",
|
| 4 |
+
"parameter_count": 40620640,
|
| 5 |
+
"date_saved": "2025-04-10@20:02:51",
|
| 6 |
+
"tasks": [
|
| 7 |
+
"ImageClassifier"
|
| 8 |
+
]
|
| 9 |
+
}
|
model.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9761ae8cf1c3a949539630fe8d77e0ab7e942e6e40a98a8fdcf4599941a8f208
|
| 3 |
+
size 162962272
|
preprocessor.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.cspnet.cspnet_image_classifier_preprocessor",
|
| 3 |
+
"class_name": "CSPNetImageClassifierPreprocessor",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "csp_net_image_classifier_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.cspnet.cspnet_image_converter",
|
| 17 |
+
"class_name": "CSPNetImageConverter",
|
| 18 |
+
"config": {
|
| 19 |
+
"name": "csp_net_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 |
+
256,
|
| 31 |
+
256
|
| 32 |
+
],
|
| 33 |
+
"scale": [
|
| 34 |
+
0.017124753831663668,
|
| 35 |
+
0.01750700280112045,
|
| 36 |
+
0.017429193899782133
|
| 37 |
+
],
|
| 38 |
+
"offset": [
|
| 39 |
+
-2.1179039301310043,
|
| 40 |
+
-2.0357142857142856,
|
| 41 |
+
-1.8044444444444445
|
| 42 |
+
],
|
| 43 |
+
"interpolation": "bicubic",
|
| 44 |
+
"antialias": false,
|
| 45 |
+
"crop_to_aspect_ratio": true,
|
| 46 |
+
"pad_to_aspect_ratio": false,
|
| 47 |
+
"bounding_box_format": "yxyx"
|
| 48 |
+
},
|
| 49 |
+
"registered_name": "keras_hub>CSPNetImageConverter"
|
| 50 |
+
},
|
| 51 |
+
"config_file": "preprocessor.json"
|
| 52 |
+
},
|
| 53 |
+
"registered_name": "keras_hub>CSPNetImageClassifierPreprocessor"
|
| 54 |
+
}
|
task.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.cspnet.cspnet_image_classifier",
|
| 3 |
+
"class_name": "CSPNetImageClassifier",
|
| 4 |
+
"config": {
|
| 5 |
+
"backbone": {
|
| 6 |
+
"module": "keras_hub.src.models.cspnet.cspnet_backbone",
|
| 7 |
+
"class_name": "CSPNetBackbone",
|
| 8 |
+
"config": {
|
| 9 |
+
"name": "csp_net_backbone",
|
| 10 |
+
"trainable": true,
|
| 11 |
+
"stem_filters": 32,
|
| 12 |
+
"stem_kernel_size": 3,
|
| 13 |
+
"stem_strides": 1,
|
| 14 |
+
"stackwise_depth": [
|
| 15 |
+
1,
|
| 16 |
+
2,
|
| 17 |
+
8,
|
| 18 |
+
8,
|
| 19 |
+
4
|
| 20 |
+
],
|
| 21 |
+
"stackwise_strides": 2,
|
| 22 |
+
"stackwise_num_filters": [
|
| 23 |
+
64,
|
| 24 |
+
128,
|
| 25 |
+
256,
|
| 26 |
+
512,
|
| 27 |
+
1024
|
| 28 |
+
],
|
| 29 |
+
"stage_type": "dark",
|
| 30 |
+
"block_type": "dark_block",
|
| 31 |
+
"output_strides": 32,
|
| 32 |
+
"groups": 1,
|
| 33 |
+
"activation": "leaky_relu",
|
| 34 |
+
"bottle_ratio": 0.5,
|
| 35 |
+
"block_ratio": 1.0,
|
| 36 |
+
"expand_ratio": null,
|
| 37 |
+
"stem_padding": "same",
|
| 38 |
+
"stem_pooling": null,
|
| 39 |
+
"avg_down": null,
|
| 40 |
+
"down_growth": null,
|
| 41 |
+
"cross_linear": null,
|
| 42 |
+
"image_shape": [
|
| 43 |
+
null,
|
| 44 |
+
null,
|
| 45 |
+
3
|
| 46 |
+
],
|
| 47 |
+
"data_format": "channels_last"
|
| 48 |
+
},
|
| 49 |
+
"registered_name": "keras_hub>CSPNetBackbone"
|
| 50 |
+
},
|
| 51 |
+
"preprocessor": {
|
| 52 |
+
"module": "keras_hub.src.models.cspnet.cspnet_image_classifier_preprocessor",
|
| 53 |
+
"class_name": "CSPNetImageClassifierPreprocessor",
|
| 54 |
+
"config": {
|
| 55 |
+
"name": "csp_net_image_classifier_preprocessor",
|
| 56 |
+
"trainable": true,
|
| 57 |
+
"dtype": {
|
| 58 |
+
"module": "keras",
|
| 59 |
+
"class_name": "DTypePolicy",
|
| 60 |
+
"config": {
|
| 61 |
+
"name": "float32"
|
| 62 |
+
},
|
| 63 |
+
"registered_name": null
|
| 64 |
+
},
|
| 65 |
+
"image_converter": {
|
| 66 |
+
"module": "keras_hub.src.models.cspnet.cspnet_image_converter",
|
| 67 |
+
"class_name": "CSPNetImageConverter",
|
| 68 |
+
"config": {
|
| 69 |
+
"name": "csp_net_image_converter",
|
| 70 |
+
"trainable": true,
|
| 71 |
+
"dtype": {
|
| 72 |
+
"module": "keras",
|
| 73 |
+
"class_name": "DTypePolicy",
|
| 74 |
+
"config": {
|
| 75 |
+
"name": "float32"
|
| 76 |
+
},
|
| 77 |
+
"registered_name": null
|
| 78 |
+
},
|
| 79 |
+
"image_size": [
|
| 80 |
+
256,
|
| 81 |
+
256
|
| 82 |
+
],
|
| 83 |
+
"scale": [
|
| 84 |
+
0.017124753831663668,
|
| 85 |
+
0.01750700280112045,
|
| 86 |
+
0.017429193899782133
|
| 87 |
+
],
|
| 88 |
+
"offset": [
|
| 89 |
+
-2.1179039301310043,
|
| 90 |
+
-2.0357142857142856,
|
| 91 |
+
-1.8044444444444445
|
| 92 |
+
],
|
| 93 |
+
"interpolation": "bicubic",
|
| 94 |
+
"antialias": false,
|
| 95 |
+
"crop_to_aspect_ratio": true,
|
| 96 |
+
"pad_to_aspect_ratio": false,
|
| 97 |
+
"bounding_box_format": "yxyx"
|
| 98 |
+
},
|
| 99 |
+
"registered_name": "keras_hub>CSPNetImageConverter"
|
| 100 |
+
},
|
| 101 |
+
"config_file": "preprocessor.json"
|
| 102 |
+
},
|
| 103 |
+
"registered_name": "keras_hub>CSPNetImageClassifierPreprocessor"
|
| 104 |
+
},
|
| 105 |
+
"name": "csp_net_image_classifier",
|
| 106 |
+
"num_classes": 1000,
|
| 107 |
+
"pooling": "avg",
|
| 108 |
+
"activation": "softmax",
|
| 109 |
+
"dropout": 0.0
|
| 110 |
+
},
|
| 111 |
+
"registered_name": "keras_hub>CSPNetImageClassifier"
|
| 112 |
+
}
|
task.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38926536417a1c1bbcc48810c9694fd5901f86fb0d17232291a5af55b91e097e
|
| 3 |
+
size 167079840
|