Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue #12 by adding a TensorFlow 2 compatibility layer to all files associated with WSI segmentation, enabling inference to run in a TF2 environment while maintaining compatibility with existing TF1.15 legacy code.
Implementation Details
nas_network.pyhparamsin a TF2-compatible wayhparamsAPIs while preserving existing behavior.conv2d_ws.pyImplemented TF2 equivalents for deprecated internal TF1 layer utilities:
_variable_getter_for_compatlayers._build_variable_getter_add_variable_to_collectionslayers._add_variable_to_collectionsnas_network.pyandconv2d_ws.pyimplementations are based on the TF1.15 internal source code:https://raw.githubusercontent.com/tensorflow/tensorflow/v1.15.0/tensorflow/contrib/training/python/training/hparam.py
https://raw.githubusercontent.com/tensorflow/tensorflow/v1.15.0/tensorflow/contrib/layers/python/layers/layers.py
How to Run / Test
Clone the repository
Map TF1 checkpoint to TF2 format
map_checkpoint_to_deeplabv3plus.py(line 318), for example:Run segmentation
run_glom_detection_gpu.sh(lines 21–31)Output
.jsonfiles in the root-leveloutput/directory.Notes