Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into r0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Divyashree Sreepathihalli committed Jan 9, 2024
2 parents 677c7bc + d7147ba commit f09c896
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion keras_cv/datasets/pascal_voc/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class and instance segmentation masks.
booktitle = "International Conference on Computer Vision (ICCV)",
year = "2011"}}
""" # noqa: E501
SBD_URL = "https://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz" # noqa: E501
SBD_URL = "https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz" # noqa: E501


# Note that this list doesn't contain the background class. In the
Expand Down
8 changes: 8 additions & 0 deletions keras_cv/layers/serialization_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,14 @@ class SerializationTest(TestCase):
"from_logits": True,
},
),
(
"NonMaxSuppression",
cv_layers.NonMaxSuppression,
{
"bounding_box_format": "yxyx",
"from_logits": True,
},
),
)
def test_layer_serialization(self, layer_cls, init_args):
# TODO: Some layers are not yet compatible with Keras 3.
Expand Down
6 changes: 4 additions & 2 deletions keras_cv/models/object_detection/yolo_v8/yolo_v8_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,14 @@ def from_config(cls, config):
config["backbone"]
)
label_encoder = config.get("label_encoder")
if label_encoder is not None:
if label_encoder is not None and isinstance(label_encoder, dict):
config["label_encoder"] = keras.saving.deserialize_keras_object(
label_encoder
)
prediction_decoder = config.get("prediction_decoder")
if prediction_decoder is not None:
if prediction_decoder is not None and isinstance(
prediction_decoder, dict
):
config[
"prediction_decoder"
] = keras.saving.deserialize_keras_object(prediction_decoder)
Expand Down

0 comments on commit f09c896

Please sign in to comment.