Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pascal voc 2012 dataset with segmentation data. #943

Merged
merged 14 commits into from
Oct 20, 2022

Conversation

qlzh727
Copy link
Member

@qlzh727 qlzh727 commented Oct 18, 2022

What does this PR do?

Add a new data loader function for Pascal voc that contains the segmentation mask data (both class segmentation and instance segmentation.)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you write any new necessary tests?
  • If this adds a new model, can you run a few training steps on TPU in Colab to ensure that no XLA incompatible OP are used?

Unit test will be added soon.

Copy link
Contributor

@tanzhenyu tanzhenyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

keras_cv/datasets/pascal_voc/segmentation.py Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Outdated Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Outdated Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Outdated Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Show resolved Hide resolved
keras_cv/datasets/pascal_voc/segmentation.py Outdated Show resolved Hide resolved
@qlzh727
Copy link
Member Author

qlzh727 commented Oct 19, 2022

/gcbrun

1 similar comment
@qlzh727
Copy link
Member Author

qlzh727 commented Oct 19, 2022

/gcbrun

@qlzh727
Copy link
Member Author

qlzh727 commented Oct 19, 2022

/gcbrun

@qlzh727
Copy link
Member Author

qlzh727 commented Oct 19, 2022

/gcbrun

1 similar comment
@qlzh727
Copy link
Member Author

qlzh727 commented Oct 19, 2022

/gcbrun

@bhack
Copy link
Contributor

bhack commented Oct 19, 2022

@qlzh727 I've protected our devcontainer with a specific Github Action as we are always drifting when we introduce new dependencies or version changes. So you need to add the dependency to the Dockerfile.

Change the implementation of decode PNG to tf.gather with constant tesnor.

This removes the need of PILLOW as a dependency.
@qlzh727
Copy link
Member Author

qlzh727 commented Oct 20, 2022

Ack, since we change the approach, the extra deps of PILLOW is not needed.

@qlzh727
Copy link
Member Author

qlzh727 commented Oct 20, 2022

/gcbrun

@qlzh727 qlzh727 changed the title [WIP] Add pascal voc dataset with segmentation data. Add pascal voc 2012 dataset with segmentation data. Oct 20, 2022
@qlzh727
Copy link
Member Author

qlzh727 commented Oct 20, 2022

/gcbrun

@qlzh727 qlzh727 merged commit 50f2b88 into keras-team:master Oct 20, 2022
@qlzh727 qlzh727 deleted the voc_dataload branch October 20, 2022 20:22
ghost pushed a commit to y-vectorfield/keras-cv that referenced this pull request Nov 16, 2023
* WIP for Pascal VOC dataset loader with segmentation map

* Remove the unused function.

* Update the segmentation dataset load.

* Address review comments and add unit test with test data.

* Try to fix the unit test.

* Fix logging format.

* Fix window test issue with Path.as_uri()

* Fix cloud build for the missiong PIL dependency.

* Address review comment.

Change the implementation of decode PNG to tf.gather with constant tesnor.

This removes the need of PILLOW as a dependency.

* Remove unused function and imports.

* Fix typo in the comment.

* Change the VOC_PNG_COLOR_MAPPING to be lazily created, to avoid the unnecessary memory usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants