Divyasreepat commited on
Commit
efb1dd9
·
verified ·
1 Parent(s): e550739

Update README.md with new model card content

Browse files
Files changed (1) hide show
  1. README.md +38 -14
README.md CHANGED
@@ -1,19 +1,18 @@
1
  ---
2
  library_name: keras-hub
3
  ---
4
- This is a [`DeepLabV3` model](https://keras.io/api/keras_hub/models/deeplab_v3/) uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
5
- This model is related to an `ImageSegmenter` task.
6
-
7
- # Model Details
8
-
9
- DeepLabv3+ model is developed by Google for semantic segmentation. This guide demonstrates how to finetune and use DeepLabv3+ model for image semantic segmentaion with KerasCV. Its architecture that combines atrous convolutions, contextual information aggregation, and powerful backbones to achieve accurate and detailed semantic segmentation. The DeepLabv3+ model has been shown to achieve state-of-the-art results on a variety of image segmentation benchmarks. This model is supported in both KerasCV and KerasHub. KerasCV will no longer be actively developed, so please try to use KerasHub. Weights are released under the [Apache 2 License](https://apache.org/licenses/LICENSE-2.0). Keras model code is released under the [Apache 2 License](https://github.com/keras-team/keras-hub/blob/master/LICENSE).
10
 
11
  ## Links
12
 
13
- * [DeepLabV3Plus Quickstart Notebook](https://www.kaggle.com/code/laxmareddypatlolla/deeplabv3-quickstart)
14
  * [DeepLabV3Plus Finetune Notebook](https://www.kaggle.com/code/prasadsachin/deeplabv3plus-finetune-notebook/)
15
  * [DeepLabV3Plus API Documentation](https://keras.io/api/keras_hub/models/deeplab_v3/)
16
 
 
17
  ## Installation
18
 
19
  Keras and KerasHub can be installed with:
@@ -33,12 +32,41 @@ The following model checkpoints are provided by the Keras team. Full code exampl
33
  |------------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
34
  | deeplab_v3_plus_resnet50_pascalvoc | 39.1M | DeeplabV3Plus with a ResNet50 v2 backbone. Trained on PascalVOC 2012 Semantic segmentation task, which consists of 20 classes and one background class. This model achieves a final categorical accuracy of 89.34% and mIoU of 0.6391 on evaluation dataset. This preset is only comptabile with Keras 3. |
35
 
 
 
36
 
37
- ## Example Use
 
 
 
38
 
39
- Load DeepLabv3+ presets a extension of DeepLabv3 by adding a simple yet effective decoder module to refine the segmentation results especially along object boundaries.
 
 
 
 
 
 
 
 
40
 
 
 
 
 
 
 
 
 
41
  ```
 
 
 
 
 
 
 
 
42
  images = np.ones(shape=(1, 96, 96, 3))
43
  labels = np.zeros(shape=(1, 96, 96, 2))
44
  segmenter = keras_hub.models.DeepLabV3ImageSegmenter.from_preset(
@@ -48,7 +76,7 @@ segmenter.predict(images)
48
  ```
49
  Specify `num_classes` to load randomly initialized segmentation head.
50
 
51
- ```
52
  segmenter = keras_hub.models.DeepLabV3ImageSegmenter.from_preset(
53
  "hf://keras/deeplab_v3_plus_resnet50_pascalvoc",
54
  num_classes=2,
@@ -57,7 +85,3 @@ segmenter.preprocessor.image_size = (96, 96)
57
  segmenter.fit(images, labels, epochs=3)
58
  segmenter.predict(images) # Trained 2 class segmentation.
59
  ```
60
- ## Model paper
61
-
62
- https://arxiv.org/abs/1802.02611
63
-
 
1
  ---
2
  library_name: keras-hub
3
  ---
4
+ ### Model Overview
5
+ DeepLabv3+ model is developed by Google for semantic segmentation. This guide demonstrates how to finetune and use DeepLabv3+ model for image semantic segmentaion with KerasCV. Its architecture that combines atrous convolutions, contextual information aggregation, and powerful backbones to achieve accurate and detailed semantic segmentation. The DeepLabv3+ model has been shown to achieve state-of-the-art results on a variety of image segmentation benchmarks. This model is supported in both KerasCV and KerasHub. KerasCV will no longer be actively developed, so please try to use KerasHub.
6
+ `
7
+ Weights are released under the [Apache 2 License](https://apache.org/licenses/LICENSE-2.0). Keras model code is released under the [Apache 2 License](https://github.com/keras-team/keras-hub/blob/master/LICENSE).
 
 
8
 
9
  ## Links
10
 
11
+ * [DeepLabV3Plus Quickstart Notebook](https://www.kaggle.com/code/prasadsachin/deeplabv3plus-quickstart)
12
  * [DeepLabV3Plus Finetune Notebook](https://www.kaggle.com/code/prasadsachin/deeplabv3plus-finetune-notebook/)
13
  * [DeepLabV3Plus API Documentation](https://keras.io/api/keras_hub/models/deeplab_v3/)
14
 
15
+
16
  ## Installation
17
 
18
  Keras and KerasHub can be installed with:
 
32
  |------------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
33
  | deeplab_v3_plus_resnet50_pascalvoc | 39.1M | DeeplabV3Plus with a ResNet50 v2 backbone. Trained on PascalVOC 2012 Semantic segmentation task, which consists of 20 classes and one background class. This model achieves a final categorical accuracy of 89.34% and mIoU of 0.6391 on evaluation dataset. This preset is only comptabile with Keras 3. |
34
 
35
+ ## Model card
36
+ https://arxiv.org/abs/1802.02611
37
 
38
+ ### Example Usage
39
+ Load DeepLabv3+ presets a extension of DeepLabv3 by adding a simple yet
40
+ effective decoder module to refine the segmentation results especially
41
+ along object boundaries.
42
 
43
+ ```python
44
+ images = np.ones(shape=(1, 96, 96, 3))
45
+ labels = np.zeros(shape=(1, 96, 96, 2))
46
+ segmenter = keras_hub.models.DeepLabV3ImageSegmenter.from_preset(
47
+ "deeplab_v3_plus_resnet50_pascalvoc",
48
+ )
49
+ segmenter.predict(images)
50
+ ```
51
+ Specify `num_classes` to load randomly initialized segmentation head.
52
 
53
+ ```python
54
+ segmenter = keras_hub.models.DeepLabV3ImageSegmenter.from_preset(
55
+ "deeplab_v3_plus_resnet50_pascalvoc",
56
+ num_classes=2,
57
+ )
58
+ segmenter.preprocessor.image_size = (96, 96)
59
+ segmenter.fit(images, labels, epochs=3)
60
+ segmenter.predict(images) # Trained 2 class segmentation.
61
  ```
62
+
63
+ ## Example Usage with Hugging Face URI
64
+
65
+ Load DeepLabv3+ presets a extension of DeepLabv3 by adding a simple yet
66
+ effective decoder module to refine the segmentation results especially
67
+ along object boundaries.
68
+
69
+ ```python
70
  images = np.ones(shape=(1, 96, 96, 3))
71
  labels = np.zeros(shape=(1, 96, 96, 2))
72
  segmenter = keras_hub.models.DeepLabV3ImageSegmenter.from_preset(
 
76
  ```
77
  Specify `num_classes` to load randomly initialized segmentation head.
78
 
79
+ ```python
80
  segmenter = keras_hub.models.DeepLabV3ImageSegmenter.from_preset(
81
  "hf://keras/deeplab_v3_plus_resnet50_pascalvoc",
82
  num_classes=2,
 
85
  segmenter.fit(images, labels, epochs=3)
86
  segmenter.predict(images) # Trained 2 class segmentation.
87
  ```