Divyasreepat commited on
Commit
2f0c1c8
·
verified ·
1 Parent(s): c44d580

Upload folder using huggingface_hub

Browse files
Files changed (8) hide show
  1. README.md +32 -0
  2. config.json +49 -0
  3. image_converter.json +36 -0
  4. metadata.json +9 -0
  5. model.weights.h5 +3 -0
  6. preprocessor.json +54 -0
  7. task.json +115 -0
  8. 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:** 64
11
+ * **stem_kernel_size:** 7
12
+ * **stem_strides:** 4
13
+ * **stackwise_depth:** [3, 3, 5, 2]
14
+ * **stackwise_strides:** [1, 2, 2, 2]
15
+ * **stackwise_num_filters:** [256, 512, 1024, 2048]
16
+ * **stage_type:** csp
17
+ * **block_type:** bottleneck_block
18
+ * **output_strides:** 32
19
+ * **groups:** 32
20
+ * **activation:** leaky_relu
21
+ * **bottle_ratio:** 1.0
22
+ * **block_ratio:** 0.5
23
+ * **expand_ratio:** 1.0
24
+ * **stem_padding:** valid
25
+ * **stem_pooling:** max
26
+ * **avg_down:** False
27
+ * **down_growth:** False
28
+ * **cross_linear:** True
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,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 64,
8
+ "stem_kernel_size": 7,
9
+ "stem_strides": 4,
10
+ "stackwise_depth": [
11
+ 3,
12
+ 3,
13
+ 5,
14
+ 2
15
+ ],
16
+ "stackwise_strides": [
17
+ 1,
18
+ 2,
19
+ 2,
20
+ 2
21
+ ],
22
+ "stackwise_num_filters": [
23
+ 256,
24
+ 512,
25
+ 1024,
26
+ 2048
27
+ ],
28
+ "stage_type": "csp",
29
+ "block_type": "bottleneck_block",
30
+ "output_strides": 32,
31
+ "groups": 32,
32
+ "activation": "leaky_relu",
33
+ "bottle_ratio": 1.0,
34
+ "block_ratio": 0.5,
35
+ "expand_ratio": 1.0,
36
+ "stem_padding": "valid",
37
+ "stem_pooling": "max",
38
+ "avg_down": false,
39
+ "down_growth": false,
40
+ "cross_linear": true,
41
+ "image_shape": [
42
+ null,
43
+ null,
44
+ 3
45
+ ],
46
+ "data_format": "channels_last"
47
+ },
48
+ "registered_name": "keras_hub>CSPNetBackbone"
49
+ }
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": "bilinear",
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": 18578368,
5
+ "date_saved": "2025-04-10@20:15:58",
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:1604203f56e88d625f4f581843e76482f24dfd07f8d95756ed96f8595f8d63a0
3
+ size 74796760
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": "bilinear",
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,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 64,
12
+ "stem_kernel_size": 7,
13
+ "stem_strides": 4,
14
+ "stackwise_depth": [
15
+ 3,
16
+ 3,
17
+ 5,
18
+ 2
19
+ ],
20
+ "stackwise_strides": [
21
+ 1,
22
+ 2,
23
+ 2,
24
+ 2
25
+ ],
26
+ "stackwise_num_filters": [
27
+ 256,
28
+ 512,
29
+ 1024,
30
+ 2048
31
+ ],
32
+ "stage_type": "csp",
33
+ "block_type": "bottleneck_block",
34
+ "output_strides": 32,
35
+ "groups": 32,
36
+ "activation": "leaky_relu",
37
+ "bottle_ratio": 1.0,
38
+ "block_ratio": 0.5,
39
+ "expand_ratio": 1.0,
40
+ "stem_padding": "valid",
41
+ "stem_pooling": "max",
42
+ "avg_down": false,
43
+ "down_growth": false,
44
+ "cross_linear": true,
45
+ "image_shape": [
46
+ null,
47
+ null,
48
+ 3
49
+ ],
50
+ "data_format": "channels_last"
51
+ },
52
+ "registered_name": "keras_hub>CSPNetBackbone"
53
+ },
54
+ "preprocessor": {
55
+ "module": "keras_hub.src.models.cspnet.cspnet_image_classifier_preprocessor",
56
+ "class_name": "CSPNetImageClassifierPreprocessor",
57
+ "config": {
58
+ "name": "csp_net_image_classifier_preprocessor",
59
+ "trainable": true,
60
+ "dtype": {
61
+ "module": "keras",
62
+ "class_name": "DTypePolicy",
63
+ "config": {
64
+ "name": "float32"
65
+ },
66
+ "registered_name": null
67
+ },
68
+ "image_converter": {
69
+ "module": "keras_hub.src.models.cspnet.cspnet_image_converter",
70
+ "class_name": "CSPNetImageConverter",
71
+ "config": {
72
+ "name": "csp_net_image_converter",
73
+ "trainable": true,
74
+ "dtype": {
75
+ "module": "keras",
76
+ "class_name": "DTypePolicy",
77
+ "config": {
78
+ "name": "float32"
79
+ },
80
+ "registered_name": null
81
+ },
82
+ "image_size": [
83
+ 256,
84
+ 256
85
+ ],
86
+ "scale": [
87
+ 0.017124753831663668,
88
+ 0.01750700280112045,
89
+ 0.017429193899782133
90
+ ],
91
+ "offset": [
92
+ -2.1179039301310043,
93
+ -2.0357142857142856,
94
+ -1.8044444444444445
95
+ ],
96
+ "interpolation": "bilinear",
97
+ "antialias": false,
98
+ "crop_to_aspect_ratio": true,
99
+ "pad_to_aspect_ratio": false,
100
+ "bounding_box_format": "yxyx"
101
+ },
102
+ "registered_name": "keras_hub>CSPNetImageConverter"
103
+ },
104
+ "config_file": "preprocessor.json"
105
+ },
106
+ "registered_name": "keras_hub>CSPNetImageClassifierPreprocessor"
107
+ },
108
+ "name": "csp_net_image_classifier",
109
+ "num_classes": 1000,
110
+ "pooling": "avg",
111
+ "activation": "softmax",
112
+ "dropout": 0.0
113
+ },
114
+ "registered_name": "keras_hub>CSPNetImageClassifier"
115
+ }
task.weights.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac6bcc7c3d18ec94349a05da5a0a05f250ace997d8a9189d23c50f290116cb81
3
+ size 83012232